Metadata-Version: 2.1
Name: catpdf
Version: 0.0.2
Summary: conCATenate one or more source PDF files (or pieces of) into a target PDF file
Home-page: UNKNOWN
License: UNKNOWN
Keywords: pdf concatenate pages
Author: Carlo Alessandro Verre
Author-email: carlo.alessandro.verre@gmail.com
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: POSIX :: Linux
Requires-Dist: pdfrw

**usage: catpdf [-h] [-V] [-v] [-y] [-n] source [source ...] target**

**syntax of positional arguments:**
```
    <source>   ::= [<path>/]<file>.pdf[:<choice>]
    <choice>   ::= <interval>[,<interval>]*
    <interval> ::= <index>[-<index>]
    <index>    ::= <integer>|n
    <integer>  ::= 1..9[0..9]*
    
    <target>   ::= [<path>/]<file>.pdf
```
**explanation:**

each source is made by:

  * an optional path followed by '/'
  * a file name followed by mandatory '.pdf' extension
  * an optional choice preceded by ':' (default: ':1-n')

the choice is a comma-separated list of one or more intervals

each interval is made by:

  * an index of a single page
  * or two indexes separated by '-' (meaning first and last page)
       
each index is:

  * a positive integer constant (leading '0's not allowed)
  * or a single lowercase 'n' letter (meaning the number of pages in source file)

the target is made by:

  * an optional path followed by '/'
  * a file name followed by mandatory '.pdf' extension

**examples:**
```
    catpdf a.pdf b.pdf c.pdf
    # concatenate a.pdf and b.pdf into c.pdf

    catpdf a.pdf:1-10,95-n b.pdf:50-40 c.pdf
    # concatenate a.pdf (first 10 pages and from page 95 until the end of file)
    # and b.pdf (from page 50 backwards until page 40) into c.pdf
```
**positional arguments:**
```
    source         one or more source files (each with choice or not), followed by... 
    target         ...one target file
```
**optional arguments:** 
```
    -h, --help     show this help message and exit
    -V, --version  show program's version number and exit
    -v, --verbose  show what happens
    -y, --yes      overwrite existing target file (default: ask)
    -n, --no       don't overwrite existing target file (default: ask)
```

