Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-15-2008, 07:11 AM   #46
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Kent, UK
Device: iRex iLiad, Psion 5MX, nokia n800
The example above had a few typos in it. Here (attached) is a layout file for jabref that will create a python script to generate manifest files for multiple references. To run it you either need to install python or you could get jython and create the standalone jar file. To do this, download jython from here then run the installer:
Code:
java -jar jython_installer-2.2.1.jar
and choose the standalone version. This will ultimately, after a few clicks on the Next button, create jython.jar.

Once you have installed python or created jython.jar and registered the layout file in jabref you can:
i) select some refs
ii) export to a py file, e.g. myrefs.py
iii) run myrefs.py
Code:
java -jar jython.jar myrefs.py
or
Code:
python myrefs.py
This will create a manifest file for each ref that you had selected. This works on linux (tested) and should work on windows and mac (not tested).
Attached Files
File Type: txt iliad-batch-jython.layout.txt (1.0 KB, 413 views)

Last edited by daudi; 01-15-2008 at 09:45 AM. Reason: Updated the layout file. It was creating a blank line that was invalidating the created manifest.xml files.
daudi is offline   Reply With Quote
Old 01-15-2008, 07:30 AM   #47
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Kent, UK
Device: iRex iLiad, Psion 5MX, nokia n800
It has just occurred to me that it should not take much more code to have this not only create the manifest file, but assuming that the PDF is named the same as the bibtext key, to:
i) create the PDF container folder
ii) create a scribble file
iii) move the whole lot (manifest, scribble, PDF) into the containder folder.

That way you'd just:
i) dump all your PDFs in one folder
ii) select the refs in jabref
iii) export them to a python script
iv) run the script

And you'd then have all your PDFs prepared for use on the iliad with the appropriate data in the title and description fields.
daudi is offline   Reply With Quote
Advert
Old 01-15-2008, 09:38 AM   #48
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Kent, UK
Device: iRex iLiad, Psion 5MX, nokia n800
Here we go. These two layout files now create a python/jython script that when run will create the manifest file, scribble file and put the whole lot (including PDF) into a PDF container directory. You *MUST* have a PDF with exactly the same name as the bibtex key in the directory or it will crash (I have not added nice code for error handling).

The two layout files must be in together. iliad-batch-jython.layout is registered in jabref in the usual way and it will pickup the "begin" layout file when it is run.

So, the steps are now:

i) install python or get jython (as shown above)
ii) register the layout file in jabref (Options->Manage custom exports)
iii) place your (correctly named) PDFs in a directory
iv) select your refs in jabref
v) export them using the new export filter (thereby creating a python script)
vi) run the python script in the directory with the PDFs
Attached Files
File Type: txt iliad-batch-jython.begin.layout.txt (26 Bytes, 407 views)
File Type: txt iliad-batch-jython.layout.txt (1.8 KB, 414 views)

Last edited by daudi; 01-15-2008 at 10:28 AM. Reason: Clarified step ii)
daudi is offline   Reply With Quote
Old 01-15-2008, 04:16 PM   #49
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Kent, UK
Device: iRex iLiad, Psion 5MX, nokia n800
I've made some more updates to the layout file but also have some more ideas and think it'll get confusing if I keep posting small updates, so I'll just explain what I have done and intend to do.

I've now changed python script created by the layout file (but not posted it yet) so that it will determine for each selected entry if the PDF is file or a directory. If it is a file it will create the container directory, etc as above. If it is a directory (i.e. it has already been opened on the iliad) it will only create a new manifest file and will leave the existing scribble file. I've added this because I decided I want to be able to use jabref to quickly update how all of my articles appear on the iliad.

If neither a file or directory exists that matches it does nothing (i.e. no longer crashes).

The thing that I am thinking about adding is support for images. I'm thinking that if there is an image (in a user-specified image directory) that matches the journal field then it will add a line to the manifest and copy in that image. So if I have an image called bmj.png and I have a journal entry bmj then it will copy in the image. That way I will be able to have journal covers for each article.

I think this could easily be used to manage non-academic content as well, e.g. PDF books. There's no journal field for book types by default but it is easy to add that and set its value to a name that would map to a cover image.
daudi is offline   Reply With Quote
Old 01-16-2008, 09:27 AM   #50
Spatte
Member
Spatte began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Dec 2007
Device: None
Great work Daudi and thanks for sharing!
Spatte is offline   Reply With Quote
Advert
Old 01-18-2008, 04:09 AM   #51
Matt
Member
Matt began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Aug 2006
Location: Umea, Sweden
Device: iLiad
Quote:
Originally Posted by daudi View Post
I've made some more updates to the layout file but also have some more ideas and think it'll get confusing if I keep posting small updates, so I'll just explain what I have done and intend to do.
<snip>

