Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: shot-scraper multi --if-not-exists or --skip-existing #70

Closed
simonw opened this issue Apr 18, 2022 · 7 comments
Closed

Idea: shot-scraper multi --if-not-exists or --skip-existing #70

simonw opened this issue Apr 18, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@simonw
Copy link
Owner

simonw commented Apr 18, 2022

Only does the screenshot if the output: file doesn't exist yet.

This could be used to build a very neat GitHub mechanism for creating a portfolio of screenshots of your projects.

@simonw
Copy link
Owner Author

simonw commented Apr 18, 2022

I don't really like either of these option names.

@simonw
Copy link
Owner Author

simonw commented Apr 18, 2022

Options:

  • shot-scraper multi shots.yml --if-not-exists
  • shot-scraper multi shots.yml --skip-existing
  • shot-scraper multi shots.yml --skip

Are there other command-line tools with similar options I can borrow syntax for?

@simonw simonw added the enhancement New feature or request label Apr 18, 2022
@simonw
Copy link
Owner Author

simonw commented Apr 18, 2022

I tried using GPT-3 for inspiration but it didn't come up with anything better:

See text below

Command line option names for an option that skips a file if it already exists:

--skip-if-existing
--skip-existing
--skip-if-file-exists
--skip-if-duplicate

Shorter options:

-s
-S

Single word options:

--skip
--existing

@simonw
Copy link
Owner Author

simonw commented Apr 18, 2022

This prompt worked better:

See text below

Command line tools with a skip existing option:

  1. cp with the -n or --no-clobber option
  2. mv with the -n or --no-clobber option
  3. ln with the -n or --no-target-directory option
  4. tar with the --skip-existing option

@simonw
Copy link
Owner Author

simonw commented Apr 18, 2022

I think I like -n/--no-clobber here, since it's already used by cp and mv.

(Though on macOS at least running man cp and man mv shows that they use the -n version but don't have the --no-clobber longer alias setup)

@simonw simonw closed this as completed in 1007d0f Apr 18, 2022
@simonw
Copy link
Owner Author

simonw commented Apr 18, 2022

simonw added a commit that referenced this issue Apr 18, 2022
@simonw
Copy link
Owner Author

simonw commented Apr 18, 2022

Feedback on Twitter: --no-clobber makes no sense at all to non-English speakers, whereas --skip-existing does: https://twitter.com/kim_vanwyk/status/1516114233255202827

wget calls it no-clobber which I understood when I read it. I did wonder though if "clobber" is meaningful to non-British-english speakers. It strikes me as British slang.

I think I'm going to embrace the Britishness of it though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant