|
|
|
# Utility Scripts for scanning documents
|
|
|
|
|
|
|
|
|
|
|
|
## Software dependencies:
|
|
|
|
Packages: pdftk, imagemagick
|
|
|
|
Install in Debian/Ubuntu: apt-get install pdftk imagemagick
|
|
|
|
|
|
|
|
Install in Mac with brew (http://brew.sh/): brew install pdftk imagemagick
|
|
|
|
|
|
|
|
Python libraries: mwclient
|
|
|
|
|
|
|
|
Install in Debian/Ubuntu w/ pip: sudo pip install mwclient
|
|
|
|
|
|
|
|
|
|
|
|
## Scripts
|
|
|
|
|
|
|
|
### wiki-download.py
|
|
|
|
Dowloads media files from a wiki, according to a sematic ask query.
|
|
|
|
|
|
|
|
Usage:
|
|
|
|
python wiki-download.py --help
|
|
|
|
|
|
|
|
python wiki-download.py -d imgs -a [[Modification_date::+]]
|
|
|
|
|
|
|
|
|
|
|
|
### imposition.py
|
|
|
|
Converts 8 images (jpg or png) from a given directory, into a single sheet 4x2 imposition.
|
|
|
|
|
|
|
|
Usage:
|
|
|
|
python wiki-download.py --help
|
|
|
|
|
|
|
|
python imposition.py --dir imgs/ --size a3 --order random
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### imgs2pdf.sh
|
|
|
|
Converts a directory of images onto a single PDF
|
|
|
|
|
|
|
|
Usage: `./imgs2pdf.sh imgs-dir-name pdf-filename`
|
|
|
|
|
|
|
|
If no pdf-filename is provided, output.pdf will the default file name
|
|
|
|
|
|
|
|
### rotate.sh
|
|
|
|
Rotates all images in one a directory a given number of degrees
|
|
|
|
|
|
|
|
Usage: `./rotate.sh imgs-dir-name rotation-in-degrees`
|
|
|
|
|