Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-05-2020, 06:52 AM   #1
ichnilatis
Groupie
ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.
 
Posts: 169
Karma: 1686
Join Date: Jul 2020
Location: Greece
Device: Pocketbook Touch Lux 5
New hyphenation patterns

Hi,

Is there a way to make new hyphenation patterns for Pocketbook and KoReader (.pattern files)?
I have some files of spelling and hyphenation dictionaries for ancient and polytonic Greek that comes actually from OpenOffice and I use them also in InDesign. Could they be converted some how for Pocketbook or/and KoReader?

Thanks in advance.
ichnilatis is offline   Reply With Quote
Old 12-05-2020, 01:14 PM   #2
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,271
Karma: 2200049
Join Date: Apr 2014
Device: BQ Cervantes 4
No idea about Pocketbook.

For KOReader you can add them yourself to /mnt/ext1/applications/koreader/data/hyph and edit the file /mnt/ext1/applications/koreader/frontend/apps/reader/modules/readertypography.lua to include the new definitions.

If you go that route you'll need to update readertypography again after each update, so please consider submitting the patterns upstream: hopefully they can be integrated in both KOReader and Coolreader

See a recent example which added two latin hyphen patterns: https://github.com/koreader/crengine/pull/393
pazos is offline   Reply With Quote
Advert
Old 12-05-2020, 01:28 PM   #3
eMole
Zealot
eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.
 
Posts: 130
Karma: 546310
Join Date: Jun 2011
Device: PocketBook Touch HD, PocketBook Era
For PB firmware 5.xx you can add new hyphenation files or manipulate existing ones, just look around for files like hyph_XX.dic files in some probably hidden folder. Works for ePubs. Don't have 6.x firmware.

Those hyph dictionaries are OpenOffice files, by the way.
eMole is offline   Reply With Quote
Old 12-10-2020, 05:47 AM   #4
ichnilatis
Groupie
ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.
 
Posts: 169
Karma: 1686
Join Date: Jul 2020
Location: Greece
Device: Pocketbook Touch Lux 5
Quote:
Originally Posted by pazos View Post
No idea about Pocketbook.

For KOReader you can add them yourself to /mnt/ext1/applications/koreader/data/hyph and edit the file /mnt/ext1/applications/koreader/frontend/apps/reader/modules/readertypography.lua to include the new definitions.

If you go that route you'll need to update readertypography again after each update, so please consider submitting the patterns upstream: hopefully they can be integrated in both KOReader and Coolreader

See a recent example which added two latin hyphen patterns: https://github.com/koreader/crengine/pull/393
Thank you for your reply, but how can I edit file /mnt/ext1/applications/koreader/frontend/apps/reader/modules/readertypography.lua?
ichnilatis is offline   Reply With Quote
Old 12-10-2020, 02:35 PM   #5
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,271
Karma: 2200049
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by ichnilatis View Post
Thank you for your reply, but how can I edit file /mnt/ext1/applications/koreader/frontend/apps/reader/modules/readertypography.lua?
With a text editor (a good one like Notepad++, not windows notepad)

You need to edit the LANGUAGES table and add there the new entry.

Please read the comments in the link, all bits of info are explained there

Once you're done please consider to submit a patch, so other users can benefit from the new pattern.
pazos is offline   Reply With Quote
Advert
Old 12-14-2020, 05:20 AM   #6
ichnilatis
Groupie
ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.ichnilatis once ate a cherry pie in a record 7 seconds.
 
Posts: 169
Karma: 1686
Join Date: Jul 2020
Location: Greece
Device: Pocketbook Touch Lux 5
The truth is that I don't know much about programming, scripts etc.
So, my question is if and how can I convert the language files I have (e.g. grc_GR.aff, grc_GR.dic, hyph_grc_GR.dic for Ancient Greek) into a .pattern file.
I can't find it out in the above links.

Τhank you and please forgive my ignorance.
ichnilatis is offline   Reply With Quote
Old 12-14-2020, 01:30 PM   #7
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,271
Karma: 2200049
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by ichnilatis View Post
The truth is that I don't know much about programming, scripts etc.
So, my question is if and how can I convert the language files I have (e.g. grc_GR.aff, grc_GR.dic, hyph_grc_GR.dic for Ancient Greek) into a .pattern file.
I can't find it out in the above links.

Τhank you and please forgive my ignorance.
No idea about your input files, sorry.

You can convert .tex hyphenation files to KOReader/Coolreader pattern files with https://gist.github.com/strn/f5c6d9c...d09f21ecad1ffa

IIRC these kind of files (the output of the script) were originally from FBReader, so they should be also compatible with a lot of ebook readers that steal their code.

A source for tex dicts is http://tug.org/tex-hyphen/#languages. There might be others, IDK.
pazos is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
E-reader for knitting patterns Turboweevel Which one should I buy? 31 04-10-2019 07:38 PM
Colorizing Theme Patterns HisLittleOne Marvin 0 04-12-2014 04:07 PM
Perpetual Patterns Randeep Reading Recommendations 1 02-24-2012 10:44 AM
Hacks Patterns from squidfingers.com/patterns screensavers, lot of them. Jeton Amazon Kindle 6 01-29-2011 08:39 PM
use my K3 to store knitting patterns robinhooddaffy Amazon Kindle 6 09-18-2010 09:04 AM


All times are GMT -4. The time now is 03:45 AM.


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