{"id":15565563,"url":"https://github.com/jelmer/debmutate","last_synced_at":"2025-10-02T21:31:29.556Z","repository":{"id":61029715,"uuid":"277669470","full_name":"jelmer/debmutate","owner":"jelmer","description":"Manipulate Debian packages while preserving formatting","archived":false,"fork":false,"pushed_at":"2024-08-21T14:03:19.000Z","size":744,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-12T18:50:38.049Z","etag":null,"topics":["debian"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jelmer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"jelmer"}},"created_at":"2020-07-06T23:27:15.000Z","updated_at":"2024-08-21T14:03:23.000Z","dependencies_parsed_at":"2024-08-21T15:21:43.414Z","dependency_job_id":"1815d500-0355-4784-ae01-030d3109f279","html_url":"https://github.com/jelmer/debmutate","commit_stats":null,"previous_names":[],"tags_count":57,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jelmer%2Fdebmutate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jelmer%2Fdebmutate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jelmer%2Fdebmutate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jelmer%2Fdebmutate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jelmer","download_url":"https://codeload.github.com/jelmer/debmutate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235043924,"owners_count":18927010,"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":["debian"],"created_at":"2024-10-02T16:59:13.831Z","updated_at":"2025-10-02T21:31:29.209Z","avatar_url":"https://github.com/jelmer.png","language":"Python","funding_links":["https://github.com/sponsors/jelmer"],"categories":[],"sub_categories":[],"readme":"Debmutate is a set of Python modules for manipulating the control files of\nDebian packages, with the ability to preserve the existing formatting of\nthe control files.\n\nIt's built on top of the excellent\n[python-debian](https://salsa.debian.org/python-debian-team/python-debian)\nlibrary, and was originally extracted from\n[lintian-brush](https://salsa.debian.org/jelmer/lintian-brush).\n\nTo modify one of the control files, use one of the context managers to edit the file.\n\nFor example, for debian/control:\n\n```python\n\nfrom debmutate.control import ControlEditor\n\nwith ControlEditor(path='debian/control') as control:\n    print(control.source['Maintainer'])\n    control.source['Maintainer'] = \"Jelmer Vernooĳ \u003cjelmer@debian.org\u003e\"\n```\n\nOr for debian/changelog:\n\n```python\n\nfrom debmutate.changelog import ChangelogEditor\n\nwith ChangelogEditor(path='debian/changelog') as editor:\n   editor.add_entry(['Some entry'])\n```\n\nOnce you leave the context manager, the changes will be written to disk if\nthere were any. If the editor is unable to preserve the formatting of the\ncontrol file, it will raise a FormattingUnpreservable error.\n\nIf the control file that was edited was generated from another control file\n(e.g. debian/control.in), debmutate will attempt to update that file instead\nand then regenerate debian/control. If it is unable to do so, it will raise\na GeneratedFile exception.\n\nThe file will be left as-is if an exception is raised, or if the .cancel()\nmethod is called.\n\ndebmutate currently provides editors for the following control files:\n\n * debian/changelog\n * debian/copyright\n * debian/control\n * debian/patches/series\n * debian/tests/control\n * debian/watch\n * debian/maintscripts, debian/\\*.maintscripts\n * debian/source/lintian-overrides, debian/\\*.lintian-overrides\n * debian/debcargo.toml\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjelmer%2Fdebmutate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjelmer%2Fdebmutate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjelmer%2Fdebmutate/lists"}