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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-07-2008, 04:25 AM   #1
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
BookSwap autorun book-file manager

Let’s call this an alpha release, but I’ve written a dead-simple filemanager for the Reader. It uses the same DOM/ECMAscript autorun functionality discovered and applied by igorsk, obelix, et al.

It provides the following capabilities:
  1. Copy files between the Reader internal memory & SD card.
  2. Move files between the internal memory & SD card.
  3. Delete files from the internal memory & SD card.

With the following caveats:
  1. I couldn’t manage to find any filesystem listing/transversal functions, although I imagine they’re probably there somewhere. This version thus limits itself to simple operations on the files found and cached by the Reader UI.
  2. I haven’t figured out how to cause the Reader UI to re-scan the internal memory. This means the Reader won’t notice such changes until the next time you either reset it or just plug it in via USB. BookSwap re-scans memory on quit if any changes were made. This causes BookSwap to re-run, but quitting again will quit w/o the re-scan.
  3. I haven’t tested this with a memory stick. It might work.
  4. I have tested it with a both a PRS-500 and 505. On my 500 I can copy files off the SD card but copying to the card fails. However my 500 is damaged, so this may just be an artifact of the damage.

To install, just extract the attached archive into the root of an SD card.

Moderator: WARNING! Does not wotk with books you have in a collection
Attached Files
File Type: zip bookswap-0.1.zip (3.4 KB, 1122 views)
File Type: zip bookswap-0.1.1.zip (3.4 KB, 1653 views)

Last edited by llasram; 03-08-2008 at 03:18 AM. Reason: Updated to version 0.1.1
llasram is offline   Reply With Quote
Old 03-07-2008, 06:48 AM   #2
gwynevans
Wizzard
gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.
 
gwynevans's Avatar
 
Posts: 1,402
Karma: 2000000
Join Date: Nov 2007
Location: UK
Device: iPad 2, iPhone 6s, Kindle Voyage & Kindle PaperWhite
Nice - As you say, there are caveats but never-the-less, very nice!
--
Re 2: A full shutdown & restart also re-reads the internal memory, just in case you'd prefer ro avoid a reset.

Do you have any pointers to what functions, etc, have been discovered? Just wondering if there was any way of sorting the list of files somehow, for instance...
--
Just to say what I did - I was able to move a book to a SD card, reset it via USB to check it had gone, then copy it back from SD to Internal, reset it via shutdown/restart and read it again without the SD card.

Last edited by gwynevans; 03-07-2008 at 06:58 AM.
gwynevans is offline   Reply With Quote
Advert
Old 03-07-2008, 01:40 PM   #3
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by gwynevans View Post
Re 2: A full shutdown & restart also re-reads the internal memory, just in case you'd prefer ro avoid a reset.
Good catch! I added an option to the main-menu to shutdown the Reader instead of just quit BookSwap and it works great. But unfortunately I didn’t bring the changes with me to work this morning and left my USB cable at home. I’ll upload a new version when I get home tonight.

Unrelatedly, I’ve noticed that I put this thread in the PRS-505–only category. As BookSwap does work on the PRS-500 it should probably go one level up... Am I just not seeing the interface to do that, or does one need to have moderator privileges to move threads around?
llasram is offline   Reply With Quote
Old 03-07-2008, 04:05 PM   #4
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by gwynevans View Post
Do you have any pointers to what functions, etc, have been discovered?
Like obelix pointed out in the thread for his Sudoku game, it's been pretty slap-and-dash. If you grab the contents of the Reader's /opt directory you'll get the whole UI. From there (for me anyway) it's been a matter of looking at the functions used in the existing XML files and running 'strings' on the binary files looking for likely candidates. I wrote a recursive object-dumper which was how I found the UI cache. I'll see about cleaning that up a bit and posting it.

It might be nice to start documenting some of this in the mobileread wiki. On the other hand, perhaps that hasn't been done so far because that gets pretty close to documenting the DRM-related functions...

Quote:
Just wondering if there was any way of sorting the list of files somehow, for instance...
That would probably be possible, but I'd really like move to using the filesystem instead of the UI cache. Then users could arrange files into directories, making sorting less of an issue.
llasram is offline   Reply With Quote
Old 03-08-2008, 03:20 AM   #5
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Version 0.1.1

Uploaded version 0.1.1. Just modified the initial post to keep everything in the same place.

Changes:
  • Implement real memory re-scanning.
llasram is offline   Reply With Quote
Advert
Old 03-09-2008, 03:44 PM   #6
moneytoo
Enthusiast
moneytoo began at the beginning.
 
Posts: 39
Karma: 20
Join Date: Oct 2007
Location: Czech Republic
Device: Sony PRS-505
Very nice and working.
I really missed some delete function on the Reader.
moneytoo is offline   Reply With Quote
Old 03-09-2008, 06:09 PM   #7
gwynevans
Wizzard
gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.
 
gwynevans's Avatar
 
Posts: 1,402
Karma: 2000000
Join Date: Nov 2007
Location: UK
Device: iPad 2, iPhone 6s, Kindle Voyage & Kindle PaperWhite
Quote:
Originally Posted by llasram View Post
Uploaded version 0.1.1.
My mods to 0.1.1.1 that you might want to have a look to see if there's anything useful, but most are 'personal preference' things...
Changes I tried are:
  1. Changed "Quit" to "Quit with Restart" and added a "Quit" (without restart)
  2. Added a 'List Books' (but it really needs as no-op function as you get an exception if you choose a book, as I reused ChooseFile).
  3. Changed to display 'book.author + " - " + book.title rather than just title. (Personal pref, as it then matches the format I use for my filenames.)
  4. Changed default location for SD cards to "Sony Reader/database/books/" (but no checks for missing folders) (Again, personal prefs)
  5. Changed to use smaller, non-bold fonts for the label contents (more visible chars)
  6. Added a 'books.sort()' (See comment below)
  7. Added a version string in the XML
  8. Added doFirst/doLast support for jumping by 10 pages (i.e. hold down next/prev)
