{"id":17208200,"url":"https://github.com/stephanlachnit/update_copyright_years","last_synced_at":"2026-04-30T03:35:41.962Z","repository":{"id":101216893,"uuid":"450203076","full_name":"stephanlachnit/update_copyright_years","owner":"stephanlachnit","description":"Update copyright years in a git repo","archived":false,"fork":false,"pushed_at":"2023-01-24T13:38:47.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-26T02:42:08.766Z","etag":null,"topics":["copyright","git","python","python3"],"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/stephanlachnit.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,"zenodo":null}},"created_at":"2022-01-20T17:57:59.000Z","updated_at":"2025-02-17T20:11:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"96989e95-a2ba-46cf-95f2-8751ac5ef8b7","html_url":"https://github.com/stephanlachnit/update_copyright_years","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/stephanlachnit/update_copyright_years","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephanlachnit%2Fupdate_copyright_years","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephanlachnit%2Fupdate_copyright_years/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephanlachnit%2Fupdate_copyright_years/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephanlachnit%2Fupdate_copyright_years/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stephanlachnit","download_url":"https://codeload.github.com/stephanlachnit/update_copyright_years/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephanlachnit%2Fupdate_copyright_years/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32454140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"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":["copyright","git","python","python3"],"created_at":"2024-10-15T02:47:49.543Z","updated_at":"2026-04-30T03:35:41.957Z","avatar_url":"https://github.com/stephanlachnit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nSPDX-FileCopyrightText: 2022 Stephan Lachnit \u003cstephanlachnit@debian.org\u003e\n\nSPDX-License-Identifier: CC-BY-4.0\n--\u003e\n\n# Update copyright years for files in a git repository\n\n[![Lint](https://github.com/stephanlachnit/update_copyright_years/actions/workflows/lint.yml/badge.svg)](https://github.com/stephanlachnit/update_copyright_years/actions/workflows/lint.yml)\n[![REUSE status](https://api.reuse.software/badge/github.com/stephanlachnit/update_copyright_years)](https://api.reuse.software/info/github.com/stephanlachnit/update_copyright_years)\n\nThis Python script can automatically update the copyright year range for files in a git repository.\nThe initial year is determined via `git log --follow --format=%ad \u003cfile\u003e`, meaning it takes the year when the first commit for a particular file - following renames - was authored. All times are taken in UTC.\nYou can check the commits on a particular file yourself using `git log --follow --reverse \u003cfile\u003e`.\n\nTo aviod replacing random number that happen to match the pattern, you can specify an appendix and prependix to the regex pattern, or provide your own regex pattern.\n\nYou can also specify to only run the script on certain paths and specify paths to exclude.\n\nThe interace is given below:\n```\nusage: update_copyright_years.py [-h] [-v] [-a APPENDIX] [-p PREPENDIX] [-y YEARS] [-x EXCLUDE [EXCLUDE ...]] [-f FILES [FILES ...]]\n\nUpdate copyright years for files in a git repo.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -v, --verbose         enable verbose output\n  -a APPENDIX, --appendix APPENDIX\n                        pattern to append to year matching, i.e. \u003cyears\u003e \u003cpattern\u003e\n  -p PREPENDIX, --prependix PREPENDIX\n                        pattern to prepend to year matching, i.e. \u003cpattern\u003e \u003cyears\u003e\n  -y YEARS, --years YEARS\n                        regex pattern to match years\n  -x EXCLUDE [EXCLUDE ...], --exclude EXCLUDE [EXCLUDE ...]\n                        files to exclude\n  -f FILES [FILES ...], --files FILES [FILES ...]\n                        only run on specified files\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephanlachnit%2Fupdate_copyright_years","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephanlachnit%2Fupdate_copyright_years","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephanlachnit%2Fupdate_copyright_years/lists"}