scan/README.md

79 lines
2.2 KiB
Markdown
Raw Normal View History

2021-06-03 19:13:43 +10:00
# Overview
Bash wrapper for [scanline](https://github.com/klep/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)
2021-06-03 19:15:26 +10:00
- Store documents in directories based on financial year instead of calendar year for defined tags
2021-06-03 19:13:43 +10:00
2022-07-10 11:46:38 +10:00
# Requirements
- OSX
- [bashtools](https://git.nethack.net/rob/bashtools)
- [scanline](https://github.com/klep/scanline)
- (optional) [OCRmyPDF](https://github.com/ocrmypdf/OCRmyPDF) to make searchable PDFs
2021-06-03 19:13:43 +10:00
# 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