start pandoc web server inside python process

This commit is contained in:
Akbar Rahman 2024-01-02 04:03:02 +00:00
parent 48f64bf3d4
commit 80dce5d4ed
Signed by: alvierahman90
GPG Key ID: 6217899F07CA2BDF

View File

@ -505,7 +505,14 @@ def main(args):
# TODO implement useful logging and debug printing # TODO implement useful logging and debug printing
if __name__ == '__main__': if __name__ == '__main__':
pandoc_process = subprocess.Popen(["/usr/bin/pandoc-server"],
stdout=subprocess.PIPE)
time.sleep(1)
print(pandoc_process.stdout)
try: try:
sys.exit(main(get_args())) sys.exit(main(get_args()))
except KeyboardInterrupt: except KeyboardInterrupt:
sys.exit(0) sys.exit(0)
finally:
pandoc_process.kill()