Add default quickscripts

Đang mở
#616 13 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Lĩnh vực
desktop, tooling

Hướng nghiên cứu

Xem xét API quickscript và tích hợp trình cài đặt DrRacket được mô tả trong issue. Xác minh các script mặc định được đề xuất trên Unix, macOS và Windows; hoàn thành nghĩa là cả hai script đều xuất hiện trong menu Scripts, mở một terminal trong thư mục hiện tại khi được hỗ trợ và mở trang wiki Quickscript.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

One of the features of DrRacket I am enthusiastic about is the Scripts capability.

I think it is fair to say that developers often find value in customising their tools to meet their needs.

The scripts functionality is a safe and beginner friendly way for new developers to do this without the risk of making change that negatively impacts their experience.

The list should be short - I would suggest the following would be sufficient

  • Open terminal - opens the terminal in the current folder
  • Get more scripts - only the script that opens the wiki page with more scripts to review and install.

The impact on the Racket installer would be minimal:

#lang racket/base
(require racket/system
         racket/path
         quickscript)

(script-help-string "Open a terminal in the directory of the current file.")

(define-script open-terminal
  #:label "Open terminal here"
  #:menu-path ("&Utils")
  #:os-types (unix macosx windows)
  (λ (str #:file f)
    (unless f
      (set! f (current-directory)))
    (define dir (path->string (path-only f)))
    (case (system-type 'os)
      [(unix)
       (system (string-append "gnome-terminal"
                              " --working-directory=\"" dir "\""
                              " -t \"" dir "\""
                              "&"))]
      [(macosx)
       (system
        (string-append "osascript -e 'tell app \"Terminal\" to do script \"cd \\\"" dir "\\\"\"'" ))]
      [(windows)
       (shell-execute #f "cmd.exe" "" dir 'sw_shownormal)])
    #false))
(define-script more-scripts
  #:label "Get more scripts (browser)"
  #:menu-path ("url2script")
  #:help-string "Opens the Racket wiki page for DrRacket Quickscript scripts."
  (λ (str) 
    (send-url "https://github.com/racket/racket/wiki/Quickscript-Scripts-for-DrRacket")
    #f))
Ngôn ngữ chính
Racket
Star
517
Fork
102
Merge trung bình
5 giờ 19 phút
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của racket/drracket

Tất cả issue của racket/drracket

Issue tương tự

Thêm issue về Desktop Dev

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.