Skip to content

Commit

Permalink
appendix: Rename "Version History" to "Changelog"
Browse files Browse the repository at this point in the history
As requested here: #422 (comment)
  • Loading branch information
Holzhaus committed Sep 1, 2021
1 parent a10f31a commit 39cee02
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion source/chapters/appendix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Appendix
appendix/commandline_dev_tools
appendix/mixxx_controls
appendix/additional_resources
appendix/version_history
appendix/changelog
File renamed without changes.
15 changes: 3 additions & 12 deletions tools/update_changelog.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python3
import argparse
import os
import re

import m2r2
import requests
Expand All @@ -13,7 +12,7 @@
.. include:: /shortcuts.rstext
.. _appendix-version-history:
.. _appendix-changelog:
{content}
Expand All @@ -34,14 +33,6 @@ def fetch_changelog(branch):

def changelog_to_rst(changelog):
""" Convert changelog to RST format used by sphinx. """
# Replace headline with "Version History"
changelog = re.sub(
"^# Changelog$",
"# Version History",
changelog,
flags=re.MULTILINE | re.IGNORECASE,
)

return TEMPLATE.lstrip().format(content=m2r2.convert(changelog))


Expand All @@ -54,10 +45,10 @@ def main(argv=None):
changelog = fetch_changelog(args.branch)
changelog = changelog_to_rst(changelog)

# Write changelog to version_history.rst file
# Write changelog to changelog.rst file
path = os.path.join(
os.path.dirname(os.path.abspath(__file__)),
"../source/chapters/appendix/version_history.rst",
"../source/chapters/appendix/changelog.rst",
)
with open(path, mode="w") as fp:
fp.write(changelog)
Expand Down

0 comments on commit 39cee02

Please sign in to comment.