documentcloud / docsplit

Break Apart Documents into Images, Text, Pages and PDFs
http://documentcloud.github.com/docsplit/
Other
833 stars 214 forks source link

Fix page parsing for command line usage #131

Open xavriley opened 9 years ago

xavriley commented 9 years ago

This fixes the --page argument to work as described in the documentation when using docsplit from the command line. Users can now specify page ranges 5-15, comma separated lists 1,5,7, single pages 3 or combinations of these e.g. 3-5,7,8,12-15

The options parser was previously passing through a String where an Array was expected internally. This was not an issue when using the gem directly from Ruby, only when using the command line.

This includes a command_line unit test to exercise the new page number parser.