Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Sony Reader > Sony Reader Dev Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 05-13-2009, 09:56 AM   #16
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Quote:
Originally Posted by vvaidy View Post
This is terrific ... but is there documentation on how the collections system works? I gather it is an XML file, but I'm wondering if there is a doc that describes the file, format, etc.
There is a documentation in Czech language here:
http://www.pepak.net/e-books/prs-505-sbirky/

As far as english docs are concerned, there are just the comments in the sample INI file. Please check them out and if anything is not clear enough, ask here and I'll answer.

Quote:
The reason I ask is that I would like to modify one of these two programs to work with some other software I use, and it isnt quite clear to me exactly how Collections are stored on the PRS 505. Thanks!
PRS-505 stores collections in media.xml or cache.xml (depends on media - internal memory uses one, memory cards the other). The syntax is slightly different in each, but it pretty much boils down to something like this:
Code:
<playlist name="My collections of books">
  <item id="123" />
  <item id="567" />
  <item id="159" />
</playlist>
Collection Builder just generates this XML according to its definition files (which tend to be easier to maintain and update than the XMLs).
pepak is offline   Reply With Quote
Old 06-28-2009, 09:54 AM   #17
LWR
Junior Member
LWR began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Mar 2009
Device: Kindle Sony
Is there much interest in a Mac version of this?

I had a quick look at the source code - seeing a bit of Delphi took me back a few years, bringing a lump to my throat and a tear to my eyes

Let me know if there's some interest in a Mac/Cocoa version and I'll put something together - can't quite bring myself to do a Pyhton version - those apps all look too ugly
LWR is offline   Reply With Quote
Old 07-15-2009, 07:32 PM   #18
elegant
Member
elegant began at the beginning.
 
elegant's Avatar
 
Posts: 12
Karma: 10
Join Date: Apr 2009
Device: sony reader
deleted

Last edited by elegant; 07-15-2009 at 07:41 PM.
elegant is offline   Reply With Quote
Old 07-27-2009, 12:17 PM   #19
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Tool updated to support Calibre 0.6. It won't work with current version, though - there is a bug in ebook-meta.exe which prevents Collection Builder from working, but the ticked was accepted and bug fixed by Kovid, so the next version of Calibre should work again.
pepak is offline   Reply With Quote
Old 07-30-2009, 09:23 AM   #20
kensuguro
Junior Member
kensuguro began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jul 2009
Device: prs505
hi pepak, thanks for the great tool!

I'm trying to do a "collections based on directories" method with your tool, but don't know how to piece together the regex to do so. Can you show us some sample lines as starting point? I know simple regex that I use for coding, but I don't know how to use it for commandline.
kensuguro is offline   Reply With Quote
Old 07-30-2009, 11:01 AM   #21
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Why don't you post a list of 5-6 books to give me an idea of your naming scheme? With that at hand, I can build you an example regexp.
pepak is offline   Reply With Quote
Old 07-30-2009, 02:47 PM   #22
kensuguro
Junior Member
kensuguro began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jul 2009
Device: prs505
well, I don't really have a set list, just a bunch of directories like:

social capital basics/book1.pdf
social capital basics/book2.pdf
social capital Japan/book1.pdf
social capital Japan/book2.pdf
gametheory/book1.pdf

and so on. I want to auto generate the collections by directory name, so this list will end up being collections:
social capital basics
social capital Japan
gametheory

hope that makes sense. I should master regex one of these days...
kensuguro is offline   Reply With Quote
Old 07-30-2009, 02:53 PM   #23
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Should be easy enough to do, if I didn't make some stupid error while coding (I use playlist-based collections).
Code:
CollectionRegExp = ([^/]+)/([^/]+)$
CollectionRegExpTitle = $1
If you want to run it from CMD, these parameters should do the trick:
Code:
-cr ([^^/]+)/([^^/]+)$ -crt $1
pepak is offline   Reply With Quote
Old 07-30-2009, 03:05 PM   #24
kensuguro
Junior Member
kensuguro began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jul 2009
Device: prs505
thanks a bunch, I'll try it when I get home. Thank you for your prompt reply too.
kensuguro is offline   Reply With Quote
Old 07-30-2009, 03:11 PM   #25
Kostas
Still wondering why
Kostas has learned how to read e-booksKostas has learned how to read e-booksKostas has learned how to read e-booksKostas has learned how to read e-booksKostas has learned how to read e-booksKostas has learned how to read e-booksKostas has learned how to read e-books
 
