Difference between revisions of "Ability/Script"

From Wildermyth Wiki
m
Line 1: Line 1:
This is a [https://www.python.org/downloads/ Python] script to generate the [[Ability]] tables. Copy the code in the box below into a text file named '''<nowiki>abilityTable.py</nowiki>''' (or whatever you want) inside the '''<nowiki>Wildermyth</nowiki>''' directory. Then run it by calling '''<nowiki>python abilityTable.py</nowiki>''' from the command line. It will create a text file named '''<nowiki>abilityTable.txt</nowiki>''' with the appropriate wiki-formatted content.
This is a [https://www.python.org/downloads/ Python] script to generate the [[Ability]] tables. Copy the code in the box below into a text file named '''<nowiki>wikiAbilityTable.py</nowiki>''' (or whatever you want) inside the '''<nowiki>Wildermyth</nowiki>''' directory. Then run it by calling '''<nowiki>python wikiAbilityTable.py</nowiki>''' from the command line. It will create a text file named '''<nowiki>wikiAbilityTable.txt</nowiki>''' with the appropriate wiki-formatted content.


{| role="presentation" class="wikitable mw-collapsible mw-collapsed"
{| role="presentation" class="wikitable mw-collapsible mw-collapsed"
| '''<nowiki>abilityTable.py</nowiki>'''
| '''<nowiki>wikiAbilityTable.py</nowiki>'''
|-
|-
|
|
Line 312: Line 312:
# write the final string
# write the final string


with open('abilityTable.txt', 'w') as f:
with open('wikiAbilityTable.txt', 'w') as f:
   f.write(string)</nowiki>
   f.write(string)</nowiki>
|}
|}

Revision as of 13:29, 5 March 2022

This is a Python script to generate the Ability tables. Copy the code in the box below into a text file named wikiAbilityTable.py (or whatever you want) inside the Wildermyth directory. Then run it by calling python wikiAbilityTable.py from the command line. It will create a text file named wikiAbilityTable.txt with the appropriate wiki-formatted content.