mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 11:32:30 +00:00
Create Python tools in favour of shell scripts
Python is likely to be installed when working on Python code, which should make it more portable and consistent.
This commit is contained in:
17
tools/docgen.py
Normal file
17
tools/docgen.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Run `sphinx-build` to create HTML documentation and detect errors.
|
||||
"""
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def run(*args: str) -> int:
|
||||
return subprocess.run((sys.executable, "-m", *args)).returncode
|
||||
|
||||
|
||||
def main() -> None:
|
||||
exit(run("sphinx", "-nW", "client/doc", "dist-doc"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Reference in New Issue
Block a user