mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-28 00:56:19 +00:00
Fix docs source generation when manually executing the script
This commit is contained in:
parent
82b346fd26
commit
b762a701f2
@ -31,12 +31,6 @@ types_base = "types"
|
|||||||
shutil.rmtree(types_base, ignore_errors=True)
|
shutil.rmtree(types_base, ignore_errors=True)
|
||||||
shutil.rmtree(functions_base, ignore_errors=True)
|
shutil.rmtree(functions_base, ignore_errors=True)
|
||||||
|
|
||||||
with open(home + "/template/page.txt") as f:
|
|
||||||
page_template = f.read()
|
|
||||||
|
|
||||||
with open(home + "/template/toctree.txt") as f:
|
|
||||||
toctree = f.read()
|
|
||||||
|
|
||||||
|
|
||||||
def generate(source_path, base):
|
def generate(source_path, base):
|
||||||
all_entities = {}
|
all_entities = {}
|
||||||
@ -110,6 +104,15 @@ def generate(source_path, base):
|
|||||||
|
|
||||||
|
|
||||||
def start():
|
def start():
|
||||||
|
global page_template
|
||||||
|
global toctree
|
||||||
|
|
||||||
|
with open(home + "/template/page.txt") as f:
|
||||||
|
page_template = f.read()
|
||||||
|
|
||||||
|
with open(home + "/template/toctree.txt") as f:
|
||||||
|
toctree = f.read()
|
||||||
|
|
||||||
generate(types_path, types_base)
|
generate(types_path, types_base)
|
||||||
generate(functions_path, functions_base)
|
generate(functions_path, functions_base)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user