Skip to content

Docsplit images command - Added the ability to specify the page number delimiter via a command line option - #110

Open
BrandonNoad wants to merge 4 commits into
documentcloud:masterfrom
BrandonNoad:master
Open

Docsplit images command - Added the ability to specify the page number delimiter via a command line option#110
BrandonNoad wants to merge 4 commits into
documentcloud:masterfrom
BrandonNoad:master

Conversation

@BrandonNoad

Copy link
Copy Markdown

When using docsplit images to split a pdf into a series of images (e.g. foo.pdf --> foo_1.jpg, foo_2.jpg, ...), the user may want the ability to specify the page number delimiter. For example, instead of always using an underscore ('_'), the user may want to use a dash ('-') or something more complicated (e.g. foo.pdf --> foo-page-1.pdf, foo-page-2, ...).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to have your delimiter start with a dash, you need to escape it with the '^' character. So, we need to strip the '^' before passing it to @options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant