This post is outdated. See the following for update.
Dictionary Patch 2
Goal
I'v already written some Apple script on Hackintosh for fast dictionary search. Now I seek to have a handy dictionary at disposal on windows platform.
- [x] Find a good Dictionary
- [x] Modify for better user experience
- [x] FInd a good Dictionary Software
- [x] Modify for better user experience
- [x] Integrate with Shanbay
- [x] Basic intergration by simulating user activity
- [ ] Advanced intergration by combining webpage with local software
Dictionary
New Oxford English-Chinese Dictionary
Dictionary License
Obviously it's illegal to redistribute any Oxford dictionaries in any form, and I do not know for sure if I have any right to use any of them in case I didn't directly buy the specific version.
However, given the fact that I own both the correspondent printed version and at least one digital edition (bought), I guess I have every right to use some other digital version provided throughtout the Internet. After all, it's just some transcription work which isn't asked for any pay. Appreciate it!
As to modifying it for my personal use, I reckon no problems with it, so does the dictionary softeware below.
Anyway I won't provide any dictionary as I'm not responsible of checking whether downloaders have the license to use it.
Dictionary Software
Sorry but it's not a free software. I haven't found any better choice on Windows platform, even it's still not perfect on some aspects, including UI, hotkey, etc. So patches needed.
If you do know a better choice, please let me know.
Eudic 11.6.3 (Build136)
This is the most stable version, and responds much more faster than its following versions. Curious. Wonder if the company ill-treats its developer...
Eudic 12.1.2 (Build242)
Better UI with more bugs and slower responding speed.
Advanced Integration
I use Shanbay for words learning. So don't be surprised if you see anything regarding Shanbay, Chrome, etc.
Tool
MdxExport.exe
MdxBuilder.exe
Source
.mdx = compact .html
Replace table:
Find |
Replace with |
<hr> |
<br><br><br> |
<font color="red"> |
<font color="black"> |
<font color="blue"> |
<font color="grey"> |
■ |
▶ |
<br><b><font color="green" size="+1">语源</font></b><br> |
<br><b>ORIGIN</b><br><hr> |
<br><b><font color="green" size="+1">派生</font></b><br> |
<br><b>DERIVATIVES</b><br><hr> |
<br><b><font color="green" size="+1">用法</font></b><br> |
<br><b>USAGE</b><br><hr> |
<br><b><font color="green" size="+1">常用词组</font></b><br> |
<br><b>PHRASES</b><br><hr> |
<br><b><font color="green" size="+1">继承用法</font></b><br> |
<br><b>PHRASAL VERBS</b><br><hr> |
Style
Eudic uses web page css for typography. Path:
C:\Program Files (x86)\Eudic\dat\res\style.css
Add:
/*
* by MK
*/
/*====== Font ======*/
* {
font-family: "Microsoft Yahei", Segoe UI !important;
}
/*====== Pronunciation ======*/
.py, .PY {
color: #4E4E4E;
}
.Phonitic {
color: #4E4E4E;
font-family: Lucida Sans Unicode, Arial Unicode,Arial !important;
font-size: 11pt;
}
/*====== Paragraph ======*/
.expDiv {
line-height: 1.5em !important;
}
Fast Search Script
Eudic 11.6.3 (Build136)
; To SZL, with best wishes
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
^<#a::
send, ^{c}
Gosub, Pronounce
Gosub, Activate
Gosub, Paste
Gosub, Back
return
Pronounce:
If WinActive("扇贝,知道你在改变 - Google Chrome")
{
send, {p}
}
return
Activate:
IfWinExist, ahk_class TFormMainEudic ;Qt5QWindowIcon
{
WinActivate, ahk_class TFormMainEudic
}
else{
Run, eudic.exe, C:\Program Files (x86)\eudic\
Loop
{
Sleep, 100
}
Until WinActive("ahk_class TFormMainEudic")
Sleep, 1000
}
return
Paste:
IfWinActive, ahk_class TFormMainEudic
{
send, {enter}
send, ^{v}
send, {enter}
}
return
Back:
IfWinExist 扇贝,知道你在改变 - Google Chrome
{
WinActivate, 扇贝,知道你在改变 - Google Chrome
}
return
Eudic 12.1.2 (Build242)
; To SZL, with best wishes
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
^+a::
send, ^{c}
Gosub, Pronounce
Gosub, Activate
Gosub, Paste
Gosub, Back
return
Pronounce:
If WinActive("扇贝,知道你在改变 - Google Chrome")
{
send, {p}
}
return
Activate:
IfWinExist, ahk_class Qt5QWindowIcon ;TFormMainEudic
{
WinActivate, ahk_class Qt5QWindowIcon
}
else{
Run, eudic.exe, C:\Program Files (x86)\eudic\
Loop
{
Sleep, 100
}
Until WinActive("ahk_class Qt5QWindowIcon")
Sleep, 3000
}
return
Paste:
IfWinActive, ahk_class Qt5QWindowIcon
{
send, {enter}
Sleep, 100
send, ^{v}
send, {enter}
}
return
Back:
IfWinExist 扇贝,知道你在改变 - Google Chrome
{
WinActivate, 扇贝,知道你在改变 - Google Chrome
}
return
End note
I put little faith on the Eudic software I use for now.
After all, as to core intellectual property, the software has no right to officially publish any Oxford dictionaries, Longman Dictionary of Contemporary English or anything matching them, while all above are quite easily accessed online.
As a dictionary content browser and search engine, it's gradually losing its advantages comparing to vast competing rivals who charge free, espicially in terms of bug, stability, and responding speed.