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