HDG Dictionaries for e-readers (Koreader, Kindle, maybe more?)
Table of Contents
1 Dictionaries for HDG, for use with Koreader and Kindle
I have a rooted florted Kobo with Koreader on it, and since I put
the the Glossary and List of Xenodrugs wiki pages on it for reference
while reading, I figured I'd convert these to a proper dictionary so I
can look stuff up directly from the fic I'm reading.
After I published the dictionaries, I got some help from someone with a Kindle so I was able to convert them for those devices too!
To downoad, either grab it from megaupload, or join the thread in the HDG discord. I don't know a better place to host a 500kb zip file without paying 60 euros a year, or having it be used to train AI. So no neocities, github or gitlab.
The dictionaries are built using pyglossary from a csv file. The
download includes all built files already, but if you want to build
them yourself, use build-koreader.sh
and build-kindle.sh
and then
you'll find the files in the output
folder for each platform.
Current dictionaries a taken from the wiki, the Glosssary and List of Xenodrugs. I've made some small modifications, such as removing links to the wiki (alas, they didn't work) and added some phonetics to difficult words.
2 Pictures
Figure 1: An example of looking up a word in the glossary. Fic is BELTANE WILDFIRE.
Figure 2: An example of looking up a xenodrug class. Fic is Through the Looking Glass.
3 Changelog
3.1 1.1
- There's a Kindle version now!
- The zip has the files neatly ordered into folders now
- Dictionaries are now set up as "en-en" because some software was choking on "Terran/English".
- For the Xenodrugs list, I set up some synonyms. If you search for "Class A" without a hyphen, it sends you to the entry for "Class-A", and "Class Zwl" will send you to "Class-Z-wl"
- Fixed the Xa'a-ackétøth synonyms.
3.2 1.0
- Initial public release.
4 What is Koreader?
Koreader is an alternative e-book reader and file manager app for Kobo e-readers. There's also a Kindle version, and you can even install the .apk file on any other android device.
Installation instructions for Kobo e-readers, manual and automatic options are availble, it's not a lot of work and doesn't void the warranty, but you should always make a back-up beforehand: https://www.mobileread.com/forums/showthread.php?t=314220
For android, grab a release here (warning, they're using crappy AI art): https://github.com/koreader/koreader/releases
Koreader turned an obnoxious and borderline useless corpo device full of advertising into a good little e-reader.
If you're planning to buy a Kobo, it won't let you do anything until you register its built-in shop, where they make you pay to for out-of-copyright classic literature. It's so stupid.
There's a workaround for this, if you have a PC or Mac: https://yingtongli.me/blog/2018/07/30/kobo-rego.html
5 How to install this into Koreader
First unzip the file somewhere. It contains both the source,
documentation, and ready-made dictionaries in the output/koreader
folder.
Connect the Kobo device to your computer or android device via USB and
go to .adds/kobo/data/dict
. This folder may be hidden, so enable the
setting that lets you see hidden folders. Create new a subfolder here,
I just called mine HDG
. Then place all the dictionary files from the
output/koreader
folder in there. You can drop multiple dictionaries
in a single folder, so the HDG Glossary and the Xenodrugs can sit
there comfortably together.
Eject/unmount the USB connection and Koreader will reboot. That's it!
Finally, you should set the HDG Glossary as the top most dictionary on your device, so that you're shown HDG's version of terms like "cotyledon" instead of the botanical one.
Technical deets: The pyglossary manual says "Use StarDict (Merge Syns) plugin (instead of this one) to create glossaries for using in sdcv or KOReader" but this doesn't appear to work right. Regular StarDict format seems to work perfectly fine. I have no idea why, but it all works so whatever.
6 How to install this onto a Kindle
This can only be done over USB, just drop the HDG Glossary.mobi
and
Xenodrug Classes.mobi
folders from output/kindle
onto your Kindle.
If you run into problems I can't help you, since I don't have a Kindle myself. But maybe another sophont with a Kindle can? We're a community, we can help each other out.
Please let me know if you ran into problems and were able to fix them, I will update my documentation.
To build for Kindle, you'll need the kindlegen
executable, which you
can get at https://archive.org/download/kindlegen_linux_2_6_i386_v2_9
Just drop it somewhere in your $PATH
. Hardcoding the path in the
build script caused all sorts of weird issues.
7 Other e-readers
Pyglossary can support many different formats, so I can probably convert the dictionaries for other devices. But I can't test them.
Poke me and I'll generate a dictionary in your desired format and you can give it a shot. The download includes the full sources so you can even do it yourself. Please let me know how/if it worked, I'll gladly add it here.
Here's a list of supported formats for Pyglossary: https://github.com/ilius/pyglossary#supported-formats
8 Testing
In the tests
folder you'll find dictionary-test-document.epub
which will let you easily test terms and synonyms. And also the
dictionary-test-document.odt
that I used to create the epub.
9 Style guide for the spreadsheet/CSV
In case we're gonna expand them. We should probably coordinate this with the sophonts who work on the wiki. I could probably script something that just imports the last version from the wiki.
The Glossary is based off the wiki page from diff
them to see what's changed.
The csv table is set up as follows:
9.1 First column
The term goes here. Start with a capital.
If it's a proper name, like "Affini Compact", both words get capitalized. But "Hypermetric weapon" only has the first word capitalized. No harm in getting this wrong, looking up words is not case-sensitive.
All xenodrugs classes are spelled as "Class-A", with a hyphen. This is so you're not getting results for the word "Class" in all your other dictionaries.
9.2 Second column
The definition goes here. For really uncommon words, I have included a phonemic description between two slashes, followed by <br><br> to create two new lines. Second language English speakers (me! :3) will appreciate this. "Cotyledon" trips up a lot of native speakers too.
If the term has an abbreviation, mention it first.
If the description field has quote characters in it, only use single quotes so the CSV is parsed correctly.
Basic HTML works on the Koreader, I have no idea about other platforms. Despite that, I tried linking directly to the HDG wiki but it didn't result in a clickable link, otherwise I woulda left the links in.
9.3 Third column
Synonyms go here, each one separated by a comma. This includes spelling variants and abbreviated forms. For convenience, I've even included versions of words without diacritics so that "J-Cafe", "Xa'a-acketoth" and "Vreeut" still send the user to "J-Café", "Xa'a-ackétøth" and "Vreeüt" and so on.
10 Contacting me
I'm in the HDG Discord as 'TBM'. I'm also on tumblr at https://thebenevolentmachine.tumblr.com
Either will work but Tumblr may be difficult about sharing links.