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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-10-2012, 03:10 PM   #46
JustForFun
Enthusiast
JustForFun began at the beginning.
 
Posts: 29
Karma: 10
Join Date: Nov 2010
Device: PB360
Take a look at this question on stackoverflow. Using isspace() also removes the newline at the end of the line which fgets() leaves there if the line is shorter than the supplied buffer.
JustForFun is offline   Reply With Quote
Old 01-14-2012, 01:08 AM   #47
bogomil
Member
bogomil can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterbogomil can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterbogomil can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterbogomil can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterbogomil can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterbogomil can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterbogomil can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterbogomil can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterbogomil can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterbogomil can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterbogomil can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 21
Karma: 12650
Join Date: Apr 2011
Device: PB903
thank you, friends
bogomil is offline   Reply With Quote
Old 01-07-2013, 04:09 PM   #48
paolog
Zealot
paolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five words
 
paolog's Avatar
 
Posts: 116
Karma: 37518
Join Date: Nov 2012
Location: Milan / Italy
Device: pocketbook touch 622
hi

I'm a new owner of a pb touch (622) so I'm loading and erasing many things, even only to test purpose.

I noticed that in
/mnt/ext1/system/state

and in
/mnt/ext1/system/config/'Active Contents'

it left files related to deleted book even if you ask to optimize the database;

did anyone make a script to delete (even interactively) those files?

now I'm doing it by hand with poterm, but should be nice automate it

paolog is offline   Reply With Quote
Old 01-12-2013, 03:31 PM   #49
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 1,514
Karma: 4065130
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623
I guess no one has such a script already. I don't think it needs to be interactive, because it just needs to find data in those directories that doesn't have an existing ebook for it, and then delete it. Thus, you wouldn't need to use the sh_ivtool application for interactivity. I think the script would be a lot simpler if it could use the Unix find utility to look for the .af0 files, since they are spread out in directories that match the structure where the ebooks are. If no one else comes up with such a script first, I'll try to write something over the next few days.

P.S. Deleting books using the Library application usually deletes the extra information, as well. If you are deleting using the USB connection, maybe you should use the Library app instead.

Last edited by rkomar; 01-12-2013 at 03:33 PM.
rkomar is offline   Reply With Quote
Old 01-19-2013, 12:47 PM   #50
paolog
Zealot
paolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five words
 
paolog's Avatar
 
Posts: 116
Karma: 37518
Join Date: Nov 2012
Location: Milan / Italy
Device: pocketbook touch 622
thanks rkmoar
the interaction could be useful in case one would save annotations and highlights that sometimes became complex


i use this this script named clean.app at the moment to delete empty dir

i cd to the directory because with busybox once i deleted anything!

#!/bin/sh

cd /mnt/ext1/system/state

path to find/find -depth -type d -epty - exec rmdir {} \;

cd /mnt/ext1/system/config/Active\ Contents

path to find/find -depth -type d -epty - exec rmdir {} \;

i've to study more to compare paths as you suggested

paolog is offline   Reply With Quote
Old 01-19-2013, 02:07 PM   #51
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 1,514
Karma: 4065130
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623
I wrote a script last weekend, but put off uploading it because I wanted to include a version of find for the older 3XX ereader models. However, I'm not sure that the notes are in the same format on those devices, so I think I'll just release the script for the Pro models only.

The script deletes all the state data and notes for ebooks that aren't on the device any longer. To make the script simpler, I used find and bash, and included them in the zip file.

As you noted, deleting the notes may not be what is wanted. However, making the script interactive would make it tedious to use. If you want to save notes, I think it's better to just comment out the notes handling stuff in the script, and just use the Notes application to delete unwanted notes.
Attached Files
File Type: zip clean_state-Pro.zip (643.4 KB, 63 views)
rkomar is offline   Reply With Quote
Old 01-25-2013, 03:16 AM   #52
paolog
Zealot
paolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five words
 
paolog's Avatar
 
Posts: 116
Karma: 37518
Join Date: Nov 2012
Location: Milan / Italy
Device: pocketbook touch 622
Smile

wow I'll test it
thanks a lot
paolo
paolog is offline   Reply With Quote
Old 10-02-2013, 03:38 AM   #53
paolog
Zealot
paolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five words
 
paolog's Avatar
 
Posts: 116
Karma: 37518
Join Date: Nov 2012
Location: Milan / Italy
Device: pocketbook touch 622
hi rkomar

the script you posted to clean up, that worked perfectly until 4.0 fw of 622, now unfortunately cleans also 'live' notes.

not a big problem for me, but it could be an issue to s.o. that has important notes and didn'n comment that part of the script

bye

paolo

Last edited by paolog; 10-02-2013 at 03:40 AM.
paolog 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
Trio of Picture Books - Simple Animals, Simple Shapes, and You're My Baby! Manley Peterson Self-Promotions by Authors and Publishers 5 01-06-2012 08:55 PM
Application update: application not installed error Merischino Kindle Fire 4 12-01-2011 10:30 PM
erm, simple question , hope for simple answer! al zymers Amazon Kindle 5 09-25-2010 01:01 PM
Simple question for a simple mind :) PKFFW OpenInkpot 6 08-27-2009 09:00 PM
Television scripts for your handheld Bob Russell Lounge 2 01-07-2006 06:22 PM


All times are GMT -4. The time now is 04:56 AM.


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