Updated gen docs

This commit is contained in:
Nanda Scott 2018-10-31 13:05:59 -04:00
parent 1c0d21aaef
commit ba0c3d4128
1 changed files with 22 additions and 8 deletions

View File

@ -1,13 +1,7 @@
import sys
import scrython
import re
from scrython.bulk_data import *
from scrython.cards import *
from scrython.catalog import *
from scrython.rulings import *
from scrython.sets import *
from scrython.symbology import *
from types import FunctionType
import os
def format_args(string, f):
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('_')]
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:
f.write('# **class** `{}.{}()`\n'.format(subpackage.__name__, _class))
f.write(intro)
@ -109,9 +106,26 @@ These docs will likely not be as detailed as the official Scryfall Documentation
print('~~~~~~~~~~~~~~~~~~~~~~~~~~')
if __name__ == '__main__':
from scrython.bulk_data import *
main(scrython.bulk_data)
del scrython.bulk_data
from scrython.cards import *
main(scrython.cards)
del scrython.cards
from scrython.catalog import *
main(scrython.catalog)
del scrython.catalog
from scrython.rulings import *
main(scrython.rulings)
del scrython.rulings
from scrython.sets import *
main(scrython.sets)
del scrython.sets
from scrython.symbology import *
main(scrython.symbology)
del scrython.symbology