-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.py
41 lines (33 loc) · 1.1 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"""
TODO: 转换markdown文件为pdf文件
@author: yaunsine
@date: 2023-03-07
"""
# This is a sample Python script.
# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
import sys
import os
import time
from transferFile import *
import threading
def print_hi(name):
# Use a breakpoint in the code line below to debug your script.
print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint.
def grip_run(md_from=None) -> None:
os.system("combine.bat ")
os.system("grip {0}".format(md_from))
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
md_file_from = "result/result.md"
pdf_file_to = "result/result.pdf"
# grip_run(md_from=md_file_from)
thread1 = threading.Thread(target=grip_run, args=(md_file_from, ))
thread2 = threading.Thread(target=transfer, args=(pdf_file_to, ))
# transfer(pdf_file_to)
thread1.start()
time.sleep(5)
thread2.start()
thread1.join()
thread2.join()
print("thread kill...")