From 80dce5d4ed36933c80c0b344af2b21bd24e69ee0 Mon Sep 17 00:00:00 2001 From: Akbar Rahman Date: Tue, 2 Jan 2024 04:03:02 +0000 Subject: [PATCH] start pandoc web server inside python process --- gronk.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gronk.py b/gronk.py index 80dfcdc..667448d 100755 --- a/gronk.py +++ b/gronk.py @@ -505,7 +505,14 @@ def main(args): # TODO implement useful logging and debug printing if __name__ == '__main__': + pandoc_process = subprocess.Popen(["/usr/bin/pandoc-server"], + stdout=subprocess.PIPE) + time.sleep(1) + print(pandoc_process.stdout) + try: sys.exit(main(get_args())) except KeyboardInterrupt: sys.exit(0) + finally: + pandoc_process.kill()