mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-08-31 20:22:29 +00:00
* Spanish translation and minor fixes * Rounding movement measurements * Adding linguistics option to campaign settings * Removing NPC stuff from the json options * Saving Mythras v2 progress * Modify mythras sheet.json for new options * stash * Restored tranlastions and all but mook css * Automation script added to help building Mythras sheets * Autocalc migration up to skills, Mythras * sheetwork autocalc for standard skills * Auto calc up to passions * Fix tenacity * Finish migrating skills to shett workers * Finished skills auto calc * Half done with compat tab * Stash work up to mostly finish mook skills * Fixed percent symbol on Athletics mook btn * Added up to psionic powers for mooks and added collapse to magic sections * Stash mook sup to animism * more stashed edits * Stash commits * v2 Mythras * A few edits to Mythras changelog, typos and spelling * Style adjustments for Firefox * Small bugfixes for the Mythras v2 conversion scripts * Small bugfixes for the Mythras v2 conversion scripts * Some minor CSS adjustments to support Firefox better * Mythras: fix styling issues with fetish tenacity * v2.1 of Mythras sheet and reduce M-Space to a stub with notes to use the Mythras sheet * Remove line from Mythras change log which wasn't meant for publishing * v2.2 of Mythras sheet * Added missing Worlds United setting from Default Sheet Settings * v2.3 of Mythras Sheet * Add missing v2.3 version update * Mythras v2.4 and Odd Soot stub * Update Odd Soot Logo * Removing Odd Soot sheet per clevett's recommendation * Restore M-Space to previous versions per clevett's recommendation * Added deprecation notice to top of M-Space sheet * Mythras v2.5 * Added equipment and money to compact/mook sheets * Added Social Conflict Support * Update changelop for v2.6 * Update de.json * Mythras - switching over to gradle based build with automated uploading of srcs to roll20 * Mythras v2.7 * Updated Mythras Changlog
32 lines
819 B
Python
Executable File
32 lines
819 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import re
|
|
import argparse
|
|
import os
|
|
import fileinput
|
|
|
|
parser = argparse.ArgumentParser(description="Adds the 'sheet-' prefix to all class tags.")
|
|
parser.add_argument('filename', help='html source file to process')
|
|
|
|
args = parser.parse_args()
|
|
|
|
filepath = os.path.abspath(args.filename)
|
|
|
|
src = fileinput.FileInput(filepath, inplace=True)
|
|
def classprefix(matchobj):
|
|
replacement = 'class="'
|
|
for htmlclass in matchobj.group(1).split():
|
|
if htmlclass.startswith("sheet-"):
|
|
replacement = replacement + htmlclass + ' '
|
|
else:
|
|
replacement = replacement + 'sheet-' + htmlclass + ' '
|
|
replacement = replacement.rstrip()
|
|
return replacement + '"'
|
|
|
|
for line in src:
|
|
newline = re.sub(r"class=\"(.*)\"", classprefix, line.rstrip())
|
|
print(newline)
|
|
|
|
|
|
|