scan/README.md

2.2 KiB
Executable File

Overview

Bash wrapper for scanline to allow for fast document scanning.

Features

  • Automatically tag PDFs based on filename
  • Duplex scanning
  • "multipage" scanning to allow for scanner adjustment between pages (for example if pages are different sizes)
  • Store documents in directories based on financial year instead of calendar year for defined tags

Requirements

Usage

rpearce@crom:scan$ ./scan
[processing /Users/rpearce/.scanrc]
[tag tax will use financial year paths]
[preview enabled]
usage: ./scan [OPTIONS] filename tag1 [tag2] [tag3] ... [tagX]

       Scans to:  $PDFDIR/tag1/<year>/filename
       Creates symlinks in:
                  $PDFDIR/tag2/<year>/filename
                  $PDFDIR/tag3/<year>/filename
                  ...etc...

       -d      scan in duplex mode
       -f xxx  for given tag, use financial year in path rather than calendar year
       -h      show this text
       -l      list all available scanners
       -m      multi-page mode (prompts to load new pages each time)
       -p      preview document after scanning
       -s xxx  select scanner to use
       -T      Temporary mode - scan to /tmp/a.pdf

Examples

.scanrc example

bash$ cat ~/.scanrc
# Always preview documents
-p
# If "tax" tag is found, file based on financial year
-f tax
# AutoTag based on certain filenames
at nrma car/mazda
at rego car/mazda
at super super
at homeloan house
at visa bank
at youthsaver bank
at rcpt receipts
at receipt receipts
at elec utilities
at water utilities
at gas utilities
at ticket tickets
at quote quotes

Usage examples

# Scan a double sided document
bash$ ./scan -d my_duplex_bank_statement.pdf bank financial

# Make a combined PDF of an A4 document and a small form factor reciept
bash$ ./scan -m combined.pdf misc

# Scan something without filing it to $PDFDIR/<tag>/<year>
bash$ ./scan -T
bash$ mv /tmp/a.pdf wherever