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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-31-2009, 06:50 AM   #1
thijso
Junior Member
thijso began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2008
Device: iRex iLiad, iRex iLiad book ed, Onyx Boox M92
Adding custom action buttons to toolbar

I wanted a way to 'bookmark' my documents that were most interesting to me in a certain location, so I decided I needed to add some buttons to the toolbar.

So that's what I did. See the screenshots for it in action. Then check out my next post if you're really interested. I don't provide anything but the source and some simple instructions (pointers, really) for now, as it's very much something I hacked together in a few hours...

So, if you decide to follow up on it: you're on your own!

Anyway, it works just like deleting something:
  1. you click on the icon
  2. you select something from the content list
  3. you click on the icon again

Once you've done that, what happens is that a custom script in the /home/intent/ folder is called with an index and the location (which can be something different than you think, because of iliads custom symlinks). All this is currently hardcoded in my source, but could be rewritten to take stuff from the registry. So you could use this for completely different stuff too...
Attached Thumbnails
Click image for larger version

Name:	buttons.png
Views:	463
Size:	22.9 KB
ID:	42208   Click image for larger version

Name:	selected.png
Views:	454
Size:	22.7 KB
ID:	42209  
thijso is offline   Reply With Quote
Old 12-31-2009, 07:12 AM   #2
thijso
Junior Member
thijso began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2008
Device: iRex iLiad, iRex iLiad book ed, Onyx Boox M92
So, interested?

See the 'newLister-1.0.5' branch on my git fork on github: http://github.com/thijs/iliad-hacking.

This is actually something I based on the newLister stuff you can read about starting at hansels new contentlister thread, and related posts that are linked there.

Basically, you need to install newLister-1.0.5 as per instructions in that thread on your iliad. Then you can clone my repository, follow the instructions on getting a working cross-compiling setup here:
http://www.hpelbers.org/iliad/cross_compiling (at least, I think it was those that I followed, long time ago...).

Then:
  • checkout my newLister branch
  • do a 'build_all_from_scratch.sh' in 'liberipc/' and 'liberregxml/' directories
  • do a 'build_all_from_scratch.sh' in 'contentLister/' dir.

This should have made you new versions of the shared libraries 'liberipc.so.0.2.0' and 'liberregxml.so.0.0.0' and for the actual contentlister executable 'newLister'.
  • (optional, but recommended) go into the 'contentLister/src' dir, and do 'strip -s newLister'
  • find where the first two put their .so files, for me it was: /usr/local/arm/oe/arm-linux/lib
  • (optional, but recommended) go there and do a 'strip -s liberipc.so.0.2.0' and 'strip -s liberregxml.so.0.0.0'

Now, get all this stuff, together with the custom icons on your iliad. I do this through scp. Also, recommended is to copy it to one of your cards (mmc, pcmcia) due to space restrictions on the main memory.
In this case I used my cg card (which already had a 'tmp' dir). And, of course, use your own iliad ip instead of <iliadip>:
  • go to the toplevel source dir, and do: 'scp -r customdata/ root@<iliadip>:/media/cf/tmp/'
  • do: 'scp contentLister/src/newLister root@<iliadip>:/media/cf/tmp/'
  • do: 'scp /usr/local/arm/oe/arm-linux/lib/liberipc.so.0.2.0 root@<iliadip>:/media/cf/tmp/'
  • do: 'scp /usr/local/arm/oe/arm-linux/lib/liberregxml.so.0.0.0 root@<iliadip>:/media/cf/tmp/'

Now you have everything on your iliad. Put it in the right places. And REMEMBER TO BACKUP UP THE ORIGINALS! I do not guarantee ANYTHING! As long as you have ssh access, you should be okay, but still...
  • copy all the icons from /tmp/customdata into /usr/share/pixmaps
  • backup and replace the two lib*.so.* files into /usr/lib
  • backup and replace newLister in /usr/bin

Now you should reboot your iliad and when it's back up you should see the three extra icons in your toolbar. The work, but don't actually do anything yet.
  • create an executable script file: touch /home/intent/ratealt && chmod 755 /home/intent/ratealt
  • put this into it:
    Code:
    #!/bin/sh
    echo "$1; $2" >> /var/log/logging

and now try rating one of your books... and see what comes out in /var/log/logging...

What I do in ratealt is create a directory and a manifest file linking to the original in a new location (my 'ratedA', 'ratedAA', etc dirs), so I can quickly find the docs I like there.

(for those that don't know, a symlink for iliad is just a manifest.xml file in an empty dir with the following in it:
Code:
<?xml version="1.0" encoding="utf-8"?>
<package>
  <symlink>/full/path/to/original/dir/or/file</symlink>
</package>
)
thijso is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Regular Expressions for adding book information bigbot3 Calibre 1 12-25-2010 06:28 PM
toolbar changes franklekens Calibre 5 09-13-2010 04:00 PM
LrfAppender: IE toolbar similar to "Toolbar for Librie" mumurik LRF 1 10-13-2009 04:01 AM
LrfAppender: IE toolbar similar to "Toolbar for Librie" mumurik Sony Reader Dev Corner 1 10-06-2009 03:33 AM
No toolbar, no keyboard. tomanek iRex 3 09-19-2006 05:59 AM


All times are GMT -4. The time now is 02:49 PM.


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