Skip to content

Commit

Permalink
讀入《異體字字典》的《說文》資料完成。感恩感恩 讚歎讚歎 南無阿彌陀佛
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarsun72 committed Sep 16, 2024
1 parent 4ba8387 commit 205c467
Show file tree
Hide file tree
Showing 5 changed files with 224 additions and 31 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,20 +305,23 @@ Ctrl + F12 :檢索《國語辭典》
- Alt + Shift + \ (即 Alt + | ): 以選取的文字查找《國語辭典》若有結果,在其後加上注音括注,並加上檢索結果網址之超連結
- Alt + j 或 Alt + s :**單字**檢索《白雲深處人家·說文解字·圖像查閱》之字頭。檢索有結果後,直接點開藤花榭本以供檢覈(即會開出2個分頁。第2個--最後一個開啟的--是藤花榭本書頁圖。關閉後即回到第1個分頁,即可檢視站內所收諸版本該字頭所在之書頁圖)。(j = jie 《說文解字》的「解」,s :說 shuo 的 s)
- Alt + shift + j 或 Alt + shift + s :以釋義內文檢索《白雲深處人家·說文解字·圖文檢索WFG版》。(j = jie 《說文解字》的「解」,s :說 shuo 的 s)
- Alt + v : **單字**檢索《異體字字典》並讀入其《說文》及網址資料以便引文。
- Alt + n : **單字**檢索《漢語多功能字庫》並取回其說文解釋欄位之值插入至插入點位置。 (n= 能 neng)
- Alt + o : **單字**檢索[《說文解字》網站](https://www.shuowen.org/)並取回其解釋欄位及網址值插入至插入點位置。 (o= 說文解字 ShuoWen.ORG 的 O)
- Ctrl + Alt + x : **單字**檢索《康熙字典網上版》(x = xi 熙)
- Ctrl + d + s (按住 Ctrl 依序按d、s) :檢索《國學大師》(ds:大師 da-shi 的 d、s)
- Alt + g : 以選取文字檢索Google
- Alt + b : 以選取文字檢索百度(百度 baidu 的 b )
- Alt + shift + , 即 ' Alt + < 或 Ctrl + Alt + F9 或 Alt + shift + F5 同在TextForCtext 的 Alt + , 與 Alt + F9 與 Alt + F5。《漢籍全文資料庫》或《中國哲學書電子化計劃》檢索《易》學關鍵字。蓋藉由本軟件介面作中介爾。
- Alt + \` : 貼上複製之內容時檢查是否已經錄入,在注文前後加上圓括弧,並標識《易》學關鍵字
- Alt + Shift + \` : 貼上複製自《漢籍全文資料庫》之內容時檢查是否已經錄入,在注文前後加上圓括弧,並標識《易》學關鍵字
- Alt + 1 : 貼上複製自《中國哲學書電子化計劃》(CTP)的文字版之內容並在注文前後加上圓括弧。
- Alt + 7 : 將文件中的異體字轉正體字
- Ctrl + Alt + = : 以選取的文字檢索 CTP 所收阮元《十三經注疏·周易正義》並在選取文字上加上該檢索結果頁面之超連結
- Alt + , : 以選取的文字檢索文件中第一段所載之 CTP 所收本網址,並在選取文字上加上該檢索結果頁面之超連結

**以下功能,目前須先開啟TextForCtext才能使用。** 原理是以本軟件作為中介故。
- Alt + shift + , 即 ' Alt + < 或 Ctrl + Alt + F9 或 Alt + shift + F5 同在TextForCtext 的 Alt + , 與 Alt + F9 與 Alt + F5。《漢籍全文資料庫》或《中國哲學書電子化計劃》檢索《易》學關鍵字。蓋藉由本軟件介面作中介爾。
- Alt + \` : 貼上複製之內容時檢查是否已經錄入,在注文前後加上圓括弧,並標識《易》學關鍵字
- Alt + Shift + \` : 貼上複製自《漢籍全文資料庫》之內容時檢查是否已經錄入,在注文前後加上圓括弧,並標識《易》學關鍵字
> 若無標點則直接送去《古籍酷》自動標點
## 快速鍵一覽:

### 在表單(操作介面視窗)任何位置按下:
Expand Down
Binary file modified TextForCtextPortable.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions WordVBA/ClipBoardObject.bas
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Rem
#If VBA7 Then
#If Win64 Then
' 64位元環境
Public Declare PtrSafe Function OpenClipboard Lib "user32" (ByVal hwnd As LongPtr) As Long
Public Declare PtrSafe Function OpenClipboard Lib "user32" (ByVal hWnd As LongPtr) As Long
Public Declare PtrSafe Function EmptyClipboard Lib "user32" () As Long
Public Declare PtrSafe Function CloseClipboard Lib "user32" () As Long
Public Declare PtrSafe Function SetClipboardData Lib "user32" (ByVal uFormat As Long, ByVal hMem As LongPtr) As LongPtr
Expand All @@ -23,7 +23,7 @@ Rem
Public Declare PtrSafe Sub RtlMoveMemory Lib "kernel32" (ByVal Destination As LongPtr, ByVal Source As LongPtr, ByVal Length As LongPtr)
#Else
' 32位元環境
Public Declare Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function OpenClipboard Lib "user32" (ByVal hWnd As Long) As Long
Public Declare Function EmptyClipboard Lib "user32" () As Long
Public Declare Function CloseClipboard Lib "user32" () As Long
Public Declare Function SetClipboardData Lib "user32" (ByVal uFormat As Long, ByVal hMem As Long) As Long
Expand Down
73 changes: 69 additions & 4 deletions WordVBA/Network.bas
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,15 @@ Sub
Else
.Collapse wdCollapseEnd
End If
.InsertAfter ar(0) & VBA.Chr(13)
'插入取回的《說文》內容
.TypeText ",《說文》云:"
.InsertAfter ar(0) & VBA.Chr(13) 'ar(0)=《說文》內容
.Collapse wdCollapseEnd
If Selection.End = Selection.Document.Range.End - 1 Then
Selection.Document.Range.InsertParagraphAfter
End If
.Font.Size = fontsize
.InsertAfter ar(1)
.InsertAfter ar(1) '植入網址
SystemSetup.contiUndo ur
.Collapse wdCollapseStart
With .Application
Expand Down Expand Up @@ -227,10 +232,70 @@ Sub
Else
.Collapse wdCollapseEnd
End If
.InsertAfter ar(0) & VBA.Chr(13)
.TypeText ",《說文》云:"
.InsertAfter ar(0) & VBA.Chr(13) 'ar(0)=《說文》內容
.Collapse wdCollapseEnd
If Selection.End = Selection.Document.Range.End - 1 Then
Selection.Document.Range.InsertParagraphAfter
End If
.Font.Size = fontsize
.InsertAfter ar(1) '插入網址
SystemSetup.contiUndo ur
.Collapse wdCollapseStart
With .Application
.Activate
With .ActiveWindow
If .WindowState = wdWindowStateMinimize Then
.WindowState = wdWindowStateNormal
.Activate
End If
End With
End With
End With
End If
End Sub
Sub 查異體字字典並取回其說文釋形欄位及網址值插入至插入點位置()
Rem Alt + v (v= 異體字 variants 的 v)
If Selection.Characters.Count > 1 Then
MsgBox "限查1字", vbExclamation ', vbError
Exit Sub
End If
Dim ar As Variant, x As String
x = Selection.text
ar = SeleniumOP.LookupDictionary_of_ChineseCharacterVariants_RetrieveShuoWenData(x)
If ar(0) = vbNullString Then
word.Application.Activate
MsgBox "找不到,或網頁當了或改版了!", vbExclamation
With Selection.Application
.Activate
With .ActiveWindow
If .WindowState = wdWindowStateMinimize Then
.WindowState = wdWindowStateNormal
.Activate
End If
End With
End With
Else
Dim ur As UndoRecord, fontsize As Single
SystemSetup.stopUndo ur, "查異體字字典並取回其說文釋形欄位及網址值插入至插入點位置"
With Selection
fontsize = VBA.IIf(.Font.Size = 9999999, 12, .Font.Size) - 4
If fontsize < 0 Then fontsize = 10
If .Type = wdSelectionIP Then
.Move
Else
.Collapse wdCollapseEnd
End If
.TypeText ",《說文》:" & VBA.Chr(13)
Dim shuoWen As String
shuoWen = VBA.Replace(VBA.Replace(ar(0), ":,", ":" & x & ","), "段注本:", VBA.Chr(13) & "段注本:")
.InsertAfter shuoWen & VBA.Chr(13) 'ar(0)=《說文》內容
.Collapse wdCollapseEnd
If Selection.End = Selection.Document.Range.End - 1 Then
Selection.Document.Range.InsertParagraphAfter
End If
.Font.Size = fontsize
.InsertAfter ar(1)
.InsertAfter ar(1) '插入網址
SystemSetup.contiUndo ur
.Collapse wdCollapseStart
With .Application
Expand Down
Loading

0 comments on commit 205c467

Please sign in to comment.