Kostas's Avatar
 
Posts: 253
Karma: 800
Join Date: Jun 2009
Location: Athens, Greece
Device: PRS 505, (BlackBerry Bold ?)
Hi kensugurro,

pepak's tool is great, but if you want simply to autogenerate collections based on directories you might want to try mngr505.
Actually, there is no need to use the tool to create the folders on your PRS. You can create them with your usual file manager under the root directory where ebooks are stored (database\media\books).
When you've finished, run mngr505 and choose the command "scan and create collections".
It will create collections based on your existing file structure on your prs 505. Only one level of folders is supported.
Kostas is offline   Reply With Quote
Old 08-01-2009, 07:16 AM   #26
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Even more fixes for Calibre 0.6.
pepak is offline   Reply With Quote
Old 08-18-2009, 01:44 PM   #27
xzf
Junior Member
xzf began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jun 2009
Device: prs-505
Quote:
Originally Posted by gwynevans View Post
I haven't got time myself, because things are getting busy at work, but I've attached a Python script that I wrote a while back to create collections from file names (of the form 'author [- series N ] - title.lrf') in case you want to try yourself, as it might help getting started.

I'm not sure if it's 100% correct though, as when I just ran it, the Reader showed the "sd" icon by the collections, although they seemed to work OK!

Run with the file to modify as an argument, e.g. "lrfCategorize.py F:\database\cache\media.xml"
Thanks!
I made a quick mod on that script to use the last subdirectory instead of the series.
And it works fine for me..
Note: Windows users should change (SEP="/" to SEP="\\")
Attached Files
File Type: zip dir-Categorize.py.zip (1.5 KB, 324 views)

Last edited by xzf; 08-18-2009 at 01:59 PM.
xzf is offline   Reply With Quote
Old 09-04-2009, 05:53 PM   #28
cnf
Member
cnf began at the beginning.
 
cnf's Avatar
 
Posts: 18
Karma: 10
Join Date: May 2009
Location: Antwerpen, Belgium
Device: PRS-505
Quote:
Originally Posted by LWR View Post
Is there much interest in a Mac version of this?

I had a quick look at the source code - seeing a bit of Delphi took me back a few years, bringing a lump to my throat and a tear to my eyes

Let me know if there's some interest in a Mac/Cocoa version and I'll put something together - can't quite bring myself to do a Pyhton version - those apps all look too ugly
I'd love a Cocoa version, please :P
cnf is offline   Reply With Quote
Old 09-04-2009, 06:10 PM   #29
cnf
Member
cnf began at the beginning.
 
cnf's Avatar
 
Posts: 18
Karma: 10
Join Date: May 2009
Location: Antwerpen, Belgium
Device: PRS-505
Quote:
Originally Posted by Kostas View Post
Hi kensugurro,

pepak's tool is great, but if you want simply to autogenerate collections based on directories you might want to try mngr505.
Actually, there is no need to use the tool to create the folders on your PRS. You can create them with your usual file manager under the root directory where ebooks are stored (database\media\books).
When you've finished, run mngr505 and choose the command "scan and create collections".
It will create collections based on your existing file structure on your prs 505. Only one level of folders is supported.
mngr505 is buggy as hell for me. It either crashes like a maniac, or it creates the same empty collections every time I ask it to create collections. (as in, it creates doubles, or triples, or quadruples etc of the same empty collections)
cnf is offline   Reply With Quote
Old 12-01-2009, 12:11 PM   #30
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Version 0.08 brings support for national characters in collection names.
http://www.pepak.net/files/e-books/colbuild-0.08.zip
pepak is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-500 Hack Builder! Nogg Sony Reader Dev Corner 205 05-19-2011 07:08 PM
Bart's PE Builder - Run WinXP from CD! Colin Dunstan Lounge 2 03-29-2010 10:57 AM
SBPubX Builder tmaynard Fictionwise eBookwise 16 11-20-2008 12:35 PM
Very simple PRS-505 content/collection builder pepak Sony Reader Dev Corner 3 03-17-2008 01:40 PM


All times are GMT -4. The time now is 11:23 AM.


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