You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
img2pdf/src
Paul Ingemi 505344f83e
Add Windows support for paths containing wildcards "*" and "?"
Img2pdf accepts paths containing wildcards such as *.jpg to efficiently refer
to multiple input files that match the wildcard expression. Under POSIX
environments the command line shell is expected to perform this expansion,
however Windows requires the command line utility itself to expand the
wildcard expression.

Ideally this would be performed by argparse as described in this draft PEP:
https://mail.python.org/pipermail/python-ideas/2015-August/035244.html

Since argparse doesn't do it, this commit performs expansion directly.

Some implementation notes:
 - Wildcard characters "*" and "?" are not valid in Windows filenames
 - Code doesn't support bracket wildcards such as [0-3] on Windows since
   they are valid filename characters
 - Due to expansion, the images list collected by argparse may contain
   sub-lists. Code uses chain.from_iterable to create a flat list.
 - Paths that refer to non-existant files raise an error message, while
   wildcards that match no files are silently ignored.
4 years ago
..
tests remove obsolete src/tests/__init__.py 4 years ago
img2pdf.py Add Windows support for paths containing wildcards "*" and "?" 4 years ago
img2pdf_test.py src/img2pdf_test.py: we create our own channel-switching ICC profile 4 years ago
jp2.py reformat with black 4 years ago