mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 10:53:44 +03:00
Generate docs to the generated/ subfolder
This commit is contained in:
parent
56a959a07d
commit
df7f4bc47c
5
docs/.gitignore
vendored
5
docs/.gitignore
vendored
|
@ -1,4 +1 @@
|
|||
constructors/
|
||||
methods/
|
||||
types/
|
||||
core/
|
||||
generated/
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import os
|
||||
import re
|
||||
import sys
|
||||
import shutil
|
||||
from docs.docs_writer import DocsWriter
|
||||
|
||||
# Small trick so importing telethon_generator works
|
||||
|
@ -342,5 +343,16 @@ def generate_documentation(scheme_file):
|
|||
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__':
|
||||
generate_documentation('../telethon_generator/scheme.tl')
|
||||
os.makedirs('generated', exist_ok=True)
|
||||
os.chdir('generated')
|
||||
generate_documentation('../../telethon_generator/scheme.tl')
|
||||
copy_resources()
|
||||
|
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Loading…
Reference in New Issue
Block a user