{"id":33178589,"url":"https://github.com/GjjvdBurg/labella.py","last_synced_at":"2025-12-25T12:02:23.346Z","repository":{"id":54511463,"uuid":"52738862","full_name":"GjjvdBurg/labella.py","owner":"GjjvdBurg","description":"Python 3 clone of labella.js that generates SVG and TikZ PDF output","archived":false,"fork":false,"pushed_at":"2023-12-31T10:02:14.000Z","size":347,"stargazers_count":66,"open_issues_count":1,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-09-20T00:32:08.957Z","etag":null,"topics":["python3","tikz","tikz-figures","tikz-images","timeline-chart"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GjjvdBurg.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-02-28T19:24:02.000Z","updated_at":"2024-07-26T11:40:33.000Z","dependencies_parsed_at":"2024-01-07T18:57:13.954Z","dependency_job_id":null,"html_url":"https://github.com/GjjvdBurg/labella.py","commit_stats":{"total_commits":113,"total_committers":4,"mean_commits":28.25,"dds":0.07079646017699115,"last_synced_commit":"d4c2ef1bf984aeb16d506c2eb7eecd4ae1a4df32"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/GjjvdBurg/labella.py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GjjvdBurg%2Flabella.py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GjjvdBurg%2Flabella.py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GjjvdBurg%2Flabella.py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GjjvdBurg%2Flabella.py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GjjvdBurg","download_url":"https://codeload.github.com/GjjvdBurg/labella.py/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GjjvdBurg%2Flabella.py/sbom","scorecard":{"id":56792,"data":{"date":"2025-08-11","repo":{"name":"github.com/GjjvdBurg/labella.py","commit":"2786fab6a3e897dfd14358190fe16b2b169dabb4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/GjjvdBurg/labella.py/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/GjjvdBurg/labella.py/build.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 21 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T00:55:56.294Z","repository_id":54511463,"created_at":"2025-08-15T00:55:56.294Z","updated_at":"2025-08-15T00:55:56.294Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28028874,"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","status":"online","status_checked_at":"2025-12-25T02:00:05.988Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["python3","tikz","tikz-figures","tikz-images","timeline-chart"],"created_at":"2025-11-16T03:00:34.217Z","updated_at":"2025-12-25T12:02:23.341Z","avatar_url":"https://github.com/GjjvdBurg.png","language":"Python","funding_links":[],"categories":["Tools"],"sub_categories":["Timeline"],"readme":"==========\nlabella.py\n==========\n\n.. image:: https://github.com/GjjvdBurg/labella.py/workflows/build/badge.svg\n    :target: https://github.com/GjjvdBurg/labella.py/actions?query=workflow%3Abuild\n\n.. image:: https://badge.fury.io/py/labella.svg\n   :target: https://pypi.org/project/labella\n\n.. image:: https://pepy.tech/badge/labella\n   :target: https://pepy.tech/project/labella\n\nLabella.py is a Python 3 clone of `labella.js \n\u003chttps://github.com/twitter/labella.js\u003e`_ that supports all the features of \nlabella.js and addionally can generate TikZ PDF\nimages for use in LaTeX.\n\n**Note:** This package is for the most part a direct translation of the \noriginal `labella.js \u003chttps://github.com/twitter/labella.js\u003e`_ code to Python \n3. All the credit for the labella code goes to Krist Wongsuphasawat \n(`@kristw \u003chttps://twitter.com/kristw\u003e`_), I only added the code that \ngenerates PDF output. Labella.py also includes code from \n`d3 \u003chttps://github.com/mbostock/d3\u003e`_ for axis scaling, and \n`WebCola \u003chttps://github.com/tgdwyer/WebCola\u003e`_ for the VPSC code \n(label placement optimization).\n\nWhy?\n====\nI wrote this for multiple reasons, the most important of which is that I \nwanted to incorporate label graphs like the ones generated by `labella.js \n\u003chttps://github.com/twitter/labella.js\u003e`_ in PDF documents, but wasn't \nsatisfied with the PDF output generated by SVG-to-PDF converters.  \nAdditionally, it seemed like a fun way to learn some more Javascript, and \nlearn about how `labella.js \u003chttps://github.com/twitter/labella.js\u003e`_ works.\n\nScreenshots\n===========\nThese screenshots show the PDF output generated by labella.py (converted to \n.png)\n\nTime scale:\n\n.. image:: https://raw.githubusercontent.com/GjjvdBurg/labella.py/master/examples/timeline_kit_3.png\n    :alt: Example of Labella.py output for a timeline\n    :width: 100%\n    :align: center\n\nLinear scale:\n\n.. image:: https://raw.githubusercontent.com/GjjvdBurg/labella.py/master/examples/timeline_kit_5.png\n    :alt: Example of Labella.py output for a timeline\n    :width: 100%\n    :align: center\n\n\nUsage\n=====\nUsing labella.py is extremely similar to using \n`labella.js \u003chttps://github.com/twitter/labella.js\u003e`_. See the \n`examples \u003chttps://github.com/GjjvdBurg/labella.py/tree/master/examples\u003e`_ directory \nfor examples of how to use labella.py. These examples are translations of the examples \nincluded in labella.js and in `d3kit-timeline \u003chttps://kristw.github.io/d3kit-timeline/\u003e`_.\n\nFor ease of use only the Timeline interface is implemented, which works \nsimilar to `d3kit-timeline \u003chttps://kristw.github.io/d3kit-timeline/\u003e`_. Here is \na minimal working example for exporting to PDF::\n\n    \u003e\u003e\u003e from labella.scale import LinearScale\n    \u003e\u003e\u003e from labella.timeline import TimelineTex\n    \u003e\u003e\u003e tl = TimelineTex([\n      {'time': 1, 'text': 'Minimal'},\n      {'time': 2, 'text': 'Working'},\n      {'time': 3, 'text': 'Example'}\n      ], options={'scale': LinearScale()})\n    \u003e\u003e\u003e tl.export('minimal.tex')\n\nSee also the documentation `here \u003chttps://github.com/GjjvdBurg/labella.py/tree/master/docs\u003e`_.\n\nInstallation\n============\n\nLabella.py is available through PyPi, so you can do::\n\n    pip install labella\n\nto install it.\n\n**Note:** Labella.py requires a working LaTeX distribution for both SVG and \nPDF output (see also `the documentation \u003chttps://github.com/GjjvdBurg/labella.py/tree/master/docs\u003e`_), \nand has only been tested on Linux. If you run into problems, please open an issue on GitHub.\n\nAuthor\n======\n\nGertjan van den Burg (`@GjjvdBurg \u003chttps://twitter.com/GjjvdBurg\u003e`_).\n\nLicensed under the `Apache License Version 2.0 \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e`_.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGjjvdBurg%2Flabella.py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGjjvdBurg%2Flabella.py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGjjvdBurg%2Flabella.py/lists"}