Difference between revisions of "Ability/Script"

From Wildermyth Wiki
m
 
(One intermediate revision by the same user not shown)
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.<ref>More precisely, you can put the script anywhere, but you need to call it from the '''<nowiki>Wildermyth</nowiki>''' directory.</ref> 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>
|}
|}

Latest revision as of 07:31, 27 May 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.[1] It will create a text file named wikiAbilityTable.txt with the appropriate wiki-formatted content.

  1. More precisely, you can put the script anywhere, but you need to call it from the Wildermyth directory.