mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-09 02:41:06 +03:00
Optimise wiki update
This commit is contained in:
parent
96ee85bc86
commit
c1233295c8
1 changed files with 6 additions and 0 deletions
|
@ -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
|
# We can't have underscores in the page name, even if they're in
|
||||||
# the package ID, because MediaWiki messes with them...
|
# the package ID, because MediaWiki messes with them...
|
||||||
pagename = app['id'].replace('_', ' ')
|
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
|
generated_pages[pagename] = wikidata
|
||||||
|
|
||||||
# Make a redirect from the name to the ID too, unless there's
|
# Make a redirect from the name to the ID too, unless there's
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue