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

bash interpolation inside shots.yml #130

Open
spencerc99 opened this issue Nov 10, 2023 · 1 comment
Open

bash interpolation inside shots.yml #130

spencerc99 opened this issue Nov 10, 2023 · 1 comment

Comments

@spencerc99
Copy link

Hi there! thanks so much for this awesome library. I've been using it to archive photos of my website every day to keep a history.

One thing I'm having trouble with is bash interpolation inside shots.yml for a multi-shot set-up. Basically, I want to configure the command to output to a folder with the current date as the file name. Here's an example of what that looks like for an item inside shots.yml

- url: https://spencerchang.me
  output: personal-website/$(date '+%Y-%m-%d' | sed 's/-0\([0-9]\)-/-\1-/').png
  ...

That output works fine inside my terminal but interprets it literally whenever I run shot-scraper multi. I've tried surrounding it in different variations of quotes and escaping without luck, so wanted to check to see if this is supported?

@spencerc99
Copy link
Author

Okay, looking through the code and given #36 it seems this doesn't work, and python's standard subprocess.run doesn't support interpolation :(

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

No branches or pull requests

1 participant