Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-16-2014, 10:12 AM   #1
Lucas Malor
Pain in the arse
Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.
 
Lucas Malor's Avatar
 
Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
Manual installation of dictionaries

Since wifi on Kobo is a bit slow and buggy and anyway normally I don't need it, and since I want to install also custom dictionaries, I write this little guide to how manually install dictionaries on Kobo.

First of all, you need to download the dictionaries and put them in the /.kobo/dict/ directory. For custom dictionaries, be sure there's not another package inside the package. If so, it means this is the real dictionary package.

Secondly, you have to open the database with your favourite sqlite editor, and go to the "Dictionary" table. Here you have to set the "Installed" column to "true" for every installed dictionary, update "Size" to the size of the dictionary package in bytes, and change "isSynced" to "true". If you have more than one dictionary for a language (because you are using the custom dicts, for example), you can use some unused languages.

I suggest you to create a .sql file with:

PHP Code:
update "Dictionary" set Installed="true"Size="XXX"LastModified=null where Suffix="YYY"
You must have a line for every dictionary you want to manually install, and replace XXX with the dictionary size, as explained above, and YYY with the corresponding suffix value. After that, you have only to run these sql statements in your db.

Thirdly, you have to run this SQL command:
PHP Code:
insert or replace into "Activity" (IdEnabledTypeActionDateDatavalues ("","TRUE","Sync","2","2014-08-05T11:22:00",X'000000010000002600530059004E0043005F004C004100530054005F00530059004E0043005F00540049004D0045000000100000257D1702AF2FAF02'); 
You have to change the "Date" field before. Current date and time will be good.

Finally, if you want to install custom dictionaries, you have to rename them. The dictionary names must be "dicthtmlSUFFIX.zip", where SUFFIX is the value of the "Suffix" column of the corresponding row. The only exception is the English dictionary, which name is dicthtml.zip.
Please note that you can't search words in custom dictionaries. You have to select a word inside the text and change to the custom dict.

Close you db connection, safely unmount Kobo, and voila'!

Last edited by Lucas Malor; 08-06-2014 at 04:31 AM. Reason: typo
Lucas Malor is offline   Reply With Quote
Old 07-16-2014, 05:26 PM   #2
waterwave
Junior Member
waterwave began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2014
Device: evvse
example

Look at the table
Code:
sqlite3 /run/media/user/KOBOeReader/.kobo/KoboReader.sqlite '.dump Dictionary'
Code:
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE Dictionary (
        Suffix          TEXT,
        Name            TEXT,
        Installed       BOOL,
        Size            TEXT,
        LastModified    TEXT,
        IsSynced        BOOL,
        PRIMARY KEY(Suffix)
);
INSERT INTO "Dictionary" VALUES('-pt','Português','false','11628871','','true');
INSERT INTO "Dictionary" VALUES('-es','Español','false','6544221','','true');
INSERT INTO "Dictionary" VALUES('-en-ja','English - 日本語','false','7589659','','true');
INSERT INTO "Dictionary" VALUES('-fr','Français','false','6355837','','true');
INSERT INTO "Dictionary" VALUES('-en-it','English - Italiano','false','749416','','true');
INSERT INTO "Dictionary" VALUES('-nl','Nederlands','false','2405483','','true');
INSERT INTO "Dictionary" VALUES('-ja','日本語','false','6006033','','true');
INSERT INTO "Dictionary" VALUES('-en-fr','English - Français','false','1217803','','true');
INSERT INTO "Dictionary" VALUES('-it','Italiano','false','9800696','','true');
INSERT INTO "Dictionary" VALUES('-en-pt','English - Português','false','1440049','','true');
INSERT INTO "Dictionary" VALUES('-es-en','Español - English','false','1666763',NULL,'true');
INSERT INTO "Dictionary" VALUES('-pt-en','Português - English','false','3226343',NULL,'true');
INSERT INTO "Dictionary" VALUES('-fr-en','Français - English','false','1586132',NULL,'true');
INSERT INTO "Dictionary" VALUES('-it-en','Italiano - English','false','1019627',NULL,'true');
INSERT INTO "Dictionary" VALUES('-de-en','Deutsch - English','false','926221',NULL,'true');
INSERT INTO "Dictionary" VALUES('-de','Deutsch','false','7317565',NULL,'true');
INSERT INTO "Dictionary" VALUES('-en','English','false','7010221',NULL,'true');
INSERT INTO "Dictionary" VALUES('-en-de','English - Deutsch','false','708515',NULL,'true');
INSERT INTO "Dictionary" VALUES('-en-es','English - Español','false','1240125',NULL,'true');
COMMIT;
Here some Custom Dictionaries
https://www.mobileread.com/forums/sho...d.php?t=232883

copy it to KOBOeReader/.kobo/dict/

Filesize
Code:
ls -l
-rw-r--r-- 1 user users 1896723 16. Jul 22:32 dicthtml-en-se.zip
-rw-r--r-- 1 user users 2306666 16. Jul 22:32 dicthtml-se-en.zip
-rw-r--r-- 1 user users 1338975 16. Jul 22:31 dicthtml-se.zip
rename se to es for a free slot because swedish slot isn't variable

use sqlitebrowser for edit
https://img.bi/#/rTO4rf9!3p8Anuh7ZHo...80icoXljdDAs6V
waterwave is offline   Reply With Quote
Advert
Old 07-16-2014, 09:26 PM   #3
timberwraith
unrepentant bibliophile
timberwraith began at the beginning.
 
timberwraith's Avatar
 
Posts: 5
Karma: 10
Join Date: Jul 2014
Location: Twin Cities, MN
Device: Kobo Glo & Nook
Thanks so much for that guide, Lucas. I've been trying to find a way to do this for a while now. The updates via Wi-Fi or the desktop application are just too darned slow.

Would it be possible to make backup copies of the original dictionary files before the firmware update and simply copy them back rather than manually downloading new copies? Can I assume the structure of these files will remain the same between firmware versions?
timberwraith is offline   Reply With Quote
Old 07-17-2014, 03:50 PM   #4
Lucas Malor
Pain in the arse
Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.
 
Lucas Malor's Avatar
 
Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
Dictionaries are not updated if you sideload the firmware. If you want to update with the Desk App or via wifi you can create a little script at boot that restore the custom dictionary if it was changed in the meanwhile.
Lucas Malor is offline   Reply With Quote
Old 07-19-2014, 01:03 PM   #5
Lucas Malor
Pain in the arse
Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.
 
Lucas Malor's Avatar
 
Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
Added this instruction:

Quote:
Thirdly, you have to go to the "Activity" table, find the row with "Type" column value equal to "Sync" and change the "Date" filed. Current date and time will be good.
If you don't have a "Sync" row, you can try to create it. Its fileds must be: Id = ""; Enabled = true; Type = "Sync"; Action = 2; Date = YYYY-MM-DDTHH:MM:SS. For "Data" field, I attach my current blob value.
If you don't do this, dictionaries will be not visible.

Last edited by Lucas Malor; 07-19-2014 at 01:13 PM.
Lucas Malor is offline   Reply With Quote
Advert
Old 07-20-2014, 01:36 PM   #6
timberwraith
unrepentant bibliophile
timberwraith began at the beginning.
 
timberwraith's Avatar
 
Posts: 5
Karma: 10
Join Date: Jul 2014
Location: Twin Cities, MN
Device: Kobo Glo & Nook
Thanks for your help, Lucas.

I used your suggestion in another thread for putting a dummy user profile into the User table and I now sideload my firmware updates instead of relying upon kobo's PC application or Wi-Fi. That leaves me to do whatever I want with the dictionaries and not worry about syncing messing up anything I've already installed.

Also, it's really nice to not have my ereader's "desktop" cluttered up by kobo's advertisements. I sideload all of the purchases I make from them anyway... So all's well that ends well.

Again, thanks for all of your posts on this forum.
timberwraith is offline   Reply With Quote
Old 08-05-2014, 06:24 AM   #7
Lucas Malor
Pain in the arse
Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.
 
Lucas Malor's Avatar
 
Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
I added the SQL for updating the table more easily. Bye!
Lucas Malor is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving from Portable Installation to Proper Installation Klif Calibre 2 08-28-2013 09:34 AM
Help with installation theo62 Calibre 0 06-13-2011 05:48 AM
Need Help With Installation Dedicated Mind Devices 4 04-10-2011 06:46 PM
Manual installation of eBook Library (Windows 2003, Vista64 etc) and Digital Editions igorsk Sony Reader 39 02-13-2011 07:40 PM
Installation FizzyWater Calibre 5 12-08-2008 03:21 PM


All times are GMT -4. The time now is 02:52 AM.


MobileRead.com is a privately owned, operated and funded community.