Package: keepachangelog-manager
(Keep a) Changelog ManagerPython package allowing you to manage yourCHANGELOG.mdfilesInstallationIn order to install the python scripts you can use the following command:%pipinstallkeepachangelog-managerUsageUsage: changelogmanager [OPTIONS] COMMAND [ARGS]...

  (Keep a) Changelog Manager

Options:
  --config TEXT                   Configuration file
  --component TEXT                Name of the component to update
  -f, --error-format [llvm|github]
                                  Type of formatting to apply to error
                                  messages
  --input-file TEXT               Changelog file to work with
  --help                          Show this message and exit.

Commands:
  add             Command to add a new message to the CHANGELOG.md
  create          Command to create a new (empty) CHANGELOG.md
  github-release  Deletes all releases marked as 'Draft' on GitHub and...
  release         Release changes added to [Unreleased] block
  to-json         Exports the contents of the CHANGELOG.md to a JSON file
  validate        Command to validate the CHANGELOG.md for inconsistencies
  version         Command to retrieve versions from a CHANGELOG.mdValidate the layout of your CHANGELOG.mdAlthough every command will validate the contents of yourCHANGELOG.md, the
commandvalidatewill do nothing more than this.%changelogmanagervalidateYou can change the error messages to GitHub format by providing the--error-formatoption:%changelogmanager--error-formatgithubvalidateCreate a new CHANGELOG.mdCreating a newCHANGELOG.mdfile is as simple as running:%changelogmanagercreateThis will create an empty changelog in the current working directory:# ChangelogAll notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).Add a change to your changelogTheaddcommand can be used to add a new change to theCHANGELOG.md:Usage: changelogmanager add [OPTIONS]

  Command to add a new message to the CHANGELOG.md

Options:
  -t, --change-type [added|changed|deprecated|removed|fixed|security]
                                  Type of the change
  -m, --message TEXT              Changelog entry
  --help                          Show this message and exit.The options--change-typeand--messagecan be omitted, providing a simple user
interface for defining the contents:%changelogmanageradd

?Specifythetypeofyourchange?Messageofthechangelogentrytoadd?ApplychangestoyourCHANGELOG.md(Y/n)In addition, you can provide a single command as well:%changelogmanageradd--change-typeadded--message"Added an example to the documentation"This will create a new[Unreleased]entry in yourCHANGELOG.md:## [Unreleased]### Added-Added an example to the documentationRetrieving versionsTheversioncommand can be used to retrieve versions based on theCHANGELOG.md:Usage: changelogmanager version [OPTIONS]

  Command to retrieve versions from a CHANGELOG.md

Options:
  -r, --reference [previous|current|future]
                                  Which version to retrieve
  --help                          Show this message and exit.Taking the followingCHANGELOG.mdas reference:## [Unreleased]### Added-Added an example to the documentation## [2.1.0] - 2022-03-09### Fixed-Handle empty`CHANGELOG.md`files gracefully## [2.0.0] - 2022-03-08### Fixed-No longer throw exceptions when releasing`CHANGELOG.md`containing only an`[Unreleased]`section### Added-Added support for creating a new`CHANGELOG.md`file, using the`create`command%changelogmanagerversion2.1.0

%changelogmanagerversion--referenceprevious2.0.0

%changelogmanagerversion--referencefuture2.2.0NOTE: Thefutureversion is based on the changes listed in the[Unreleased]section in yourCHANGELOG.md(applying Semantic Versioning)Release a new CHANGELOG.mdThereleasecommand allows you to "release" any "unreleased" changes:Usage: changelogmanager release [OPTIONS]

  Release changes added to [Unreleased] block

Options:
  --override-version TEXT  Version to release, defaults to auto-resolve
  --help                   Show this message and exit.For example:%changelogmanagerreleaseThis will rename the[Unreleased]section and add the current date next to it, marking
the change as "Released"Export your CHANGELOG.md to JSONTheto-jsoncommand allows you to export theCHANGELOG.mdfile into a JSON format:Usage: changelogmanager to-json [OPTIONS]

  Exports the contents of the CHANGELOG.md to a JSON file

Options:
  --file-name TEXT  Filename of the JSON output
  --help            Show this message and exit.For example:%changelogmanagerto-jsonThis will create a file namedCHANGELOG.jsoncontain content similar to:{"3.2.0":{"metadata":{"version":"3.2.0","release_date":"2022-08-18","semantic_version":{"major":3,"minor":2,"patch":0,"prerelease":null,"buildmetadata":null}},"added":["The command `to-json` allows you to export the changelog contents in JSON format (useful for external automation purposes)"]}"3.1.0":{...}}Create/Update Release in GitHubThegithub-releasecommand will create/update a draft Release based on the contents of the[Unreleased]section in yourCHANGELOG.md:Usage:changelogmanagergithub-release[OPTIONS]Createsanew(Draft)releaseinGithub

Options:-r,--repositoryTEXTRepository[required]-t,--github-tokenTEXTGithubToken[required]--draft/--releaseUpdate/CreatetheGitHubReleaseineitherDraftorReleasestate--helpShowthismessageandexit.For example:%changelogmanagergithub-release--github-token<PAT>--repositorytomtom-international/keepachangelog-managerWill result in something alike:Providing the--releaseflag will update and publish the draft Release.Working with multiple CHANGELOG.md files in a single repositoryYou can create a configuration file with the following schema:project:
  components:
  - name: Service Component
    changelog: service/CHANGELOG.md
  - name: Client Interface
    changelog: client/CHANGELOG.mdYou can provide the--configand--componentoptions to select a specificCHANGELOG.mdfile, eg.%changelogmanager--configconfig.yml--component"Client Interface"version3.7.3