give brief notes on converting html files:
Step 1: combining all html files
- put all html files in one folder
- open terminal, and type "cd " and drag your folder to the terminal, you will get "cd [actual folderpath]", press enter
- type "cat *.html > myDictionary.csv"
result: you will get all your html content in a single file, "myDictionary.csv"
remarks: do not close the terminal yet.
Step 2: format the csv file
- use text editor (my preference: text wrangler)
- replace all TAB characters if any, search "\t", replace option: " "
- search (regular expression) for catchwords of your dictionary, e.g. search: "<h1>(.*?)</h1>" replace option: "\1\t&"
- make each entry a single line, e.g. search "\r([^\r\t]*?$)" replace option: "\1"
Step 3: import into sqlite file (the quickest way is to get a current dictionary from e-Sword folder or download one from this site, *.dcti):
- rename the file, like myDictionary.dcti
- put this file in the same place as myDictionary.csv
- type in terminal "sqlite3 myDictionary.dcti"
- "DELETE FROM Dictionary;"
- "VACUUM;"
- ".separator "\t""
- ".import myDictionary.csv Dictionary"
For accurate syntax of unix command, you may refer: https://www.sqlite.org/cli.html or simply use interface like http://sqlitebrowser.org
Done.
Remarks: you may only need 5-15 min to finish a dictionary module, if your html files are well-structured.
Edited by Eliran Wong, 17 May 2017 - 09:38 AM.