quickscript icon indicating copy to clipboard operation
quickscript copied to clipboard

Add default scripts to Quickscript

Open spdegabrielle opened this issue 4 years ago • 11 comments

Quickscript installed with no scripts is counterproductive if users see no scripts they won't investigate further - defeating the point of including a scripts functionality in DrRacket.

I'd propose the following is installed by default

  • [ ] url2script
  • [ ] command palette (with pkg search-list-box)
  • [ ] open-terminal
  • [ ] breakout or eyes
  • [ ] pasterack
  • [ ] visit-url

of course there may be others that are better choices but I'd suggest command-palette, url2script and open-terminal as a minimum, and these scripts they do not grow the distribution in a way that is detectable.

spdegabrielle avatar Nov 06 '21 16:11 spdegabrielle

Related to #24

Metaxal avatar Nov 06 '21 17:11 Metaxal

closed #24 - as my thinking has moved on.

spdegabrielle avatar Nov 06 '21 20:11 spdegabrielle

Do any of these scripts introduce new pkg-level dependencies?

If not, may I see their code to look into the module-level dependencies?

rfindler avatar Dec 10 '21 14:12 rfindler

Yes, command palette, depends on search-list-box

https://pkgs.racket-lang.org/package/search-list-box
source: https://github.com/Metaxal/search-list-box

command palette source https://gist.github.com/Metaxal/d06f50a2534ca229309e71a2d244a912

the others listed

  • https://github.com/Metaxal/quickscript-extra/blob/master/scripts/open-terminal.rkt
  • https://github.com/Metaxal/quickscript-extra/blob/master/scripts/url2script.rkt
  • https://github.com/Metaxal/quickscript-extra/blob/master/scripts/pasterack.rkt
  • https://github.com/Quickscript-Competiton/July2020entries/blob/master/scripts/breakout.rkt
  • https://github.com/Quickscript-Competiton/July2020entries/blob/master/scripts/breakout.rkt
  • https://github.com/Quickscript-Competiton/July2020entries/blob/master/scripts/visit-url.rkt

spdegabrielle avatar Dec 10 '21 15:12 spdegabrielle

I'm hesitant (in the sense of undecided) about including default scripts for the following reasons:

  • Having default scripts would have all the advantages that Stephen points out.
  • But there are responsibilities and levels of trust that are expected if coming from the main distribution by contrast to coming from a third-party package.

I'm not sure anyone uses the pasterack script, so probably not the best one to include.

url2script is pretty useful, but it downloads directly for the Internet, so trust/responsibilities considerations.

open-terminal is probably innocuous but some multi-platform testing would be in order to make it robust for the largest number.

visit-url had some issues at some point when I tried it, but that should be fixable. I don't really use it much though.

eyes are probably the best script to add: simple, fun, no trust issue, should work just fine.

command-palette is a useful script, but has dependency on search-list-box. That said, I do believe something like search-list-box should be part of racket/gui :p

The scripts I use the most:

  • url2script
  • Rename-file
  • New file in same directory
  • backup current file
  • Open terminal
  • string2unicode (kind of like tex-complete but with a much bigger table, but requires text-block and search-list-box)
  • Provided by
  • regexp-replace
  • table-indent
  • author-date although only to add a custom license line
  • enter submodule
  • extract/put function (refactoring)
  • Signature (like blue boxes but work even when the program doesn't compile)
  • CommonMark Render for writing READMEs
  • filepath2clipboard

Metaxal avatar Dec 10 '21 16:12 Metaxal

i can verify open terminal works on windows and macOS I'll be happy if i we can get that and eyes included.

If @rfindler approves command pallette/search-list-box i will be ecstatic.

spdegabrielle avatar Dec 10 '21 16:12 spdegabrielle

I am more than happy to trust @Metaxal 's judgment in this matter. He has a very nuanced and thoughtful take, as above. If there are questions about dependencies, I'm happy to look into those, of course :).

rfindler avatar Dec 10 '21 16:12 rfindler

As much as I'd like to include url2script, I prefer to stay on the cautious side and keep it out of the main distribution for now.

For command-palette, maybe we should first try to get search-list-box in the main distribution. But I think Alex Harsanyi has something similar so it may be a good idea to try to merge the two tools and functionalities first. (Downside: to keep backward compatibility, the two old tools should still exist, which means creating a third one...) Hence, that can be a lot of work :/

(edit: I didn't mean to close the issue...)

Metaxal avatar Dec 10 '21 18:12 Metaxal

Other implementations of 'search-list-box'

  • https://github.com/alex-hhh/qresults-list
  • the Edit menu’s Show Active Keybindings dialog

spdegabrielle avatar Dec 13 '21 00:12 spdegabrielle

Can we start with Open Terminal, so it shows up in nightly releases ?

While we have some time till the next release - we can cautiously test it - if it goes badly we can pull it before 8.4. (I don't think it will go badly - I think it will go well)

spdegabrielle avatar Dec 17 '21 11:12 spdegabrielle

I can do a PR - I'll copy the mechanism used by -extra

spdegabrielle avatar Dec 17 '21 11:12 spdegabrielle