{"id":21516372,"url":"https://github.com/jsf0/chartctl","last_synced_at":"2025-03-17T16:20:10.210Z","repository":{"id":258426158,"uuid":"873901975","full_name":"jsf0/chartctl","owner":"jsf0","description":"A declarative flowchart maker for the command line","archived":false,"fork":false,"pushed_at":"2024-10-17T01:00:51.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T02:58:57.362Z","etag":null,"topics":["flowchart"],"latest_commit_sha":null,"homepage":"http://kernelpanic.life/software/declarative-flowchart-making.html","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsf0.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-16T23:16:54.000Z","updated_at":"2024-10-17T01:00:55.000Z","dependencies_parsed_at":"2024-10-19T00:11:07.325Z","dependency_job_id":null,"html_url":"https://github.com/jsf0/chartctl","commit_stats":null,"previous_names":["jsf0/chartctl"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsf0%2Fchartctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsf0%2Fchartctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsf0%2Fchartctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsf0%2Fchartctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsf0","download_url":"https://codeload.github.com/jsf0/chartctl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244066191,"owners_count":20392407,"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":["flowchart"],"created_at":"2024-11-24T00:20:50.658Z","updated_at":"2025-03-17T16:20:10.169Z","avatar_url":"https://github.com/jsf0.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chartctl\n\nThis is a Python command-line tool that generates flowcharts based on a JSON configuration file, and outputs them as a PNG.\n\n## Requirements\n\n- `graphviz` Python package (`pip install graphviz`)\n- Graphviz binary (for the `dot` command)\n\n## Installation\n\n1. Clone this repository or download the script:\n\n    ```bash\n    git clone https://github.com/jsf0/chartctl.git\n    cd chartctl\n    ```\n\n2. Install the required Python package:\n\n    ```bash\n    pip install graphviz\n    ```\n\n## Usage\n\n### Command-Line Options\n\n- `-i, --input` (required): Path to the JSON configuration file.\n- `-o, --output` (optional): Path to save the output PNG file (without the PNG extension). Defaults to `flowchart.png`.\n\n### Examples\n\nHere's a simple config file:\n```\n{\n  \"nodes\": {\n    \"start\": { \"label\": \"Start Process\" },\n    \"approval\": { \"label\": \"Request Approval\" },\n    \"approved\": { \"label\": \"Approved\" },\n    \"rejected\": { \"label\": \"Rejected\" },\n    \"retry\": { \"label\": \"Retry Request\" },\n    \"end\": { \"label\": \"End Process\" }\n  },\n  \"connectors\": [\n    { \"from\": \"start\", \"to\": \"approval\" },\n    { \"from\": \"approval\", \"to\": \"approved\", \"label\": \"Yes\" },\n    { \"from\": \"approval\", \"to\": \"rejected\", \"label\": \"No\" },\n    { \"from\": \"rejected\", \"to\": \"retry\", \"label\": \"Retry?\" },\n    { \"from\": \"retry\", \"to\": \"approval\" },\n    { \"from\": \"approved\", \"to\": \"end\" }\n  ]\n}\n```\n\"Nodes\" are the start/end blocks, processes, decision points, or anything else you want in your flowchart. \"Connectors\" are the lines that connect them together. You can label nodes and connectors however you want.\n\nYou can create the PNG out of the JSON above with the following command:\n```bash\nchartctl.py -i request_process.json\n```\n\nIt will create the following PNG:\n\n\n![simple chart](https://kernelpanic.life/img/request_process.png)\n\n\nYou can optionally add colors and custom shapes for the nodes and connectors too:\n```\n{\n  \"nodes\": {\n    \"start\": { \"label\": \"Start Process\", \"shape\": \"oval\", \"fillcolor\": \"lightblue\", \"style\": \"filled\" },\n    \"approval\": { \"label\": \"Request Approval\", \"shape\": \"diamond\", \"fillcolor\": \"yellow\", \"style\": \"filled\" },\n    \"approved\": { \"label\": \"Approved\", \"shape\": \"rectangle\", \"fillcolor\": \"lightgreen\", \"style\": \"filled\" },\n    \"rejected\": { \"label\": \"Rejected\", \"shape\": \"rectangle\", \"fillcolor\": \"lightcoral\", \"style\": \"filled\" },\n    \"retry\": { \"label\": \"Retry Request\", \"shape\": \"rectangle\", \"fillcolor\": \"lightgray\", \"style\": \"filled\" },\n    \"end\": { \"label\": \"End Process\", \"shape\": \"oval\", \"fillcolor\": \"lightblue\", \"style\": \"filled\" }\n  },\n  \"connectors\": [\n    { \"from\": \"start\", \"to\": \"approval\" },\n    { \"from\": \"approval\", \"to\": \"approved\", \"label\": \"Yes\", \"color\": \"green\" },\n    { \"from\": \"approval\", \"to\": \"rejected\", \"label\": \"No\", \"color\": \"red\" },\n    { \"from\": \"rejected\", \"to\": \"retry\", \"label\": \"Retry?\", \"color\": \"orange\" },\n    { \"from\": \"retry\", \"to\": \"approval\" },\n    { \"from\": \"approved\", \"to\": \"end\" }\n  ]\n}\n```\n\nThis will generate a more colorful flowchart:\n\n\n![flowchart with shapes and colors](https://kernelpanic.life/img/request_process_2.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsf0%2Fchartctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsf0%2Fchartctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsf0%2Fchartctl/lists"}