mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
This commit is contained in:
parent
7a9ba181aa
commit
da1aaf9fb5
@ -31,7 +31,7 @@ def svn_log_to_txt():
|
|||||||
version_change_indices.append(i)
|
version_change_indices.append(i)
|
||||||
version_change_version.append(match.group(1))
|
version_change_version.append(match.group(1))
|
||||||
|
|
||||||
txt = '= Changelog =\n[[PageOutline]]\n'
|
txt = ['= Changelog =\n[[PageOutline]]']
|
||||||
version_pat = re.compile(r'version\s+(\d+\.\d+\.\d+)', re.IGNORECASE)
|
version_pat = re.compile(r'version\s+(\d+\.\d+\.\d+)', re.IGNORECASE)
|
||||||
current_version = False
|
current_version = False
|
||||||
for entry in log:
|
for entry in log:
|
||||||
@ -42,11 +42,13 @@ def svn_log_to_txt():
|
|||||||
match = version_pat.search(msg)
|
match = version_pat.search(msg)
|
||||||
if match:
|
if match:
|
||||||
current_version = True
|
current_version = True
|
||||||
txt += '----\n== Version '+match.group(1)+' ==\n'
|
line = u'----\n== Version '+match.group(1)+' =='
|
||||||
elif current_version:
|
elif current_version:
|
||||||
txt += ' * ' + msg + '\n'
|
line = u' * ' + msg
|
||||||
|
if line not in txt:
|
||||||
|
txt.append(line)
|
||||||
|
|
||||||
return txt
|
return u'\n'.join(txt)
|
||||||
|
|
||||||
|
|
||||||
class ChangeLogMacro(WikiMacroBase):
|
class ChangeLogMacro(WikiMacroBase):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user