{"id":15014905,"url":"https://github.com/adrianschlatter/ppf.datamatrix","last_synced_at":"2025-04-09T19:23:56.223Z","repository":{"id":57454430,"uuid":"368255232","full_name":"adrianschlatter/ppf.datamatrix","owner":"adrianschlatter","description":"Pure-python package to generate data matrix codes.","archived":false,"fork":false,"pushed_at":"2025-04-07T12:09:33.000Z","size":114,"stargazers_count":43,"open_issues_count":3,"forks_count":9,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-04-07T13:24:55.261Z","etag":null,"topics":["codecs","datamatrix","ipython","python","svg"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adrianschlatter.png","metadata":{"files":{"readme":"docs/README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-17T16:37:45.000Z","updated_at":"2025-04-07T12:09:38.000Z","dependencies_parsed_at":"2024-09-24T19:56:30.118Z","dependency_job_id":null,"html_url":"https://github.com/adrianschlatter/ppf.datamatrix","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":0.04347826086956519,"last_synced_commit":"28611d3ec5c98f69dc57396a34015e46399f3660"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianschlatter%2Fppf.datamatrix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianschlatter%2Fppf.datamatrix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianschlatter%2Fppf.datamatrix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianschlatter%2Fppf.datamatrix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adrianschlatter","download_url":"https://codeload.github.com/adrianschlatter/ppf.datamatrix/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247659662,"owners_count":20974754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codecs","datamatrix","ipython","python","svg"],"created_at":"2024-09-24T19:46:14.871Z","updated_at":"2025-04-09T19:23:56.196Z","avatar_url":"https://github.com/adrianschlatter.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg alt=\"ppf.datamatrix logo\" src=\"./imgs/logo.svg\" width=\"500em\"\u003e\n\n\u003cimg alt=\"pypi downloads/month\" src=\"https://img.shields.io/pypi/dm/ppf.datamatrix.svg\"\u003e\n\nppf.datamatrix is a pure-python package to generate datamatrix codes in SVG.\nAlso, it integrates nicely in IPython.\n\nppf.datamatrix has been ported from [datalog's\ndatamatrix-svg](https://github.com/datalog/datamatrix-svg), which is written in\njavascript.  If you like to see what you'll get before installation, check out\ntheir [nice web demo](https://datalog.github.io/demo/datamatrix-svg).\n\nCreating a datamatrix with ppf.datamatrix is as easy as\n\n```\nfrom ppf.datamatrix import DataMatrix\n\nmyDataMatrix = DataMatrix('Test!')\n```\n\nIf you are working in a graphically enabled IPython terminal, you'll see your\ndatamatrix immediately:\n\n![IPython integration](imgs/ipython.png)\n\nUsing the DataMatrix object, you get the SVG source like this:\n\n```\nmyDataMatrix.svg()\n\n'\u003c?xml version=\"1.0\" encoding=\"utf-8\" ?\u003e\u003csvg ...'\n```\n\n\u003cimg alt=\"Test! DataMatrix\" src=\"./imgs/Test.svg\" width=\"50em\"\u003e\n\nUse this on your website, to stamp a pdf, to uniquely identify a drawing, or\nwhatever you like.  Background and foreground color are configurable by\nspecifying fg and/or bg arguments.  Create a light blue matrix on a petrol\nbackground like this:\n\n```\nmyDataMatrix.svg(fg='#EEF', bg='#09D')\n```\n\n\u003cimg alt=\"Test! DataMatrix in red on blue background\" src=\"./imgs/Test_colored.svg\" width=\"50em\"\u003e\n\nNote: This sets the colors of the SVG.\nIt does *not* change the color of the representation inside your IPython\nterminal.\n\n\n## Advanced Features\n\nppf.datamatrix supports a [variety of\nencodings](https://en.m.wikipedia.org/wiki/Data_Matrix#Encoding), namely\nEDIFACT ('datamatrix.edifact'), ASCII ('datamatrix.ascii'), X12\n('datamatrix.X12'), C40 ('datamatrix.C40'), TEXT ('datamatrix.text').  These\nare used to store your message inside the datamatrix code efficiently.\nDataMatrix handles the encoding internally: If you just want to create a\nDataMatrix, you don't have to care about any of this.  If you want to do\nadvanced stuff (designing your own form of matrix code, maybe), ppf.datamatrix\nenables you to use its encoders.  After importing ppf.datamatrix, they are\navailable via the python codecs system:\n\n```\nimport ppf.datamatrix\n\nencoded = 'TEST'.encode('datamatrix.edifact')\nencoded\nb'\\xf0PT\\xd4'\n\ndecoded = encoded.decode('datamatrix.edifact')\ndecoded\n'TEST'\n```\n\nFurthermore it is possible to tell the DataMatrix class which codecs to use.\nThe default is to try all valid datamatrix codecs and select the one\nresulting in the shortest code. This line:\n\n```\nmyDataMatrix = DataMatrix('Test!', codecs=['C40', 'edifact'])\n```\n\nwill try (only) datamatrix.C40 and datamatrix.edifact and select the shorter\none. Of course, you can provide a list of one to enforce a particular\nencoding.\n\n\n# Installation\n\nppf.datamatrix is available via [pypi](https://pypi.org):\n\n```\npip install ppf.datamatrix\n```\n\n\n# Still reading?\n\nIf you read this far, you're probably not here for the first time. If you use\nand like this project, would you consider giving it a Github Star? (The button\nis at the top of this website.) If not, maybe you're interested in one of\n[my other projects](https://github.com/adrianschlatter/ppf.sample/blob/develop/docs/list_of_projects.md)?\n\n\n# Contributing\n\nDid you find a bug and would like to report it? Or maybe you've fixed it\nalready or want to help fixing it? That's great! Please read\n[CONTRIBUTING](./CONTRIBUTING.md) to learn how to proceed from there.\n\nTo help ascertain that contributing to this project is a pleasant experience,\nwe have established a [code of conduct](./CODE_OF_CONDUCT.md). You can expect\neveryone to adhere to it, just make sure you do as well.\n\n\n# Change Log\n\n* 0.2:      Fixed RTA problems causing erroneous datamatrices; added capability\n            to specify encoding(s) to use\n* 0.1.2:    Fixed bug in RS correction data for each block\n* 0.1.1:    Fixed bug in datamatrix.ascii encoding of digit pairs\n* 0.1:      Initial port of datamatrix–svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianschlatter%2Fppf.datamatrix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrianschlatter%2Fppf.datamatrix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianschlatter%2Fppf.datamatrix/lists"}