Skip to main content

Simple Web-based Interface for Scanner written in Python and JavaScript.

Project description

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).

Recently, printing and uploading features have been added. The uploading feature allows to upload documents to the server and then print them. This is useful when you want to print documents from your phone or other devices.

Features

  • Scanning to png, jpeg formats with provided DPI and color palette
  • Cropping scanned images
  • Creating PDF documents
  • Browsing scanned documents
  • Printing files
  • Uploading

Requirements

  • Linux
  • SANE (Scanner Access Now Easy) properly configured (scanimage tool)
  • OpenPrinting configured on server (lp tool)
  • convert tool for pdf creation
  • Python >= 3.8
  • [Optionally] NPM (for frontend development purpose)

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 swis service stop
sudo pip install -U swis
sudo swis --ip [HOST IP ADDRESS] --port 5520 -u [USER] -g [GROUP] service install 
sudo swis service start

Cockpit

There is option to integrate SWIS with Cockpit. This feature is under early development.

Project is available at: https://github.com/rsusik/swis-cockpit

Screenshots

Welcome screen

Scanning parameters

Scanning in progress

Cropping scanned image

Side menu

List of scanned images

Creating PDF file from scanned documents

Uploading documents

Printing documents

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swis-0.6.0.tar.gz (609.0 kB view details)

Uploaded Source

Built Distribution

swis-0.6.0-py2.py3-none-any.whl (622.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file swis-0.6.0.tar.gz.

File metadata

  • Download URL: swis-0.6.0.tar.gz
  • Upload date:
  • Size: 609.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for swis-0.6.0.tar.gz
Algorithm Hash digest
SHA256 5ba73fac19f234a4ae0e9ca885f0494b7e331e2e3b02e5e229fb2777ccff35f4
MD5 56779f4b74bc8ec51888301d24e0658e
BLAKE2b-256 75b3c21104a2b7cd6496b92e506f388ed3b8458ed1dbc46cd7bcfb83f45cbea9

See more details on using hashes here.

File details

Details for the file swis-0.6.0-py2.py3-none-any.whl.

File metadata

  • Download URL: swis-0.6.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 622.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for swis-0.6.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0f65ca7e51aad645f08936f89d636e9ee4e825cf798c39f8092f0706c4fe8d12
MD5 f4cd2247b024d14714c771db48fcb004
BLAKE2b-256 aa9791ea93baf2a4714aecf819434164bbfb6d4293dfbd98218089b8da9921fa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page