I think this could easily be used to manage non-academic content as well, e.g. PDF books. There's no journal field for book types by default but it is easy to add that and set its value to a name that would map to a cover image.
This is great work. Thanks for it and for your detailed descriptions and notes!
Matt is offline   Reply With Quote
Old 01-18-2008, 12:51 PM   #52
Spatte
Member
Spatte began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Dec 2007
Device: None
A slightly off topic question (however probably useful for researchers):

Tribble, in post #15 of this thread you say that you are using sometimes the column mode and sometimes the fullscreen mode. Is it possible to have both these patches to iPdf installed at once? And how do you go about installing them both?

/ Sp
Spatte is offline   Reply With Quote
Old 01-18-2008, 02:37 PM   #53
tribble
iLiad Maniac
tribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it istribble knows what time it is
 
tribble's Avatar
 
Posts: 1,382
Karma: 2369
Join Date: Apr 2006
Location: Germany
Device: Bookeen Opus (i love that thing) and iPad (what an irony)
Quote:
Originally Posted by Spatte View Post
A slightly off topic question (however probably useful for researchers):

Tribble, in post #15 of this thread you say that you are using sometimes the column mode and sometimes the fullscreen mode. Is it possible to have both these patches to iPdf installed at once? And how do you go about installing them both?

/ Sp
I simply install the ipdf that i need. I have severall installers, with wich i can switch quite fast. I wish there was a package with all features included. Like fullscreen, gestures, bookmarks and columnmode.
tribble is offline   Reply With Quote
Old 02-06-2008, 10:13 AM   #54
Spatte
Member
Spatte began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Dec 2007
Device: None
Daudi,

It would be very nice to have a summary of how you get JabRef to work with Samba and everything else you have been playing around with. I know that time is scarce for everyone but at least I would find a concise guide extremely useful. So if you have time to write a "Beginners Guide", I would be most grateful.

Best,

/ SP
Spatte is offline   Reply With Quote
Old 02-06-2008, 11:00 AM   #55
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Kent, UK
Device: iRex iLiad, Psion 5MX, nokia n800
I've been meaning to get around to doing this, so thanks for prompting me . OK, here's what I've done. I'm doing this with a linux box, but as this makes use of windows shares (that's what samba is) it should be easy for people using windows as well, except that I use bash scripts and these would need to be re-written in something for windows (although there is bash.exe so perhaps this could work as is). And I guess it should work fine for Macs (but I don't have one to test it).

1. Set samba up using ajnorth's samba for the iliad

2. I currently keep my refs on a usb key (but plan to move to a CF card) so I have set up samba to share the usb key.

3. I mount the shared usb key (which is plugged into the iliad) on the PC. I happen to mount it at /home/dave/work/refs/iliad. I use a script for this:

