From: <sv...@op...> - 2025-01-09 18:29:55
|
Author: sagamusix Date: Thu Jan 9 19:29:42 2025 New Revision: 22851 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22851 Log: Merged revision(s) 22850 from trunk/OpenMPT: [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. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/mptrack/manual_generator/wiki.py Modified: branches/OpenMPT-1.31/mptrack/manual_generator/wiki.py ============================================================================== --- branches/OpenMPT-1.31/mptrack/manual_generator/wiki.py Thu Jan 9 19:15:25 2025 (r22850) +++ branches/OpenMPT-1.31/mptrack/manual_generator/wiki.py Thu Jan 9 19:29:42 2025 (r22851) @@ -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() |