{"id":23584112,"url":"https://github.com/nuvious/scanpi","last_synced_at":"2025-11-03T02:30:27.242Z","repository":{"id":269084677,"uuid":"906307431","full_name":"nuvious/scanpi","owner":"nuvious","description":"A simple self-hosted scanner that is designed to allow scanning using document scanners to automatically scan, save and ocr documents.","archived":false,"fork":false,"pushed_at":"2024-12-27T19:22:13.000Z","size":26,"stargazers_count":18,"open_issues_count":8,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-14T16:12:33.691Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nuvious.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-20T15:54:06.000Z","updated_at":"2025-01-13T17:23:10.000Z","dependencies_parsed_at":"2024-12-27T20:20:38.481Z","dependency_job_id":null,"html_url":"https://github.com/nuvious/scanpi","commit_stats":null,"previous_names":["nuvious/scanpi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuvious%2Fscanpi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuvious%2Fscanpi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuvious%2Fscanpi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuvious%2Fscanpi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nuvious","download_url":"https://codeload.github.com/nuvious/scanpi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239406442,"owners_count":19633024,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-27T02:25:26.926Z","updated_at":"2025-11-03T02:30:27.211Z","avatar_url":"https://github.com/nuvious.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ScanPi\n\nA simple self-hosted scanner that is designed to allow scanning using document\nscanners to automatically scan, save and ocr documents. While called ScanPi it\ncould be deployed to any system. Designed to give USB scanners or any scanner\nthat is supported by [scanadf](https://linux.die.net/man/1/scanadf) a second\nlife.\n\nCurrent implementation does not have authentication. Issue #1 is earmarked for\nimplementation of authentication, ideally without requiring any registration.\n\n## Demo\n\n[![ScanPi Video Demo](http://img.youtube.com/vi/9Ftn02hEa44/0.jpg)](http://www.youtube.com/watch?v=9Ftn02hEa44 \"ScanPi Video Demo\")\n\n## Quickstart\n\nFirst install flask, scanadf and ocrmypdf. The application needs to run as root\nfor `scanadf` so install as the root user.\n\n```bash\nsudo pip3 install Flask\nsudo apt update\nsudo apt install scanadf ocrmypdf -y\n```\n\nNext launch the app.\n\n```bash\nsudo python3 app.py\n```\n\nThe scan tool defaults to `http://localhost:5000`. Current implementation has\nno authentication, but will be added in the future.\n\n## Environment Variables\n\nSettings are modified through environment variables listed below:\n\n|Name|Desc|Default|\n|-|-|-|\n|DEBUG|Launches flask in debug and raises all exceptions.|False|\n|ROOT_PATH|Root path for scan form endpoint.|'/'|\n|SOURCES|Scanner specific sources as a comma separated string.|\"ADF Front,ADF Back,ADF Duplex\"|\n|MODES|Scanner specific modes as a comma separated string.|\"Lineart,Halftone,Gray,Color\"|\n|RESOLUTIONS|Scanner specific resolutions as a comma separated string.|\"50,100,150,200,250,300,350,400,450,500,550,600\"|\n|DATE_FORMAT|A date format string prepended to file names|\"%Y-%m-%d-%H-%M-%S\"|\n|SCAN_DIRECTORY|A default directory to put scanned files. Default assumes using some form of network share.|/mnt/scan|\n|PROCESSING_LOCKFILE|Location of the lockfile used to avoid collisions during scan processing.|/var/lock/.scanlock|\n|SCAN_JOB_DELAY|Seconds to wait between scan jobs to allow loading the next job.|15s|\n\nNOTE: It is possible to queue multiple jobs, but order is not guaranteed. If\nqueueing multiple jobs use a generic name like 'scan1', 'scan2', etc and rename\nafter the fact.\n\n## Systemd Service Template\n\nBelow is an example of a systemd configuration that moves the scan directory\nto `/mnt/smbscandir` and makes the root path `/scan` instead of `/` with the\nproject cloned to my home directory.\n\n```ini\n[Unit]\nDescription=ScanPi Python Application\nAfter=network.target\n\n[Service]\nWorkingDirectory=/home/nuvious/scanpi\nExecStart=/usr/bin/python3 /home/nuvious/scanpi/app.py\nEnvironment=\"SCAN_DIRECTORY=/mnt/smbscandir\"\nEnvironment=\"ROOT_PATH=/scan\"\nRestart=always\nRestartSec=30\nUser=root\nGroup=root\n\n[Install]\nWantedBy=multi-user.target\n```\n\nBelow is a copy-paste-ready command one could run that generates a default\nconfiguration with scanpi cloned to /opt/scanpi and scans are saved to\n`/mnt/scan` and the root path is `/`. Below should be run as root.\n\n```bash\nset -e # Stop on any error\nmkdir -p /mnt/scan\ngit clone https://github.com/nuvious/scanpi.git /opt/scanpi\ntouch /lib/systemd/system/scanpi.service\ncat \u003e /lib/systemd/system/scanpi.service \u003c\u003c EOF\n[Unit]\nDescription=ScanPi Python Application\nAfter=network.target\n\n[Service]\nWorkingDirectory=/opt/scanpi\nExecStart=/usr/bin/python3 /opt/scanpi/app.py\nRestart=always\nRestartSec=30\nUser=root\nGroup=root\n\n[Install]\nWantedBy=multi-user.target\nEOF\n# Edit accordingly if desired to add environment variables.\nsystemctl enable scanpi --now\n```\n\n## Tested Hardware\n\n[Fujitsu/RICOH SnapScan S1500](https://www.pfu.ricoh.com/global/scanners/scansnap/discontinued/s1500/s1500.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuvious%2Fscanpi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnuvious%2Fscanpi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuvious%2Fscanpi/lists"}