Skip to main content

This is a document scanner

Project description

Docscan

Downloads Downloads Downloads License

Docscan is a document scanner. Take a photo of your documents and frame it.

Installation

Install it from pypi

    pip install docscan

Usage as a cli

Scan from a remote image

    curl -s http://input.png | docscan > output.png

Scan from a local file

    docscan -o path/to/output.png path/to/input.png

Scan from all images in a folder

    docscan -p path/to/inputs

Usage as a server

Start the server

    docscan-server

Open your browser to

    http://localhost:5000?url=http://image.png

Also you can send the file as a FormData (multipart/form-data):

    <form action="http://localhost:5000" method="post" enctype="multipart/form-data">
       <input type="file" name="file"/>
       <input type="submi"t value="upload"/>
    </form>

Usage as a library

In app.py

import sys
from docscan.doc import scan

sys.stdout.buffer.write(scan(sys.stdin.buffer.read()))

Then run

    cat input.png | python app.py > out.png

License

Copyright (c) 2020-present Daniel Gatis

Licensed under MIT License

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

docscan-1.0.4.tar.gz (6.4 kB view details)

Uploaded Source

File details

Details for the file docscan-1.0.4.tar.gz.

File metadata

  • Download URL: docscan-1.0.4.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for docscan-1.0.4.tar.gz
Algorithm Hash digest
SHA256 4b99b922f367d518ae58d7a773be0de30e5f2b6174f2697776a32889323abf97
MD5 c6d733f14792df3c6c304844f02ab247
BLAKE2b-256 521258324ff97345b2fd654d77a7876e011b6d6606392eb1793cdc553a2f017c

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