{"id":13585084,"url":"https://github.com/opusonesolutions/asciigraf","last_synced_at":"2026-04-06T06:35:06.286Z","repository":{"id":48773853,"uuid":"107311624","full_name":"opusonesolutions/asciigraf","owner":"opusonesolutions","description":"A python library for making ascii-art into network graphs.","archived":false,"fork":false,"pushed_at":"2025-04-14T15:49:11.000Z","size":147,"stargazers_count":37,"open_issues_count":2,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-28T05:34:43.722Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opusonesolutions.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"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":"2017-10-17T18:59:24.000Z","updated_at":"2025-07-30T14:54:20.000Z","dependencies_parsed_at":"2024-08-27T05:21:52.028Z","dependency_job_id":"12252be6-5f6a-4534-ad32-161abd13f222","html_url":"https://github.com/opusonesolutions/asciigraf","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/opusonesolutions/asciigraf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opusonesolutions%2Fasciigraf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opusonesolutions%2Fasciigraf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opusonesolutions%2Fasciigraf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opusonesolutions%2Fasciigraf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opusonesolutions","download_url":"https://codeload.github.com/opusonesolutions/asciigraf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opusonesolutions%2Fasciigraf/sbom","scorecard":{"id":711341,"data":{"date":"2025-08-11","repo":{"name":"github.com/opusonesolutions/asciigraf","commit":"8e868080fe97b11de42093737e1b25663c87546b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5,"checks":[{"name":"Code-Review","score":8,"reason":"Found 8/10 approved changesets -- score normalized to 8","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":"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":"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":"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/python-package.yaml:1","Warn: no topLevel permission defined: .github/workflows/python-publish.yaml: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":"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/python-package.yaml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/opusonesolutions/asciigraf/python-package.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yaml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/opusonesolutions/asciigraf/python-package.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yaml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/opusonesolutions/asciigraf/python-package.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yaml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/opusonesolutions/asciigraf/python-package.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yaml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/opusonesolutions/asciigraf/python-package.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yaml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/opusonesolutions/asciigraf/python-package.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yaml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/opusonesolutions/asciigraf/python-publish.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yaml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/opusonesolutions/asciigraf/python-publish.yaml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yaml:25","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yaml:40","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yaml:41","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yaml:77","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yaml:78","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yaml:29","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yaml:30","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   7 pipCommand 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":"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":"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":"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":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/python-publish.yaml:16"],"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt: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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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 30 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-22T08:17:10.263Z","repository_id":48773853,"created_at":"2025-08-22T08:17:10.263Z","updated_at":"2025-08-22T08:17:10.263Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31463014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"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":[],"created_at":"2024-08-01T15:04:44.141Z","updated_at":"2026-04-06T06:35:06.280Z","avatar_url":"https://github.com/opusonesolutions.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"asciigraf\n=========\n\n.. image:: https://img.shields.io/badge/License-MIT-yellow.svg\n    :target: https://opensource.org/licenses/MIT\n\n.. image:: https://badge.fury.io/py/asciigraf.svg\n    :target: https://pypi.python.org/pypi/asciigraf\n\n.. image:: https://img.shields.io/pypi/pyversions/asciigraf.svg\n    :target: https://pypi.python.org/pypi/asciigraf\n\nAsciigraf is a python library that turns ascii diagrams of networks into\nnetwork objects. It returns a `networkx \u003chttps://networkx.github.io/\u003e`__\ngraph of nodes for each alpha-numeric element in the input text; nodes\nare connected in the graph to match the edges represented in the diagram\nby ``-``, ``/``, ``\\`` and ``|``.\n\nInstallation\n------------\n\nAsciigraf can be installed from pypi using pip:\n\n.. code::\n\n    ~/$ pip install asciigraf\n\nUsage\n-----\n\nAsciigraf expects a string containg a 2-d ascii diagram. Nodes can be an\nalphanumeric string composed of words, sentences and punctuation (for a look at\nwhat is all tested to work, see the `node recognition tests`_). Edges can be\ncomposed of ``-``, ``/``, ``\\`` and ``|``.\n\n.. _node recognition tests: https://github.com/opusonesolutions/asciigraf/blob/main/tests/test_node_match.py\n\n.. code:: python\n\n\n    import asciigraf\n\n    network = asciigraf.graph_from_ascii(\"\"\"\n              NodeA-----\n                       |\n                       |---NodeB\n                                         \"\"\")\n\n    print(network)\n    \u003e\u003e\u003e \u003cnetworkx.classes.graph.Graph at 0x7f24c3a8b470\u003e\n\n    print(network.edges())\n    \u003e\u003e\u003e [('NodeA', 'NodeB')]\n\n    print(network.nodes())\n    \u003e\u003e\u003e ['NodeA', 'NodeB']\n\n\nNetworkx provides tools to attach data to graphs, nodes and edges, and asciigraf\nleverages these in a number of ways; in the example below you can see that\nasciigraf uses this to attach a ``x, y`` position tuple to each node\nindicating the line/col position of each node ( *0,0* is at the top-left).\nIt also attaches a ``length`` attribute\nto each edge which matches the number of characters in that edge, as well\nas a list of positions for each character an edge. In addition, the input data\nis attached as a graph attribute ``ascii_string`` for reference.\n\n.. code:: python\n\n    print(network.nodes(data=True))\n    \u003e\u003e\u003e [('NodeA', {'position': (10, 1)}), ('NodeB', {'position': (23, 3)})]\n\n    print(network.edges(data=True))\n    \u003e\u003e\u003e [('NodeA', 'NodeB', OrderedDict([('length', 10), 'points', [...]))]\n    \n    print(network.edge['NodeA']['NodeB']['points'])\n    \u003e\u003e\u003e [(15, 1), (16, 1), (17, 1), (18, 1),\n         (19, 1), (19, 2), (19, 3), (20, 3), (21, 3), (22, 3)]\n\n    print(network.graph[\"ascii_string\"])\n    \u003e\u003e\u003e\n        NodeA-----\n                 |\n                 |---NodeB\n\n\nAsciigraf also lets you annotate the edges of graphs using in-line labels ---\ndenoted by parentheses. The contents of the label will be attached to the edge\non which it is drawn with the attribute name ``label``.\n\n.. code:: python\n\n    network = asciigraf.graph_from_ascii(\"\"\"\n\n        A---(nuts)----B----(string)---C\n                      |\n                      |\n                      |\n                      D---(pebbles)----E\n\n    \"\"\")\n\n    print(network.get_edge_data(\"A\", \"B\")[\"label\"])\n    \u003e\u003e\u003e nuts\n\n    print(network.get_edge_data(\"B\", \"C\")[\"label\"])\n    \u003e\u003e\u003e string\n\n    print(network.get_edge_data(\"D\", \"E\")[\"label\"])\n    \u003e\u003e\u003e pebbles\n\n    print(hasattr(network.get_edge_data(\"B\", \"D\"), \"label\"))\n    \u003e\u003e\u003e False\n\n\nHave fun!\n\n.. code:: python\n\n    import asciigraf\n\n\n    network = asciigraf.graph_from_ascii(\"\"\"\n              s---p----1---nx\n             /    |        |\n            /     |        0---f\n           6l-a   c--\n          /   |      \\--k\n         /   ua         |  9e\n        q      \\        | /\n                \\-r7z   jud\n                    \\    |\n                     m   y\n                      \\  |\n                       v-ow\n                                 \"\"\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopusonesolutions%2Fasciigraf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopusonesolutions%2Fasciigraf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopusonesolutions%2Fasciigraf/lists"}