![]() |
#1 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5
Karma: 2954
Join Date: May 2011
Device: iLiad
|
Reflow script for txt files
Hi,
I usually read with "txt" files, and it finally occured to me, that I can write script, that could permanently reflow a file, I would like to read. I installed it into extensions.cfg file, so the txt file I have configured as: Code:
txt:@Text_file:1:fbreader.app,cr3.app,reflow.app,fbreader180.app:ICON_TXT ![]() btw, It also strips "\r" characters have, fun anyway, and regards Cyprian |
![]() |
![]() |
![]() |
#2 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 260
Karma: 1014230
Join Date: Jan 2010
Device: Onyx Boox T68, Kobo Aura HD, Pocketbook 302, Pocketbook 912, Nook HD+
|
I could have used this recently but instead used Calibre to create epubs from the text files I wanted to read. It does a passable job on about 3/4 of the files I read and it usually makes a pretty good attempt at creating a table of contents. The few times it fails to create a good epub, the text is centered on the page which I find hard to read.
Thanks for doing this. Yet another tool to read with on these great readers. |
![]() |
![]() |
![]() |
#3 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5
Karma: 2954
Join Date: May 2011
Device: iLiad
|
I'm thinking about doing fewo changes, so we wuld have different reflow modes, with different line breaking mode. I would use new fbreader, but using large text files with fbreader180 is not such a good idea, as it looses pages, that is why i started this script
![]() |
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5
Karma: 2954
Join Date: May 2011
Device: iLiad
|
Hi,
I've updated the reflow script, what you have to do is unzip the script into: /system/share/reflow.sh I added comments, so anybody, could easily understand and modify it. regards Cyprian |
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,840
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
|
thanks!
|
![]() |
![]() |
![]() |
#6 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5
Karma: 2954
Join Date: May 2011
Device: iLiad
|
Ok, this is probably the last update.
Here is a new version, with undo. You can run reflow.app against the same file over and over again, and then undo. Install it in your extensions, then press ok for a while on a text file, and pick "reflow" or "undo". There is an example text file, that was processed by the script, it is a book from project gutenberg: http://www.gutenberg.org/cache/epub/23428/pg23428.txt The reflowing script consists of 3 parts: 1. shell script, that controls the process 2. awk script that is run before actual reflowing 3. awk reflow script It can recognise various types of entries, for eg. input lines like these below: THIS IS ONLY UPPERCASE 1. this is punctation 1 this is punctation 123. 1023 Index ............ 12 would be always be not modified in output. **** INSTALLATION Unzip the archive in your /system directory in the internal memory. To install this script in your pocketbook edit file: system/config/extensions.cfg find the line beginning with: txt:@Text_file:1: and add reflow.app,undo.app before :ICON_TXT my entry is for eg. this: Code:
txt:@Text_file:1:fbreader.app,reflow.app,undo.app:ICON_TXT reflow.app - txt file reflow, it supports multi undo action undo.app - undo last reflow (just add to config) Awk scripts: reflow.awk - the main script, that does the processing. stat_text.awk is preanalisis, you can extend it whater you want just try it yourself ![]() Last edited by neurocyp; 11-18-2011 at 06:39 PM. |
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,840
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
|
super: thanks!
|
![]() |
![]() |
![]() |
Tags |
reflow, txt, txt conversion |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Reflow text in PDF-files? | Dava | Amazon Kindle | 6 | 03-11-2011 10:39 AM |
Firmware Update Do people think reflow will be available for pdf files? | varmemester | Amazon Kindle | 16 | 10-07-2010 06:58 PM |
Txt files - Convert to Epub - Multiple files into one book - noob help | Cernan | Calibre | 6 | 05-18-2010 10:12 AM |
Script to convert a directory full of files? | mdibella | Kindle Formats | 2 | 10-14-2008 01:21 PM |
gDrive 0.6 - PHP script to store files on Gmail | TadW | Lounge | 0 | 02-24-2005 05:08 PM |