mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-09-05 06:32:31 +00:00
* BTATOW Start to split up code to allow writing unit tests. * BTATOW Add .idea folder to .gitignore file for BTATOW sheet. * BTATOW Fix .gitignore for .idea folder. * BTATOW Start to split out skills code and write tests. Also fix exports from attributes file. * Added pre-commit scripts and README with development instructions.
26 lines
675 B
Python
26 lines
675 B
Python
import os
|
|
from typing import List
|
|
|
|
|
|
def main():
|
|
os.system("npm --prefix ../development/ run compile")
|
|
|
|
output: List[str] = []
|
|
|
|
with open('../BattleTech-A-Time-of-War.html', 'r') as character_sheet:
|
|
for line in character_sheet:
|
|
output.append(line)
|
|
if line == '<script type="text/worker">\n':
|
|
break
|
|
|
|
with open('../development/output/sheet-worker.js') as sheet_worker:
|
|
output.append(sheet_worker.read())
|
|
output.append("\n</script>\n")
|
|
|
|
with open('../BattleTech-A-Time-of-War.html', 'w') as character_sheet:
|
|
character_sheet.write("".join(output))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|