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

YAML configuration for PDF shots #27

Open
simonw opened this issue Mar 12, 2022 · 3 comments
Open

YAML configuration for PDF shots #27

simonw opened this issue Mar 12, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@simonw
Copy link
Owner

simonw commented Mar 12, 2022

I added PDF support here:

But there's currently no way to script PDFs in the YAML syntax with shot-scraper multi. This would be really useful, especially as the PDF generation grows even more options:

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

simonw commented Mar 12, 2022

This could work:

- output: example.pdf
  pdf: true
  url: http://www.example.com/

@simonw
Copy link
Owner Author

simonw commented Mar 12, 2022

Since PDF will accept a different set of options from regular screenshots I think this will be the point at which I add much more robust validation of the YAML mini-language, probably using https://pydantic-docs.helpmanual.io/

@parkr
Copy link

parkr commented Feb 25, 2024

Hi Simon, I was setup a new repository using your excellent template and was confused when adding shots with a PDF output file failed to render valid PDFs. Would it be worthwhile to mention the formats that are allowed on your detailed documentation page to prevent future confusion about multi-shots? PNG worked great but PDF failed completely.

Additionally, if there is a workaround for Actions multi-shots that you'd recommend for those wishing to generate PDFs, please do let me know. I was thinking of writing a wrapper for myself around shot-scraper pdf that reads a custom YAML file and executes shot-scraper pdf in a subshell.

Thanks for making this great tool!

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

2 participants