-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
39 lines (30 loc) · 1.15 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
# Author Shin Li
# Update Gitbook formulary
# Make new md files, new summary, and push to GitHub
import subprocess
# Ask the user if they have updated changelog.md
user_input = input('Have you updated changelog.md? (Y/N): ')
if user_input.upper() == 'Y':
print('網頁版處方集更新開始')
print('STEP 1 開始')
print('STEP 1 執行中...')
subprocess.run(['python', 'formulary_01_make-md.py'])
print('STEP 1 完成')
print('STEP 2 開始 Generate new SUMMARY.md')
print('STEP 2 執行中...')
# generate new SUMMARY.md
subprocess.run(['python', 'gitbook - auto - Y
summary.py', ' - o',
'C:\\Users\\152551\\formulary-gitbook'])
print('STEP 3 完成')
print('STEP 3 modify-summary 開始')
print('STEP 3 執行中...')
subprocess.run(['python', 'formulary_03_modify-summary.py'])
print('STEP 3 完成')
print('STEP 4 make_index 開始')
print('STEP 4 執行中...')
subprocess.run(['python', 'formulary_04_make_index.py'])
print('STEP 4 完成')
print('資料庫更新完成!')
else:
print('請更新 changelog.md 再執行處方集更新。')