File: releaseNotes.py

package info (click to toggle)
ghostwriter 2.1.6%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 28,564 kB
  • sloc: javascript: 32,952; cpp: 21,032; xml: 33; python: 21; makefile: 4; sh: 3
file content (31 lines) | stat: -rwxr-xr-x 1,167 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/python

import sys

if len(sys.argv) != 2:
    print("Missing or invalid arguments.")
    print("Please provide release version number.")
    exit(1)

version = sys.argv[1]

changelog = open('CHANGELOG.md', 'r')
lines = changelog.readlines()

currentRelease = False

print("## Release Notes")

for line in lines:
    if not currentRelease and line.startswith("## ["):
        currentRelease = True
    elif currentRelease:
        if line.startswith("## ["):
            break # All done!
        else:
            print(line.rstrip())

print("## Downloads")
print("")
print(r'[![ubuntu](https://img.shields.io/static/v1?label=&color=purple&logo=ubuntu&message=Ubuntu&style=for-the-badge)](https://launchpad.net/~wereturtle/+archive/ubuntu/ppa) [![fedora](https://img.shields.io/static/v1?label=&color=blue&logo=fedora&message=Fedora&style=for-the-badge)](https://copr.fedorainfracloud.org/coprs/wereturtle/stable/)  [![Windows](https://img.shields.io/static/v1?label=&color=blue&logo=windows&message=Windows&style=for-the-badge)](https://github.com/wereturtle/ghostwriter/releases/download/' + version + r'/ghostwriter_' + version + r'_win64_portable.zip)')