Unfortunately, for a number of reasons, I’ve been far too busy to follow up my previousÂ postÂ to use Mac OS X’s launchd to detect when the Sony eReader connects. There’s a lot of good launchd stuff on the Web, though, and it promises to be pretty easy once I sit down and actually write a plist for it.
In the mean time, here’s a revised script for moving the printed PDF files from a spooling directory to the eReader on connection. The setup is the same as before; simply kick the script with a Folder Action.
which growlnotify > /dev/null
if [ $? -eq 0 ]; then
echo $message | growlnotify -t "eReader" -p -2 -a /Applications/Preview.app
if [ -f "/tmp/prs-busy" ]; then
if [ -d "$readercard" ]; then
growl "Device detetected.";
for f in `ls $spool/*.pdf`
cp $f "$pdfdest"
if [ $? -eq 0 ]; then
rm -f $f
growl "Transferred `basename $f`."
growl "PDF transfer complete.";
rm /tmp/pre-busy 2>&1 /dev/null
The changes are pretty self-explanatory. In brief:
- Have use Preview’s icon, in case Calibre isn’t installed.
- Only look for the eReader’s card; there’s really no reason to look for both volumes.Â
- Use the lock file /tmp/prs-busy to ensure that the actual movement of the files doesn’t occur while it’s actually running.Â
Of these changes, (3) was certainly the most important, because if you mounted another volume (say, a digital camera) while the script was doing things, weird things could happen. In practice, I never saw anything amiss, but this makes me sleep better at night.
After the recent work I’ve done integrating my Sony eReader with Mac OS X, I still wanted to be able to optimize page layout for the device.Â
After some digging around and realizing that I don’t haveÂ
ppdcÂ I grabbed a PPD file for a generic Postscript printer and started hacking.Â
The results work pretty well, although I see goofy margins from some applications such asÂ TextMate.
Next up? Ditching the Folder Action script I wrote about yesterday in favor of
I have always read a ridiculous amount. Sadly, in recent years as I’ve taken greater advantage of resources such as the Association for Computing Machinery‘s Digital Library, what that really means is that I printÂ a lot.Â Â There’s a definite advantage to paper; you can stick it in your bag, or put your feet up and lean back more so than with a laptop or desktop PC. At the same time, I don’t archive what I read on paper; I either make notes citing the papers I’ve read, or if the paper is really important to me, I archive a copy of the PDF itself.Â As a result, my professional reading workflow is one of researching, printing, reading, and recycling the results. This is a tremendous waste of paper.
While I’ve tried various ebook solutions on PDAs over the years, I’ve never been particularly happy with PDF handling on mobile devices. Â I’ve watched with interest the growing market for ebooks on devices including the Sony eReader and the Amazon Kindle, although until recently neither has had particularly good PDF handling either.
Last month I laid hands on a Sony eReader, and really liked what I saw. PDF presentation with later firmware in the PRS 505 is much improved over previous firmware releases, and both the PRS 505 and PRS 700 support Secure Digital cards. As USB devices, these products show up as a mass storage device when mounted on Mac OS X. As an added bonus, Kovid Goyal’s Calibre application supports both format translation and automatic harvesting of Web content from RSS feeds. I have to admit that it’s pretty spiffy to get up in the morning, grab the eReader from my desk and have the latest content from both The New York TimesÂ and The Economist at my fingertips. In conjunction with the large number of freely available books from Feedbooks, it’s a leisure reader’s dream.
Although the eReader’s appearance as a mass storage device in the Mac OS X Finder is useful, I quickly tired of downloading papers and manually copying them to the device. Intuitively, it seemed that what I wanted to be able to do was to treat the eReader as another printer.
Upon reflection, this idea is quite compelling. It doesn’t require me to change my work flow at all; moreover, there is something cool about the idea of an eInk device being directly accessible as a printer.
Continue reading Improving Interaction Between the Sony eReader and Mac OS X