Skip to main content

StaticPIE

Simple Web-based Interface for Scanner

Package version License

This is a simple web-based interface for scanners. It allows sharing the scanner via IP address, making it accessible by the web browser. The frontend interface allows users to crop the image and browse previously scanned images.

From a technical perspective, it is simply a SANE scanimage wrapper. There are quite many things to do to make it production (see TODO section).

Requirements

  • Linux
  • SANE (Scanner Access Now Easy) properly configured (scanimage tool)
  • Python >= 3.8
  • [Optionally] NPM (for frontend app building)

Install and run (local user)

pip install swis
swis --ip localhost --port 5520

If successfully executed visit the http://localhost:5520 (Note: http (without s))

❗IMPORTANT❗ Change the IP (localhost above) to a proper host IP address if you want to access the scanner from other computers (or other devices).

Install and run (system service)

Prerequisites

This process requires root privileges, and you need to have Python>=3.8 installed. If the root user does't have the the pip installed, you will have to install it by running the below:

  • Fedora (and similar): sudo dnf install python3-pip
  • Ubuntu (and similar): sudo apt-get install python3-pip

Install and start service

sudo pip3 install swis
sudo swis --ip [HOST IP ADDRESS] --port 5520 -u [USER] -g [GROUP] service install 
sudo swis service start

You can check the status by running: sudo swis service status

❗IMPORTANT❗ Change the IP ([HOST IP ADDRESS] above) to a proper host IP address, and [USER] and [GROUP] to a proper system user (owner of scanned documents).

Upgrade to new version

To upgrade swis to the new version following steps need to be performed (notice that config needs to be provided):

sudo pip install -U swis
sudo swis --ip [HOST IP ADDRESS] --port 5520 -u [USER] -g [GROUP] service install 
sudo swis service start

Screenshots

Welcome screen

Scanning parameters

Scanning in progress

Cropping scanned image

Side menu

List of scanned images

TODO:

  • error handling
  • pip package
  • automatically add service with systemctl
  • better user interface (i.e. image remove button)
  • save as pdf, etc.

Metadata

Release files for swis 0.4.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for swis 0.4.4
File Size Uploaded Provenance Actions
swis-0.4.4.tar.gz 593.7 kB Without provenance Details for swis-0.4.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for swis 0.4.4
File Interpreter ABI Platform Actions
swis-0.4.4-py2.py3-none-any.whl Python 3, Python 2 none any Details for swis-0.4.4-py2.py3-none-any.whl

Total release size: 1.2 MB

Release files / swis-0.4.4.tar.gz

Download URL swis-0.4.4.tar.gz
Size 593.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f0de4438cda505b3f111ecaa1a764f436fad9d01ffb73e8a676fd82465e65e0c
BLAKE2b-256 checksum
How to use checksums
f0a07712b3f7ee73251328f1bd5c5f93ed886363c666ea037a7c33349fd7cabb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Release files / swis-0.4.4-py2.py3-none-any.whl

Download URL swis-0.4.4-py2.py3-none-any.whl
Size 604.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
b2440b83c33af9596c2ab4ec7cc7128efd1d8457d38af07e71e3f6b7b2351dd1
BLAKE2b-256 checksum
How to use checksums
84eb67cbd2e87f83893f5c955b528ab88a549dc180744db486c6f4d3d04c502b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Security for swis 0.4.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page