Code:
sudo mount -t cifs //192.168.11.3/usb -o uid=dave,gid=dave,credentials=iliad_credentials iliad
There are other ways of doing this and it will depend on your OS and flavour of OS. I presume it should be simple enough for windows users to connect to the shared USB key (that's connect as in networking, not USB connection even though it is a USB key).

4. At this point the usb key with the references is plugged into the iliad and connected to the PC via windows/samba networking, so it can be accessed just like a normal share/drive.

5. I then set up the file part of the jabref entries to have multiple file entries for each reference.

Code:
  file = {View on PC:/home/dave/work/refs/iliad/albala02.pdf/albala02.pdf:PDF;
Merge scribbles, view on PC:/home/dave/work/refs/albala02.pdf:PDF merge scribbles, view on PC;
Make symlink in read-and-review:/home/dave/work/refs/iliad/albala02.pdf:PDF make symlink in readnow}
I plan on writing a script to write all these entries for me. jabref can auto-discover refs for normal PDF viewing and I'll just take those and automate the others. Eventually.

The first entry (View on PC) just points to the PDF file (not the container) so that clicking on it opens the PDF in the normal way.

6. The next two entries use customised file handlers that I have added. If you go to jabref and choose "Options" you will see "Manage external file types". This allows you to add new file types. All I did was add the path to some scripts that I wrote (see below) for handling PDFs.

7. The script that merges the scribbles and opens the result on the PC is:
Code:
#!/bin/sh                                                                                                                                                                                                                                                                                                                 
# Merge a PDF file on the iliad with its scribbles                                                                                                           
# then display it on the PC                                                                                                                                  
# Assume that jabref points to container folder not PDF file.                                                                                                                                                                                                                                                             
OUTFILE=$(basename "$1")                                                                                                                                     
java -jar "$HOME/bin/merge/ILiadPdfScribbleMerger.jar" -i:"$1" -o:$OUTFILE -m:n                                                                      
evince $OUTFILE                                                                                                                                              
rm $OUTFILE
This uses bash and I was planning to re-write this using python/jython to make it usable on all platforms. That's partly why I had not posted anything about this sooner.

8. The other script I created is one that creates a shortcut to a reference and places it in a "read and review" directory. This means that I can quickly select some refs to read and dump shortcuts to them in one place and not have to move references around. It simply creates a directory, a manifest file and fixes the path from that seen when the share is mounted on the PC to the path that of the file as seen by the iliad. This is also a bash script:

Code:
#!/bin/sh                                                                                                                                                    
# Copy a symlink to read-and-review                                                                                                                                                                                                    

ILIADMOUNT="/home/dave/work/refs/iliad"                                                                                                                      
DEST="read-and-review"                                                                                                                                               
                                                                                                                                                            
SYMLINK=$(basename $1)                                                                                                                                       
NEWDIR=$ILIADMOUNT/$DEST/$SYMLINK                                                                                                                            
mkdir $NEWDIR                                                                                                                                                
sleep 1 # USB is slow.                                                                                                                                       
                                                                                                                                                                                                                                                                                                                          
PDF=$(echo $1 | sed -e "s|$ILIADMOUNT|/mnt/usb|")                                                                                                            
                                                                                                                                                             
cat <<EOF > $NEWDIR/manifest.xml                                                                                                                             
<package>                                                                                                                                                    
<symlink>$PDF</symlink>                                                                                                                                      
</package>                                                                                                                                                                                                                                                                                                                
EOF

Last edited by daudi; 02-07-2008 at 09:43 AM. Reason: The ILIADMOUNT=... line from the last bit of code was not showing up for some reason. Now shows.
daudi is offline   Reply With Quote
Old 02-07-2008, 09:13 AM   #56
Spatte
Member
Spatte began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Dec 2007
Device: None
Thanks Daudi, this will help alot.
Spatte is offline   Reply With Quote
Old 05-09-2008, 07:50 PM   #57
nagyv
Member
nagyv began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Apr 2008
Device: iliad
Exporting from Zotero to the iLiad

I made a Firefox plugin to export files simply to the iLiad. A more detailed description can be found in a related thread
nagyv is offline   Reply With Quote
Old 05-25-2008, 08:57 PM   #58
vinicius0881
Member
vinicius0881 began at the beginning.
 
Posts: 12
Karma: 10
Join Date: May 2008
Location: Bahia Brasil
Device: EBW1150
automatically collect highlights on a separate file

hi guys i've been doing a lot of research on this feature but i just can't find it anywhere:

more specifically, i'd like my scribbles/text-selections (whatever, be it a selection on text based PDF file, be it a scribbled circle around some region on an image) to be automatically collected/put together on a separate file, say "textmarks" or "highlights".

for example i wished i could go on reading and selecting text/scribbling circles around paragraphs. when finished, there would be an option to extract these selections/circled regions and gather/sum up these things on a separate file all at once by processing the hole document(or a given page range).

thanks for reading all this and apologies for my poor english; it's soo important to me... so does anyone has any clue on whether this feature already exists or where else should i be asking this question?

i'm new to all this and this feature would justify by itself my iliad purchase as this feature plays an important role on my research process.
vinicius0881 is offline   Reply With Quote
Old 05-26-2008, 02:26 AM   #59
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Kent, UK
Device: iRex iLiad, Psion 5MX, nokia n800
If you are using linux then I think this should be what you are after. If you are on windows it might still work but you might have to put in a little work to get it working smoothly (I have not tried it on windows). At the end of the thread it is also points you to a search tool that allows you to search the selections on the iliad.
daudi is offline   Reply With Quote
Old 05-26-2008, 10:09 AM   #60
vinicius0881
Member
vinicius0881 began at the beginning.
 
Posts: 12
Karma: 10
Join Date: May 2008
Location: Bahia Brasil
Device: EBW1150
Quote:
Originally Posted by daudi View Post
If you are using linux then I think this should be what you are after. If you are on windows it might still work but you might have to put in a little work to get it working smoothly (I have not tried it on windows). At the end of the thread it is also points you to a search tool that allows you to search the selections on the iliad.
THANK YOU MAN
thats precisely what i was looking for, as it allows the automatic extraction of snippets(bits of text, image areas). i'm using windows so i'll be dealing with some difficulties, but it's no problem i suppose...
vinicius0881 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Research Rudi Chendra Writers' Corner 1 06-23-2009 07:38 AM
Too much research has me confused! sherryk_us Which one should I buy? 27 06-13-2009 02:51 PM
Irex Iliad: workflow for research Napoleon iRex 7 12-13-2008 03:56 PM
Anyone want to help me out with a little research? PorterHarbold Lounge 2 10-24-2008 03:52 AM
ebooks research cfhaynes Introduce Yourself 0 11-01-2007 03:03 PM


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


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