# License Updater
[![PyPI version](https://badge.fury.io/py/license-updater.svg)](https://badge.fury.io/py/license-updater)
[![main](https://github.com/vsoch/license-updater/actions/workflows/main.yml/badge.svg)](https://github.com/vsoch/license-updater/actions/workflows/main.yml)
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
Every year I go through projects and update license strings. It's OK for a few projects but can get really
arduous! Thus, I made this license updater to do exactly what I needed.
TODO
The actions updater will make it easy to update actions:
- 🥑 updated syntax and commands
- 🥑 versions of actions, either for releases or commits
- 🥑 preview, write to new file, or write in place!
- 🥑 run as a GitHub action workflow for annual checks!
You can see the [⭐️ Documentation ⭐️](https://vsoch.github.io/license-updater) for complete details!
## ⭐️ Quick Start ⭐️
### Installation
The module is available in pypi as [license-updater](https://pypi.org/project/license-updater/),
and to install we first recommend some kind of virtual environment:
```bash
$ python -m venv env
$ source env/bin/activate
```
And then install from pypi using pip:
```bash
$ pip install license-updater
```
### Usage
For all commands below, the actions updater can accept a directory with yaml files,
or a single yaml file that matches the GitHub actions schema.
View updaters available (and descriptions)
```bash
$ license-updater list-updaters
```
You should likely detect (to preview) before you write the changes to file.
```bash
# Run all updaters
$ license-updater detect .github/workfows/main.yaml
# Only detect for the setoutput updater
$ license-updater detect -u setoutput .github/workfows/main.yaml
```
And finally, write updates to file!
```bash
$ license-updater update .github/workfows/main.yaml
```
### 🎨 Screenshots 🎨
If a file has updates, it will print to the terminal the updated file for preview.
![docs/assets/img/detect.png](docs/assets/img/detect.png)
And after you run `update` (described below) you will see all green!
![docs/assets/img/clean.png](docs/assets/img/clean.png)
Running across many files:
![docs/assets/img/updates.png](docs/assets/img/updates.png)
And that's it! The action comes with several [updaters](https://vsoch.github.io/license-updater/developer-guide.html#updaters) that will look
for particular aspects to lint or update. If you have a request for a new updated, please
[open an issue](https://github.com/vsoch/license-updater/issues).
### Feature Ideas
This could be fairly easy to extend to allow for more "linting" style actions to reflect preferences in style, e.g:
```bash
$ license-updater lint .github/workflows/main.yaml
```
If this sounds interesting to you, please [open an issue](https://github.com/vsoch/license-updater) to discuss further!
We currently do some basic linting, as the yaml loading library has preferences for saving with respect to spacing, etc.
## 😁️ Contributors 😁️
We use the [all-contributors](https://github.com/all-contributors/all-contributors)
tool to generate a contributors graphic below.
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://vsoch.github.io"><img src="https://avatars.githubusercontent.com/u/814322?v=4?s=100" width="100px;" alt="Vanessasaurus"/><br /><sub><b>Vanessasaurus</b></sub></a><br /><a href="https://github.com/vsoch/license-updater/commits?author=vsoch" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.henrymike.com/"><img src="https://avatars.githubusercontent.com/u/11765982?v=4?s=100" width="100px;" alt="Mike Henry"/><br /><sub><b>Mike Henry</b></sub></a><br /><a href="https://github.com/vsoch/license-updater/commits?author=mikemhenry" title="Code">💻</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
## License
This code is licensed under the MPL 2.0 [LICENSE](LICENSE).
Raw data
{
"_id": null,
"home_page": "https://github.com/vsoch/license-updater",
"name": "license-updater",
"maintainer": "Vanessa Sochat",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "github,license,docstring,header,updater",
"author": "Vanessa Sochat",
"author_email": "vsoch@users.noreply.github.com",
"download_url": "https://files.pythonhosted.org/packages/d1/fa/9d72db2480ea24d18397b2c8636047baf03deb2db6d6e8fa405592a1fe22/license-updater-0.0.0.tar.gz",
"platform": null,
"description": "# License Updater\n\n[![PyPI version](https://badge.fury.io/py/license-updater.svg)](https://badge.fury.io/py/license-updater)\n[![main](https://github.com/vsoch/license-updater/actions/workflows/main.yml/badge.svg)](https://github.com/vsoch/license-updater/actions/workflows/main.yml)\n\n<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->\n[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)\n<!-- ALL-CONTRIBUTORS-BADGE:END -->\n\nEvery year I go through projects and update license strings. It's OK for a few projects but can get really\narduous! Thus, I made this license updater to do exactly what I needed.\n\nTODO\n\nThe actions updater will make it easy to update actions:\n\n - \ud83e\udd51 updated syntax and commands\n - \ud83e\udd51 versions of actions, either for releases or commits\n - \ud83e\udd51 preview, write to new file, or write in place!\n - \ud83e\udd51 run as a GitHub action workflow for annual checks!\n\nYou can see the [\u2b50\ufe0f Documentation \u2b50\ufe0f](https://vsoch.github.io/license-updater) for complete details!\n\n## \u2b50\ufe0f Quick Start \u2b50\ufe0f\n\n### Installation\n\nThe module is available in pypi as [license-updater](https://pypi.org/project/license-updater/),\nand to install we first recommend some kind of virtual environment:\n\n```bash\n$ python -m venv env\n$ source env/bin/activate\n```\n\nAnd then install from pypi using pip:\n\n```bash\n$ pip install license-updater\n```\n\n### Usage\n\nFor all commands below, the actions updater can accept a directory with yaml files,\nor a single yaml file that matches the GitHub actions schema.\n\nView updaters available (and descriptions)\n\n```bash\n$ license-updater list-updaters\n```\nYou should likely detect (to preview) before you write the changes to file.\n\n```bash\n# Run all updaters\n$ license-updater detect .github/workfows/main.yaml\n\n# Only detect for the setoutput updater\n$ license-updater detect -u setoutput .github/workfows/main.yaml\n```\nAnd finally, write updates to file!\n\n```bash\n$ license-updater update .github/workfows/main.yaml\n```\n\n### \ud83c\udfa8 Screenshots \ud83c\udfa8\n\nIf a file has updates, it will print to the terminal the updated file for preview.\n\n![docs/assets/img/detect.png](docs/assets/img/detect.png)\n\nAnd after you run `update` (described below) you will see all green!\n\n![docs/assets/img/clean.png](docs/assets/img/clean.png)\n\nRunning across many files:\n\n![docs/assets/img/updates.png](docs/assets/img/updates.png)\n\nAnd that's it! The action comes with several [updaters](https://vsoch.github.io/license-updater/developer-guide.html#updaters) that will look\nfor particular aspects to lint or update. If you have a request for a new updated, please\n[open an issue](https://github.com/vsoch/license-updater/issues).\n\n### Feature Ideas\n\nThis could be fairly easy to extend to allow for more \"linting\" style actions to reflect preferences in style, e.g:\n\n```bash\n$ license-updater lint .github/workflows/main.yaml\n```\n\nIf this sounds interesting to you, please [open an issue](https://github.com/vsoch/license-updater) to discuss further!\nWe currently do some basic linting, as the yaml loading library has preferences for saving with respect to spacing, etc.\n\n## \ud83d\ude01\ufe0f Contributors \ud83d\ude01\ufe0f\n\nWe use the [all-contributors](https://github.com/all-contributors/all-contributors)\ntool to generate a contributors graphic below.\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n <tbody>\n <tr>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://vsoch.github.io\"><img src=\"https://avatars.githubusercontent.com/u/814322?v=4?s=100\" width=\"100px;\" alt=\"Vanessasaurus\"/><br /><sub><b>Vanessasaurus</b></sub></a><br /><a href=\"https://github.com/vsoch/license-updater/commits?author=vsoch\" title=\"Code\">\ud83d\udcbb</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://www.henrymike.com/\"><img src=\"https://avatars.githubusercontent.com/u/11765982?v=4?s=100\" width=\"100px;\" alt=\"Mike Henry\"/><br /><sub><b>Mike Henry</b></sub></a><br /><a href=\"https://github.com/vsoch/license-updater/commits?author=mikemhenry\" title=\"Code\">\ud83d\udcbb</a></td>\n </tr>\n </tbody>\n</table>\n\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\n## License\n\nThis code is licensed under the MPL 2.0 [LICENSE](LICENSE).\n\n\n",
"bugtrack_url": null,
"license": "LICENSE",
"summary": "Update license years",
"version": "0.0.0",
"split_keywords": [
"github",
"license",
"docstring",
"header",
"updater"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d1fa9d72db2480ea24d18397b2c8636047baf03deb2db6d6e8fa405592a1fe22",
"md5": "6dd9477b8a04d5e7ae496317389cca9e",
"sha256": "78c43217e9d89b82fc6b69e96dab79e6cabc9e653a531c13a858148f1300b098"
},
"downloads": -1,
"filename": "license-updater-0.0.0.tar.gz",
"has_sig": false,
"md5_digest": "6dd9477b8a04d5e7ae496317389cca9e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 23838,
"upload_time": "2023-01-21T00:34:57",
"upload_time_iso_8601": "2023-01-21T00:34:57.438711Z",
"url": "https://files.pythonhosted.org/packages/d1/fa/9d72db2480ea24d18397b2c8636047baf03deb2db6d6e8fa405592a1fe22/license-updater-0.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-21 00:34:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "vsoch",
"github_project": "license-updater",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "license-updater"
}