{"id":15779582,"url":"https://github.com/aldaviva/copywriter","last_synced_at":"2026-03-14T23:44:27.286Z","repository":{"id":216944784,"uuid":"742750257","full_name":"Aldaviva/Copywriter","owner":"Aldaviva","description":"© Automatically update copyright years in project sources. Handles .NET SDK-style .csproj files and .NET AssemblyInfo.cs files.","archived":false,"fork":false,"pushed_at":"2025-01-10T11:13:02.000Z","size":70,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-08T17:41:01.174Z","etag":null,"topics":["copyright","csproj"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aldaviva.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"License.txt","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},"funding":{"custom":["https://paypal.me/aldaviva"]}},"created_at":"2024-01-13T08:53:41.000Z","updated_at":"2025-01-10T11:13:05.000Z","dependencies_parsed_at":"2024-01-13T20:34:41.818Z","dependency_job_id":"5d7d5afd-2feb-4e57-aa13-f91f905c9a6b","html_url":"https://github.com/Aldaviva/Copywriter","commit_stats":null,"previous_names":["aldaviva/copywriter"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Aldaviva/Copywriter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aldaviva%2FCopywriter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aldaviva%2FCopywriter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aldaviva%2FCopywriter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aldaviva%2FCopywriter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aldaviva","download_url":"https://codeload.github.com/Aldaviva/Copywriter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aldaviva%2FCopywriter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30521654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-14T19:51:21.629Z","status":"ssl_error","status_checked_at":"2026-03-14T19:51:12.959Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","csproj"],"created_at":"2024-10-04T18:20:33.547Z","updated_at":"2026-03-14T23:44:27.280Z","avatar_url":"https://github.com/Aldaviva.png","language":"C#","funding_links":["https://paypal.me/aldaviva"],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://raw.githubusercontent.com/Aldaviva/Copywriter/master/Copywriter/%C2%A9.ico\" height=\"24\" alt=\"©\"\u003e Copywriter\n===\n\n[![GitHub Actions](https://img.shields.io/github/actions/workflow/status/Aldaviva/Copywriter/dotnet.yml?branch=master\u0026logo=github)](https://github.com/Aldaviva/Copywriter/actions/workflows/dotnet.yml)\n\nAutomatically update copyright years in project sources.\n\n\u003c!-- MarkdownTOC autolink=\"true\" bracket=\"round\" autoanchor=\"false\" levels=\"1,2\" --\u003e\n\n- [Quick Start](#quick-start)\n- [Behavior](#behavior)\n- [Supported files](#supported-files)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Usage](#usage)\n\n\u003c!-- /MarkdownTOC --\u003e\n\n## Quick Start\n```ps1\nCopywriter --max-depth 3 --dry-run\nCopywriter --max-depth 3\n```\n\nAfter showing a preview, this will change all of the copyright years to the current year in supported files in the current working directory and all subdirectories up to 3 levels deep.\n\n## Behavior\n\nFor each [supported file](#supported-files) found in the given [parent directory](#parentdirectory), all copyright strings will be searched for four-digit numbers. The **last occurrence** in each copyright string will be replaced with the new year. This means that ranges and lists should correctly update the latest year only. For example, in 2026 the following copyright string would only update the year 2023, not 1994, 2009, 2010, or 2019.\n\n```diff\n- © 1994-2009 Sun, 2010-2019 Oracle, 2019-2023 Apache\n+ © 1994-2009 Sun, 2010-2019 Oracle, 2019-2026 Apache\n```\n\nThe rest of the string will be left unmodified, including names, punctutation, and symbols like ©. This program does not rely on any formats in the copyright string besides a four-digit year appearing somewhere.\n\n## Supported files\n\n### .NET SDK-style project\n\n.NET projects with the `\u003cProject Sdk=\"Microsoft.NET.Sdk*\"\u003e` root element and [`\u003cGenerateAssemblyInfo\u003e`](https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#generateassemblyinfo) not set to `false` can use the [`\u003cCopyright\u003e`](https://learn.microsoft.com/en-us/dotnet/api/system.reflection.assemblycopyrightattribute) property.\n\n```xml\n\u003cProject Sdk=\"Microsoft.NET.Sdk\"\u003e\n    \u003cPropertyGroup\u003e\n        \u003cCopyright\u003e© 2023 $(Authors)\u003c/Copyright\u003e\n    \u003c/PropertyGroup\u003e\n\u003c/Project\u003e\n```\n\nIf the current year is 2026, you can use this program to automatically update the property to\n\n```xml\n\u003cCopyright\u003e© 2026 $(Authors)\u003c/Copyright\u003e\n```\n\n### MSBuild default folder properties\n\nFolders with a [`Directory.Build.props`](https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory#directorybuildprops-and-directorybuildtargets) file can set the `\u003cCopyright\u003e` property for all .NET projects in the current and all descendant folders.\n\nThe syntax is the same as [.NET SDK-style projects](#net-sdk-style-project).\n\n### .NET AssemblyInfo file\n\n.NET projects with the `AssemblyInfo.cs` file (such as .NET Framework projects built with an MSBuild-style project, or any .NET SDK-style project built with `\u003cGenerateAssemblyInfo\u003e` set to `false`) can use the [`[assembly: AssemblyCopyright]`](https://learn.microsoft.com/en-us/dotnet/api/system.reflection.assemblycopyrightattribute) assembly-level attribute.\n\n```cs\nusing System.Reflection;\n\n[assembly: AssemblyCopyright(\"© 2023 Ben Hutchison\")]\n```\n\nIf the current year is 2026, you can use this program to automatically update the attribute to\n\n```cs\n[assembly: AssemblyCopyright(\"© 2026 Ben Hutchison\")]\n```\n\n## Prerequisites\n- [.NET 10 Runtime or later](https://dotnet.microsoft.com/en-us/download)\n\n## Installation\n1. Download [`Copywriter.exe`](https://github.com/Aldaviva/Copywriter/releases/latest/download/Copywriter.exe) from the [latest release](https://github.com/Aldaviva/Copywriter/releases/latest).\n\n## Usage\n\n### Syntax\n```ps1\nCopywriter [options] \u003cparentDirectory\u003e\n```\n\n### Example\n```ps1\nCopywriter --max-depth 3 --include-name 'Ben' --include-name '$(Authors)' ~\\Documents\\Projects\n```\n\n### Options\n\n#### `parentDirectory`\nThe directory in which to search for `.csproj` and `AssemblyInfo.cs` files.\n\nOptional. If omitted, it uses the current working directory.\n\n```ps1\n# update files in current working directory\nCopywriter\n\n# update files in a specific directory\nCopywriter \"C:\\Users\\Ben\\Documents\\Projects\\Copywriter\\Copywriter\"\n```\n\n#### `-n`, `--dry-run`\nPreview the changes that would be made, but don't actually save them.\n\n```ps1\nCopywriter -n\n```\n\n#### `-d \u003cN\u003e`, `--max-depth \u003cN\u003e`\nRecursively search for files in at most `\u003cN\u003e` levels of subdirectories.\n\nOptional. If omitted, defaults to `0`, which only searches for files in the current working directory, but not in any of its subdirectories.\n\n```ps1\nCopywriter -d 3 \"C:\\Users\\Ben\\Documents\\Projects\"\n```\n\n#### `-y \u003cY\u003e`, `--year \u003cY\u003e`\nSet the copyright year to be this custom year, instead of the current year.\n\nUseful if you're preparing a future release on December 31, for example.\n\n```ps1\nCopywriter -y 2027\n```\n\n#### `--exclude-dir \u003cD\u003e`\nSpecify a directory name that should not be searched for files. All subdirectories and files will be excluded if this directory name appears at any level in their path \u0026mdash; it's not relative to the `parentDirectory`, and can't contain multiple path segments like `a/b`.\n\nYou can pass this multiple times to exclude multiple directories.\n\n```ps1\nCopywriter --exclude-dir \"lib\" --exclude-dir \"vendor\" --exclude-dir \"thirdparty\"\n```\n\n#### `--exclude-name \u003cN\u003e`\nDo not update the copyright text if this string appears within it.\n\nYou can pass this multiple times to skip copyright lines that contain **any** of the excluded strings. Exclusion takes precedence over inclusion.\n\n```ps1\nCopywriter --exclude-name 'Microsoft'\n```\n\n#### `--include-name \u003cN\u003e`\nOnly update the copyright text if this string appears within it.\n\nYou can pass this multiple times to skip copyright lines that do **not** contain **any** of the included strings. Exclusion takes precedence over inclusion.\n\n```ps1\nCopywriter --include-name 'Ben Hutchison' --include-name 'Benjamin Hutchison' --include-name '$(Authors)'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faldaviva%2Fcopywriter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faldaviva%2Fcopywriter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faldaviva%2Fcopywriter/lists"}