mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-13 02:30:11 +01:00
Optimise wiki update
This commit is contained in:
parent
96ee85bc86
commit
c1233295c8
@ -130,6 +130,12 @@ def update_wiki(apps, apks, verbose=False):
|
||||
# We can't have underscores in the page name, even if they're in
|
||||
# the package ID, because MediaWiki messes with them...
|
||||
pagename = app['id'].replace('_', ' ')
|
||||
|
||||
# Drop a trailing newline, because mediawiki is going to drop it anyway
|
||||
# and it we don't we'll think the page has changed when it hasn't...
|
||||
if wikidata.endswith('\n'):
|
||||
wikidata = wikidata[:-1]
|
||||
|
||||
generated_pages[pagename] = wikidata
|
||||
|
||||
# Make a redirect from the name to the ID too, unless there's
|
||||
|
Loading…
Reference in New Issue
Block a user