Updated gen docs
This commit is contained in:
parent
1c0d21aaef
commit
ba0c3d4128
28
gen_docs.py
28
gen_docs.py
|
@ -1,13 +1,7 @@
|
||||||
import sys
|
import sys
|
||||||
import scrython
|
import scrython
|
||||||
import re
|
import re
|
||||||
from scrython.bulk_data import *
|
import os
|
||||||
from scrython.cards import *
|
|
||||||
from scrython.catalog import *
|
|
||||||
from scrython.rulings import *
|
|
||||||
from scrython.sets import *
|
|
||||||
from scrython.symbology import *
|
|
||||||
from types import FunctionType
|
|
||||||
|
|
||||||
def format_args(string, f):
|
def format_args(string, f):
|
||||||
f.write('\n## Args\n\n|arg|type|description|\n|:---:|:---:|:---:|\n')
|
f.write('\n## Args\n\n|arg|type|description|\n|:---:|:---:|:---:|\n')
|
||||||
|
@ -89,6 +83,9 @@ These docs will likely not be as detailed as the official Scryfall Documentation
|
||||||
|
|
||||||
functions = [x for x in dir(eval(_class)) if not x.startswith('_')]
|
functions = [x for x in dir(eval(_class)) if not x.startswith('_')]
|
||||||
|
|
||||||
|
if not os.path.exists('./docs/{}'.format(subpackage.__name__)):
|
||||||
|
os.makedirs('./docs/{}'.format(subpackage.__name__))
|
||||||
|
|
||||||
with open('./docs/{}/{}.md'.format(subpackage.__name__, _class), 'w') as f:
|
with open('./docs/{}/{}.md'.format(subpackage.__name__, _class), 'w') as f:
|
||||||
f.write('# **class** `{}.{}()`\n'.format(subpackage.__name__, _class))
|
f.write('# **class** `{}.{}()`\n'.format(subpackage.__name__, _class))
|
||||||
f.write(intro)
|
f.write(intro)
|
||||||
|
@ -109,9 +106,26 @@ These docs will likely not be as detailed as the official Scryfall Documentation
|
||||||
print('~~~~~~~~~~~~~~~~~~~~~~~~~~')
|
print('~~~~~~~~~~~~~~~~~~~~~~~~~~')
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
from scrython.bulk_data import *
|
||||||
main(scrython.bulk_data)
|
main(scrython.bulk_data)
|
||||||
|
del scrython.bulk_data
|
||||||
|
|
||||||
|
from scrython.cards import *
|
||||||
main(scrython.cards)
|
main(scrython.cards)
|
||||||
|
del scrython.cards
|
||||||
|
|
||||||
|
from scrython.catalog import *
|
||||||
main(scrython.catalog)
|
main(scrython.catalog)
|
||||||
|
del scrython.catalog
|
||||||
|
|
||||||
|
from scrython.rulings import *
|
||||||
main(scrython.rulings)
|
main(scrython.rulings)
|
||||||
|
del scrython.rulings
|
||||||
|
|
||||||
|
from scrython.sets import *
|
||||||
main(scrython.sets)
|
main(scrython.sets)
|
||||||
|
del scrython.sets
|
||||||
|
|
||||||
|
from scrython.symbology import *
|
||||||
main(scrython.symbology)
|
main(scrython.symbology)
|
||||||
|
del scrython.symbology
|
Loading…
Reference in New Issue