Code Monkey home page Code Monkey logo

limbus-qrtk's Introduction

limbus-qrtk

An extremely simplistic QR/DataMatrix/Barcode toolkit for the LImBuS project.

Setup

This project makes use of the dmtx library, so you need to install the headings for it to work.

If you are running a Fedora system, use the following command:

sudo dnf install libdmtx-devel

Now once you have done this, install limbus-qrtk using pip:

pip install git+https://www.github.com/AberystwythSystemsBiology/limbus-qrtk

Usage

There's an example in the examples directory of the repository, but the following is pretty much all you need to get started.

First of all, import the library using the following command:

>>> from limbus_qrtk import DataMatrixReader

Now, we want to load in an image of our DataMatrix array. It should look something like this:

>>> dmr = DataMatrixReader("./path/to/image.jpg")

If you would like to see what the data looks like before exporting, then simply run:

>>> dmr.to_img("./path/to/output.jpg")

This should produce something like:

If you're happy with the results, export it in the format that LImBuS utilises for its barcode functionality.

>>> dmr.to_limbus_json()
{
    "date": "2019-10-01 00:21:26.545732",
    "number_rows": 3,
    "number_columns": 3,
    "number_items": 9,
    "data": {
        "G802330674": {
            "row": 1,
            "column": 0
        },
        "G802330675": {
            "row": 1,
            "column": 1
        },
        "G802330663": {
            "row": 0,
            "column": 1
        } ...
}

Bug reporting and feature suggestions

Please report all bugs or feature suggestions to the issues tracker. Please do not email me directly as I'm struggling to keep track of what needs to be fixed.

We welcome all sorts of contribution, so please be as candid as you want(!)

License

This project is proudly licensed under the GNU General Public License v3.0.

limbus-qrtk's People

Contributors

dependabot[bot] avatar imgbotapp avatar keirono avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

aniruddh1

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.