Generate docs to the generated/ subfolder

This commit is contained in:
Lonami Exo 2017-04-08 14:04:32 +02:00
parent 56a959a07d
commit df7f4bc47c
4 changed files with 14 additions and 5 deletions

5
docs/.gitignore vendored
View File

@ -1,4 +1 @@
constructors/ generated/
methods/
types/
core/

View File

@ -1,6 +1,7 @@
import os import os
import re import re
import sys import sys
import shutil
from docs.docs_writer import DocsWriter from docs.docs_writer import DocsWriter
# Small trick so importing telethon_generator works # Small trick so importing telethon_generator works
@ -342,5 +343,16 @@ def generate_documentation(scheme_file):
print('Documentation generated.') print('Documentation generated.')
def copy_resources():
for d in ['css', 'img']:
os.makedirs(d, exist_ok=True)
shutil.copy('../res/arrow.svg', 'img')
shutil.copy('../res/docs.css', 'css')
if __name__ == '__main__': if __name__ == '__main__':
generate_documentation('../telethon_generator/scheme.tl') os.makedirs('generated', exist_ok=True)
os.chdir('generated')
generate_documentation('../../telethon_generator/scheme.tl')
copy_resources()

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB