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

Add --images option to support conversion into multiple image files #123

Merged
merged 12 commits into from
Jul 6, 2019

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Jul 6, 2019

Resolves #71. Added --images option to support conversion into multiple image files by each slide page, like output.001.png, output.002.png... Usage is same as --image option.

$ marp markdown.md --images png
[  INFO ] Converting 1 markdown...
[  INFO ] markdown.md => markdown.001.png
[  INFO ] markdown.md => markdown.002.png
[  INFO ] markdown.md => markdown.003.png

I've refactored internal logic of Converter class to support multiple image conversion for every page. It would be taken screenshot multi-times from a page without extra loading.

--image option for title slide page is still supporting to keep compatibility, but we may consider a new way taking the specified page(s) with --images option. If we added new option(s), --image would obsolete in favor of using --images and page option.

@yhatt
Copy link
Member Author

yhatt commented Jul 6, 2019

Examples (using yhatt/marp-cli-example):

PITCHME 001PITCHME 002PITCHME 003PITCHME 004PITCHME 005PITCHME 006PITCHME 007

$ npx marp PITCHME.md --allow-local-files --images png

@yhatt yhatt merged commit a410975 into master Jul 6, 2019
@yhatt yhatt deleted the convert-to-multiple-files branch July 6, 2019 09:12
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

Successfully merging this pull request may close these issues.

Convert slide deck to multiple images
1 participant