Skip to content

Commit b77d6bc

Browse files
committed
Remove contributors
1 parent d2754de commit b77d6bc

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

debian/changelog_md2deb.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
33
#
4-
# This file is part of snapos
5-
# Copyright (C) 2022 Johannes Pohl
4+
# This file is part of snapweb
5+
# Copyright (C) 2022-2025 Johannes Pohl
66
#
77
# This program is free software: you can redistribute it and/or modify
88
# it under the terms of the GNU General Public License as published by
@@ -28,13 +28,20 @@
2828
with open(sys.argv[1], 'r') as file:
2929
data = file.read()
3030

31-
data = re.sub('^\s*# Snapweb changelog *\n*',
31+
# Remove '# Snapweb changelog'
32+
data = re.sub(r'^\s*# Snapweb changelog *\n*',
3233
'', data, flags=re.MULTILINE)
33-
data = re.sub('^\s*### ([a-zA-Z]+) *\n',
34+
# Remove Contributors section
35+
data = re.sub(r'^\s*### Contributors *\n*( *-.*\n)*',
36+
'', data, flags=re.MULTILINE)
37+
# Replace '### <text>' with ' * <text>'
38+
data = re.sub(r'^\s*### ([a-zA-Z]+) *\n',
3439
r'\n * \1\n', data, flags=re.MULTILINE)
35-
data = re.sub('^\s*## Version\s+(\S*) *\n',
40+
# Replace '## Version <ver>' with 'snapcast (<ver>-1) unstable; urgency=medium'
41+
data = re.sub(r'^\s*## Version\s+(\S*) *\n',
3642
r'snapweb (\1-1) unstable; urgency=medium\n', data, flags=re.MULTILINE)
37-
data = re.sub('^\s*-\s*(.*) *\n', r' -\1\n', data, flags=re.MULTILINE)
38-
data = re.sub('^_(.*)_ *\n', r' -- \1\n\n', data, flags=re.MULTILINE)
43+
# Replace bullets with ' -'
44+
data = re.sub(r'^\s*-\s*(.*) *\n', r' -\1\n', data, flags=re.MULTILINE)
45+
data = re.sub(r'^_(.*)_ *\n', r' -- \1\n\n', data, flags=re.MULTILINE)
3946

4047
print(data)

0 commit comments

Comments
 (0)