Giter VIP home page Giter VIP logo

mayan-barcodes's Introduction

mayan-barcodes

Barcode scanning module for Mayan EDMS

Heavily based on various apps from Mayan itself.

Uses PIL and pyzbar to scan for bar and QR codes into uploaded documents, and stores them into a Barcode object.

Install

  1. Get the code (d'oh!)
  2. Add the path where you installed it to the PYTHONPATH in Mayan's scripts.
  3. Activate the Mayan virtualenv
  4. Install requirements (Pillow and pyzbar) with pip using requirements.txt
  5. Add 'mayan_barcodes' to INSTALLED_APPS, tipically in mayan/settings/base.py or any other settings file.
  6. Run migration for mayan-barcodes (manage.py migrate mayan_barcodes)

Usage

Configure the DocumentTypes

Go to System->Configuration->Document Types. For each DocumentType you'll see a new button called "Setup barcodes". Setup the document types that you want to be scanned.

And you're ready to go!

Upload a file of a type that has scanning enabled, and the scanned barcodes will be displayed in the document page.

An icon shows in the vertical toolbar

The barcodes show in a page like this:

Batch Scan

In the Tools menu, you'll find an action called Scan barcodes per document type, very similar to the one used for OCR or process File Metadata.

It let's you choose the Document Types and then it batch process them.

Acessing barcodes

Barcodes of a document, document version, or page are accessible via the barcodes tag. Examples:

# All the document barcodes
{{ document.barcodes }}
# First barcode
{{ document.barcodes.first }}
# First barcode data
{{ document.barcodes.first.data }}
# First barcode type
{{ document.barcodes.first.type }}
# The same applies to document_version
{{ document.latest_version.barcodes.first }}
{% for barcode in document.latest_version.barcodes %}Barcode {{ barcode.data }}
{% endfor %}

# Document pages `barcodes` is not a queryset but a RelatedManager, so you need to call `all()`
# if you want to access all the barcodes.
{{ document.latest_version.pages.last.barcodes.all }}
# But its the same for getting single barcodes
{{ document.latest_version.pages.last.barcodes.first }}

Credits

(c) Copyroght 2020 - Julio Santa Cruz [email protected] Released under the GPLv3 License. A copy of that licencse is in the COPYING file.

Some code borrowed and then modified from the beautiful Mayan EDMS which is licensed under the Apache License 2.0.

mayan-barcodes's People

Contributors

bartacruz avatar

Stargazers

Jurin Liyun avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.