Skip to content

Commit

Permalink
Merged revision(s) 22850 from trunk/OpenMPT:
Browse files Browse the repository at this point in the history
[Var] Update manual generator to cope with MediaWiki 1.43 output. CSS now uses variables in a few places, which the CHM viewer (probably still using IE10 under the hood) does not comprehend.
........


git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.31@22851 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
sagamusix committed Jan 9, 2025
1 parent 5016c80 commit 999f3ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mptrack/manual_generator/wiki.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
shutil.rmtree('html', ignore_errors=True)
shutil.copytree('source', 'html')

style = urlopen(base_url + '/load.php?debug=false&lang=en&modules=mediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.page.gallery.styles%7Cmediawiki.skinning.interface%7Cskins.vector.styles%7Csite.styles&only=styles&skin=vector').read().decode('UTF-8')
style = urlopen(base_url + '/load.php?debug=false&lang=en&modules=mediawiki.page.gallery.styles%7Cmediawiki.skinning.interface%7Cskins.vector.styles%7Csite.styles&only=styles&skin=vector').read().decode('UTF-8')

# Remove a few unused CSS classes
style = re.sub(r'\}(\w+)?[\.#]vector([\w >]+)\{.+?\}', '}', style)
style = re.sub(r'var\([A-Za-z\-]+,([^)]*)\)', '\\1', style)
style_file = open('html/style.css', 'w')
style_file.write(style)
style_file.close()
Expand Down

0 comments on commit 999f3ff

Please sign in to comment.