swissmanu / filer

A web application to make filing scanned PDF documents simpler.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

๐Ÿ—„ filer

A web application to make filing scanned PDF documents simpler.

Use Case

We use a scanning app on our smartphones to scan documents to an inbox on a local file server at home. The filer web application shows an inbox document and provides a set of pre-configured rules to categorize it. Selecting a rule moves the document to its final destination in the document archive directory structure and the next inbox document is displayed.

process

Features

  • Preview PDF document from an inbox directory
  • Move inbox document, based on a set of configurable rules, to another directory
  • Rename inbox document before moving it to the document archive
  • Delete inbox document without moving
  • Mobile-friendly browser user interface in your own language (currently german and english. Your translations are welcome! ๐Ÿฅฐ)

filer Demonstration with three PDF documents

The Story aka "Why!?"

We went paperless some years ago at home and made scanning receipts and other documents a habit. To make the scanning as effortless as possible, we decided to upload the resulting PDF files automatically to a shared inbox directory on our file server. Unfortunately, filing and categorizing the scans afterwards turned out to be too cumbersome to do regularly: Sitting down and moving files from one folder to another was just nothing we enjoy that much ๐Ÿ˜‡

filer makes this task less tedious for us: Open the web application, have a glance on the PDF preview, select one of the preset actions, repeat until the inbox is empty.

Usage

  1. Create a rules.yml file with your categorization rules of choice (see "Rules" Section below).

  2. Prepare two directories:

    • Inbox: filer will process PDFs from here. Usually this is the directory where you put your scanned documents.
    • Document archive: The root of your document archive.
  3. Start a filer Docker container:

    docker run -it --rm \
      -v /your/inbox:/inbox \
      -v /your/archive:/data \
      -v /your/rules.yml:/rules.yml \
      -p 8000:8000 \
      ghcr.io/swissmanu/filer/filer:latest
  4. Access filer via https://localhost:8000

Configuration

Rules

rules:
  # Moves a document from the inbox to "FILER_DATA_PATH/Receipts":
  - name: "Receipts"
  	description: "Receipts and bills"
    actions:
      - type: "move"
        target: "Receipts"
  # Moves a document from the inbox to "FILER_DATA_PATH/Insurances/Health":
  - name: "Health Insurance"
  	description: "All documents related to our health insurance"
    actions:
      - type: "move"
        target: "Insurances/Health"

Environment Variables

Environment Variable Default Description
FILER_ADDR :8000 A network interface and port where filer will provide its API and UI via HTTP.
FILER_INBOX_PATH ./inbox Path to the inbox directory.
FILER_DATA_PATH ./data Path to the data directory. Rule target paths are always evaluated relative to the data path.
FILER_RULES_PATH ./rules.yml Path to a YAML file containing rule definitions.
FILER_UI_PATH ./ui Path to filers web user interface. This variable is useful during development; you can ignore it in productive environments.
UMASK_SET -022 Set the umask value for files created by the filer application.

Development

Start development

make install      # Install dependencies
make start-ui     # Start rollup in watch mode
make start-server # Start http server

About

A web application to make filing scanned PDF documents simpler.

License:MIT License


Languages

Language:Go 37.2%Language:Svelte 30.5%Language:TypeScript 15.4%Language:JavaScript 9.9%Language:Makefile 4.1%Language:HTML 1.9%Language:Dockerfile 0.7%Language:Shell 0.3%