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

Uploaded Source

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