{"id":26610328,"url":"https://github.com/thetrueender/decommenter","last_synced_at":"2025-06-12T00:34:41.343Z","repository":{"id":252885194,"uuid":"841792425","full_name":"theTrueEnder/decommenter","owner":"theTrueEnder","description":"Automatically decomment code, for use cases including minimization, removal of PII, and cleanup.  Support for recommenting the decommented code is included.","archived":false,"fork":false,"pushed_at":"2024-08-20T17:48:48.000Z","size":32,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T01:40:59.250Z","etag":null,"topics":["code","comment","decomment","python","recomment"],"latest_commit_sha":null,"homepage":"","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/theTrueEnder.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-08-13T03:53:16.000Z","updated_at":"2024-08-14T05:20:38.000Z","dependencies_parsed_at":"2024-08-20T19:42:18.622Z","dependency_job_id":null,"html_url":"https://github.com/theTrueEnder/decommenter","commit_stats":null,"previous_names":["thetrueender/decommenter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/theTrueEnder/decommenter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theTrueEnder%2Fdecommenter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theTrueEnder%2Fdecommenter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theTrueEnder%2Fdecommenter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theTrueEnder%2Fdecommenter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theTrueEnder","download_url":"https://codeload.github.com/theTrueEnder/decommenter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theTrueEnder%2Fdecommenter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259371171,"owners_count":22847531,"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":["code","comment","decomment","python","recomment"],"created_at":"2025-03-24T01:39:08.078Z","updated_at":"2025-06-12T00:34:41.320Z","avatar_url":"https://github.com/theTrueEnder.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# decommenter\nAutomatically decomment code, for use cases including minimization, removal of PII, and cleanup.\n\nAdditionally, `decommenter` supports recommenting the decommented code by exporting the extracted comments to a separate file. Using the `recomment` mode, those comments can be reinserted.\n\n## Usage\n\n**Requires Python 3.8+ to be installed** \n\n\u003e It is possible older versions work, but I cannot guarantee functionality. `decommenter` was developed in 3.12.\n```c\npython cli.py [-h] [--mode {decomment,recomment}] [--file [FILE]]\n\noptions:\n  -h, --help            show this help message and exit\n  -m, --mode {decomment,recomment}\n                        select mode of operation (decomment or recomment)\n  f, --file [FILENAME]\n                        filename or path to the target file\n```\n\n## Supported Languages:\n\n- [X] Python-style comments*\n- [X] C-style comments: UNSTABLE (see below)\n\n\u003c!-- - [X] Python\n- [ ] JS\n- [ ] Java\n- [ ] C\n- [ ] C++\n- [ ] Go\n- [ ] Custom\n- ...\n--\u003e\n\n### Python-Style Comments\n\nThis program assumes that comments adhere to the [PEP8](https://peps.python.org/pep-0008/#comments) standard for Python comments. This means that comments should follow the `# .*` pattern. Technically, inline comments should have two spaces between the `#` and the end of the code, but the `decommenter` regex does adjust for inlines that do not follow this (the recommenter follows the two-space pattern). \n\nDocstring removal is not implemented at this time. Block comments using `'''` or `\"\"\"` is not in adherence to PEP8 (see above) and will not be removed.\n\n\u003e *Python-style comments in other languages (e.g. Ruby, Perl, and R) are allowed to run but have not been tested and are therefore not guaranteed to work.\n\n### C-Style Comments\n\nInline and newline C-style comments (i.e. non-block comments) work fine with the code on `dev`. There is a tenative processor for block comments, but it is unstable and inconsistent. A fix will arrive in the near future (this requires restructuring the entire processor from a line-by-line regex logic to multiline regex logic). If you want to try it out, clone the code on the `dev` branch.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthetrueender%2Fdecommenter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthetrueender%2Fdecommenter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthetrueender%2Fdecommenter/lists"}