--
Edit: Updated attatchment (to a 0.1.1.1-B version) as I realised what was wrong with my sorting & manged to add a routine to sort by Author, then Title. (This suits me, as I have my files as "<author> - <title>.lrf", but may not suit others, but it's at least there to change if wanted).

Moderator: WARNING! Does not wotk with books you have in a collection
Attached Files
File Type: zip bookswap-0.1.1.1-B.zip (3.6 KB, 1105 views)

Last edited by gwynevans; 03-10-2008 at 08:28 AM.
gwynevans is offline   Reply With Quote
Old 03-16-2008, 08:41 PM   #8
keith
Enthusiast
keith began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Jan 2008
Device: Sony PRS-505
Using version 0.1.1.1-B I don't seem to be able to copy from Memory Stick or SD card to internal memory. I get the message:

Copying file...
From:b:/Sony Reader/database/books/Sony Reader/...
To:/Data/Author - title.lrf

Failed :-(

The from line is presumably truncated..

Version 0.1.1 does work with SD card and Memory Stick
keith is offline   Reply With Quote
Old 03-16-2008, 09:12 PM   #9
gwynevans
Wizzard
gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.
 
gwynevans's Avatar
 
Posts: 1,402
Karma: 2000000
Join Date: Nov 2007
Location: UK
Device: iPad 2, iPhone 6s, Kindle Voyage & Kindle PaperWhite
My (4) fix was bad - The line 290 in autorun.js should be reverted to
'path': record.path,
rather than
'path': record.path + "Sony Reader/database/books",


Moderator: WARNING! Does not wotk with books you have in a collection
Attached Files
File Type: zip bookswap-0.1.1.1-C.zip (3.5 KB, 1254 views)

Last edited by gwynevans; 03-16-2008 at 09:18 PM. Reason: Added attachment with fix - unverified as yet, though
gwynevans is offline   Reply With Quote
Old 03-16-2008, 10:52 PM   #10
keith
Enthusiast
keith began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Jan 2008
Device: Sony PRS-505
Version 0.1.1.1-C works. Files are copied to the root of the SD card / internal memory.
keith is offline   Reply With Quote
Old 03-25-2008, 10:41 PM   #11
vinniet
Connoisseur
vinniet has learned how to buy an e-book online
 
Posts: 59
Karma: 97
Join Date: Oct 2007
Location: New Jersey
Device: Sony PRS-500
Does this program have a problem with deleting books that are part of Collections?
vinniet is offline   Reply With Quote
Old 03-26-2008, 07:44 PM   #12
Ret
Connoisseur
Ret has a complete set of Star Wars action figures.Ret has a complete set of Star Wars action figures.Ret has a complete set of Star Wars action figures.Ret has a complete set of Star Wars action figures.Ret has a complete set of Star Wars action figures.
 
Ret's Avatar
 
Posts: 81
Karma: 480
Join Date: Dec 2004
I tried copying files from my SD card to the internal memory with both version 0.1.1.1 and 0.1.1.1-C but I couldn't make the 505 refresh the list after quitting. The new copied file that should be shown on the book list doesn't appear in it. Even taking the SD card out doesn't refresh the list.
How is it supposed to copy a file correctly? or how do I refresh the list?
Thanks
Ret is offline   Reply With Quote
Old 03-26-2008, 08:00 PM   #13
Ret
Connoisseur
Ret has a complete set of Star Wars action figures.Ret has a complete set of Star Wars action figures.Ret has a complete set of Star Wars action figures.Ret has a complete set of Star Wars action figures.Ret has a complete set of Star Wars action figures.
 
Ret's Avatar
 
Posts: 81
Karma: 480
Join Date: Dec 2004
Ok, now I've got it! After taking the card out, I went to the main menu and back to the book list and voilà! the list was all refreshed.
Thanks for a great hack!!
Ret is offline   Reply With Quote
Old 03-26-2008, 10:21 PM   #14
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,370
Karma: 136466962
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by vinniet View Post
Does this program have a problem with deleting books that are part of Collections?
Good question. I'd like to also know if it can copy books that are part of a collection without messing up the collection.
JSWolf is offline   Reply With Quote
Old 03-27-2008, 12:50 AM   #15
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by JSWolf View Post
Good question. I'd like to also know if it can copy books that are part of a collection without messing up the collection.
Copying books which are part of collections shouldn't be a problem, but deleting them will probably make the Reader veeeeery unhappy. That might be hard to fix.

Wow, I haven't been paying attention here -- more interest than I initially thought :-). I'll get off my ass this weekend and move this over to the mobileread dev site, give it a real project, and try to make some coherent combination of some changes I made and gwynevans'.

Also, I did figure out how to do directory traversal ('Iterator' is the function, 'iterator' is the prototype... not sure why I didn't notice that earlier...) which has me considering upending the entire interface. So instead of choosing an operation, one could navigate to a file first, then choose an operation to perform on it. And perhaps one such operation could be "Read," providing the beginnings of a hierarchical interface for accessing the content?
llasram 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
iDevice file manager for OSX tyche Apple Devices 1 07-10-2010 03:43 PM
Exists a File Manager for the dr1000? gigios iRex 3 09-18-2009 09:37 AM
emelFM2 Iliad Release (File Manager) Adam B. iRex 35 07-20-2009 11:03 PM
Best E-Book Manager Himitsu Seixi Sony Reader 1 03-31-2009 12:34 PM
File manager and collections creator for PRS-505 igorsk Sony Reader 19 02-12-2009 06:02 PM


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


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