Merge branch 'master' of git.xpub.nl:/var/www/git.xpub.nl/repos/scan-utils

master
Castro0o 7 years ago
commit f8a07fcb23

1
.gitignore vendored

@ -0,0 +1 @@
/imgs/

@ -1,4 +1,4 @@
# Utility Scripts for scanning documents
# Utility Scripts for scanning documents
## Software dependencies:
@ -15,19 +15,19 @@ Install in Debian/Ubuntu w/ pip: sudo pip install 'mwclient==0.8.6'
## Scripts
### wiki-download.py
Dowloads media files from a wiki, according to a sematic ask query.
Downloads media files from a wiki, according to a semantic ask query.
Usage:
python wiki-download.py --help
python wiki-download.py -d imgs -a [[Modification_date::+]]
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 wiki-download.py --help
python imposition.py --dir imgs/ --size a3 --pages 2 --order random
@ -52,4 +52,3 @@ If no pdf-filename is provided, output.pdf will the default file name
Rotates all images in one a directory a given number of degrees
Usage: `./rotate.sh imgs-dir-name rotation-in-degrees`

@ -9,7 +9,7 @@ from random import shuffle
# TODO: add example to description
####
p = ArgumentParser(description='Script converts 8 images (jpg or png) from a given directory into a single page 4x2 imposition. Example: python imposition.py --dir imgs/ --size a3 --order random ')
p.add_argument("--dir", metavar='', default='', required=True, help="Image directory, which stores the source images for the imposition")
p.add_argument("--dir", metavar='', default='imgs', required=True, help="Image directory, which stores the source images for the imposition")
p.add_argument("--size", metavar='', default="A4", choices=['A4','a4','A3','a3'], help="Size of the printing sheet: A4 or A3. Default:A4")
p.add_argument("--pages", metavar='', type=int, choices=[1,2], default=1, help="Number of imposition pages. Default:1. Currently only 1 or 2 pages impositions are available.")
p.add_argument("--order", metavar='', default="alphabet", choices=["alphabet", "reverse", "random"], help="Image distribution Order in the imposition. Possible Values: alphabet (alphabetically) , reverse (reverse alphabetically), random. Default: alphabet")

@ -23,7 +23,7 @@ python wiki-download.py -d imgs -a [[Year::2007]][[Document_Type::Poster]]""", f
p.add_argument("--host", metavar='', default="aa.xpub.nl")
p.add_argument("--path", metavar='', default="/", help="Wiki path. Should end with /")
p.add_argument("--ask", "-a", metavar='', default="", help="Ask query to be sent to the wiki API.")
p.add_argument("--download", "-d", metavar='', default='', help="Local directory to store files from wiki. If no directory provided files wont be downloaded")
p.add_argument("--download", "-d", metavar='', default='imgs', help="Local directory to store files from wiki. If not specified, defaults to imgs")
p.add_argument("--verbose", "-v", action='store_true', help="Increase verbosity. If not given no files will be downloaded")
args = p.parse_args()

Loading…
Cancel
Save