{"id":17990123,"url":"https://github.com/rdbende/chlorophyll","last_synced_at":"2025-09-20T20:31:34.161Z","repository":{"id":46903439,"uuid":"515531008","full_name":"rdbende/chlorophyll","owner":"rdbende","description":"A Tkinter widget that fills your code with color","archived":false,"fork":false,"pushed_at":"2024-05-11T14:21:19.000Z","size":43,"stargazers_count":43,"open_issues_count":7,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-01T09:02:54.452Z","etag":null,"topics":["chlorophyll","colors","editor","syntax-highlighter","syntax-highlighting","tkinter"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/chlorophyll/","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/rdbende.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":"2022-07-19T10:06:04.000Z","updated_at":"2024-10-24T22:16:18.000Z","dependencies_parsed_at":"2024-03-27T23:27:18.255Z","dependency_job_id":"c950f328-7dcf-4865-aaff-20f34875007e","html_url":"https://github.com/rdbende/chlorophyll","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdbende%2Fchlorophyll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdbende%2Fchlorophyll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdbende%2Fchlorophyll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdbende%2Fchlorophyll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rdbende","download_url":"https://codeload.github.com/rdbende/chlorophyll/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233686181,"owners_count":18714103,"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":["chlorophyll","colors","editor","syntax-highlighter","syntax-highlighting","tkinter"],"created_at":"2024-10-29T19:16:47.536Z","updated_at":"2025-09-20T20:31:28.896Z","avatar_url":"https://github.com/rdbende.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eChlorophyll\u003c/h1\u003e\n\n\u003e **Note**\n\u003e This module is the successor to [`tkcode`](https://github.com/rdbende/tkcode), as it is deprecated - please do not use it any more.\n\n## Description\nChlorophyll provides the `CodeView` widget for tkinter, which is a `Text` widget with syntax highlighting, line numbers, and works as a simple code editor. It is written in Python and uses the [`pygments`](https://pygments.org/) library for syntax highlighting and the [`TkLineNums`](https://www.github.com/Moosems/TkLineNums) module for line numbers.\n\n## Installation\n`pip install chlorophyll`\n\n## Development install\nFirst, fork the repo, then run these commands in your terminal\n```console\ngit clone https://github.com/your-username/chlorophyll\ncd chlorophyll\npython3 -m venv env\nsource env/bin/activate\npip install -e .\n```\n\n# Documentation\n\n### `CodeView` Widget\n|Options             |Description                     |Input                                         |\n|--------------------|--------------------------------|----------------------------------------------|\n|master              |The parent widget               |Tkinter widget                                |\n|lexer               |The Language lexer              |Pygments lexer                                |\n|color_scheme        |A color scheme for the code     |Dict, string, or toml file                    |\n|tab_width           |The width of a tab (`\\t`)       |Int                                           |\n|autohide_scrollbar  |Auto hide scrollbars            |Bool                                          |\n|linenums_border     |Border width of the line numbers|Int                                           |\n|default_context_menu|Enable context menus in CodeView|Bool                                          |\n|**kwargs            |Keyword arguments for the widget|Any keyword arguments given to a `Text` widget|\n\n#### Basic Usage:\n```python\nfrom tkinter import Tk\n\nimport pygments.lexers\nfrom chlorophyll import CodeView\n\nroot = Tk()\n\ncodeview = CodeView(root, lexer=pygments.lexers.RustLexer, color_scheme=\"monokai\")\ncodeview.pack(fill=\"both\", expand=True)\n\nroot.mainloop()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdbende%2Fchlorophyll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frdbende%2Fchlorophyll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdbende%2Fchlorophyll/lists"}