Skip to content

Commit

Permalink
優化程式碼架構
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanJui committed Jan 11, 2025
1 parent a8b5f22 commit 56cd1d5
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 5 deletions.
4 changes: 2 additions & 2 deletions a701_作業中活頁檔填入漢字_ R2.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ def main():
type = get_sound_type(wb)
han_ji_khoo = get_han_ji_khoo(wb)
if han_ji_khoo == "河洛話" and type in ["白話音", "文讀音"]:
ca_han_ji_thak_im(wb, sheet_name='漢字注音', cell='V3', hue_im=type, han_ji_khoo="河洛話",
ca_han_ji_thak_im(wb, sheet_name='漢字注音', cell='V3', ue_im_lui_piat=type, han_ji_khoo="河洛話",
db_name='Ho_Lok_Ue.db', module_name='mod_河洛話', function_name='han_ji_ca_piau_im')
elif han_ji_khoo == "廣韻":
ca_han_ji_thak_im(wb, sheet_name='漢字注音', cell='V3', hue_im="文讀音", han_ji_khoo="廣韻",
ca_han_ji_thak_im(wb, sheet_name='漢字注音', cell='V3', ue_im_lui_piat="文讀音", han_ji_khoo="廣韻",
db_name='Kong_Un.db', module_name='mod_廣韻', function_name='han_ji_ca_piau_im')
else:
print("無法執行漢字標音作業,請確認【env】工作表【語音類型】及【漢字庫】欄位的設定是否正確!")
Expand Down
6 changes: 3 additions & 3 deletions a702_查找及填入漢字標音.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
wb=wb,
sheet_name="漢字注音",
cell="V3",
hue_im="白話音",
ue_im_lui_piat="白話音",
han_ji_khoo="河洛話",
db_name="Ho_Lok_Ue.db",
module_name="mod_河洛話",
Expand All @@ -61,7 +61,7 @@
wb=wb,
sheet_name="漢字注音",
cell="V3",
hue_im="文讀音",
ue_im_lui_piat="文讀音",
han_ji_khoo="河洛話",
db_name="Ho_Lok_Ue.db",
module_name="mod_河洛話",
Expand All @@ -72,7 +72,7 @@
wb=wb,
sheet_name="漢字注音",
cell="V3",
hue_im="文讀音",
ue_im_lui_piat="文讀音",
han_ji_khoo="廣韻",
db_name="Kong_Un.db",
module_name="mod_廣韻",
Expand Down
Binary file not shown.
50 changes: 50 additions & 0 deletions process_log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,53 @@ TypeError: can only concatenate str (not "NoneType") to str
2025-01-10 23:46:54,795 - INFO - 專案根目錄為: C:\work\Piau-Im
2025-01-10 23:47:06,583 - INFO - 儲存檔案至路徑:.\output7\【河洛白話注音-雅俗通】《尚有力量的每日祈禱文》.xlsx
2025-01-10 23:47:06,584 - INFO - 製作【漢字標音】網頁己完成!
2025-01-11 13:03:18,256 - INFO - 作業開始
2025-01-11 13:03:18,258 - INFO - 專案根目錄為: C:\work\Piau-Im
2025-01-11 13:03:18,295 - INFO - 【待注音漢字】總字數為: 143
2025-01-11 13:03:18,428 - INFO - 儲存格內容清除完畢
2025-01-11 13:03:24,900 - INFO - 儲存格格式重設完畢
2025-01-11 13:03:35,169 - INFO - 待注音漢字已填入【漢字注音】工作表
2025-01-11 13:03:35,212 - INFO - 開始【漢字標音作業】 - 河洛話: 白話音
2025-01-11 13:03:46,665 - INFO - 完成【漢字標音作業】 - 河洛話: 白話音
2025-01-11 13:03:46,915 - INFO - 己存檔至路徑:{file_path}
2025-01-11 13:03:46,915 - INFO - a701_作業中活頁簿填入漢字.py 程式已執行完畢!
2025-01-11 13:06:28,889 - INFO - 作業開始
2025-01-11 13:06:28,890 - INFO - 專案根目錄為: C:\work\Piau-Im
2025-01-11 13:06:28,925 - INFO - 【待注音漢字】總字數為: 143
2025-01-11 13:06:29,076 - INFO - 儲存格內容清除完畢
2025-01-11 13:06:35,615 - INFO - 儲存格格式重設完畢
2025-01-11 13:06:45,842 - INFO - 待注音漢字已填入【漢字注音】工作表
2025-01-11 13:06:45,889 - INFO - 開始【漢字標音作業】 - 河洛話: 白話音
2025-01-11 13:06:57,253 - INFO - 完成【漢字標音作業】 - 河洛話: 白話音
2025-01-11 13:06:57,506 - INFO - 己存檔至路徑:{file_path}
2025-01-11 13:06:57,507 - INFO - a701_作業中活頁簿填入漢字.py 程式已執行完畢!
2025-01-11 13:13:18,588 - INFO - 作業開始
2025-01-11 13:13:18,589 - INFO - 專案根目錄為: C:\work\Piau-Im
2025-01-11 13:13:18,622 - INFO - 【待注音漢字】總字數為: 143
2025-01-11 13:13:18,777 - INFO - 儲存格內容清除完畢
2025-01-11 13:13:25,307 - INFO - 儲存格格式重設完畢
2025-01-11 13:13:35,580 - INFO - 待注音漢字已填入【漢字注音】工作表
2025-01-11 13:13:35,620 - INFO - 開始【漢字標音作業】 - 河洛話: 白話音
2025-01-11 13:13:47,015 - INFO - 完成【漢字標音作業】 - 河洛話: 白話音
2025-01-11 13:13:47,263 - INFO - 己存檔至路徑:{file_path}
2025-01-11 13:13:47,263 - INFO - a701_作業中活頁簿填入漢字.py 程式已執行完畢!
2025-01-11 13:15:01,951 - INFO - 作業開始
2025-01-11 13:15:01,952 - INFO - 專案根目錄為: C:\work\Piau-Im
2025-01-11 13:15:01,984 - INFO - 【待注音漢字】總字數為: 143
2025-01-11 13:15:02,122 - INFO - 儲存格內容清除完畢
2025-01-11 13:15:08,685 - INFO - 儲存格格式重設完畢
2025-01-11 13:15:18,972 - INFO - 待注音漢字已填入【漢字注音】工作表
2025-01-11 13:15:19,013 - INFO - 開始【漢字標音作業】 - 河洛話: 白話音
2025-01-11 13:15:31,071 - INFO - 完成【漢字標音作業】 - 河洛話: 白話音
2025-01-11 13:15:31,328 - INFO - 己存檔至路徑:{file_path}
2025-01-11 13:15:31,328 - INFO - a701_作業中活頁簿填入漢字.py 程式已執行完畢!
2025-01-11 13:19:40,324 - INFO - 作業開始
2025-01-11 13:19:40,325 - INFO - 專案根目錄為: C:\work\Piau-Im
2025-01-11 13:19:40,360 - INFO - 【待注音漢字】總字數為: 143
2025-01-11 13:19:40,499 - INFO - 儲存格內容清除完畢
2025-01-11 13:19:47,170 - INFO - 儲存格格式重設完畢
2025-01-11 13:19:57,678 - INFO - 待注音漢字已填入【漢字注音】工作表
2025-01-11 13:19:57,721 - INFO - 開始【漢字標音作業】 - 河洛話: 白話音
2025-01-11 13:20:09,417 - INFO - 完成【漢字標音作業】 - 河洛話: 白話音
2025-01-11 13:20:09,669 - INFO - 己存檔至路徑:{file_path}
2025-01-11 13:20:09,669 - INFO - a701_作業中活頁簿填入漢字.py 程式已執行完畢!

0 comments on commit 56cd1d5

Please sign in to comment.