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

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


Thread Tools Search this Thread
Old 08-05-2007, 01:30 AM   #1
KaiGoth began at the beginning.
Posts: 48
Karma: 22
Join Date: Aug 2007
Device: Sony PRS500 & PRS700
BASH script for *2lrf utilities (thanks Kovid!)...

Hey all, I notice that the libprs500 utils seem really popular and have a ton of functionality. Like many others, I downloaded all of the BAEN CDs and wanted to do a mass conversion. Put together a real quick script in case anyone else is looking for something similar. (Didn't see anything in a search, but might have missed if someone already did similar)

Basically, just dump all your files of the same type (.lit, .rtf, etc.) into a single directory, and run the below script from that directory. First option is for the type of file converting from, second option is any *2lrf option you want to add (like meta-data changes). An example would be ./ rtf "--publisher=BAEN"

I tend to batch convert files in groups by author/series myself, but I ALWAYS name my source file to the book title. If you don't, remove the "-t $targ" portion from the script. This makes it easy for me since I have a ton of files that don't have any meta-data, and I can at least get the title set without any extra work.

Works pretty simply for me, so I thought I'd share. Finished the first 5 CDs in less than 30 minutes.

Thanks again to Kovid for all his work!!


# $1 = input file type
# $2 = options

ls -1 | grep \.$1$ | sed "s/\.$1//g" > inputfiles

exec 3<inputfiles
while read -u 3 targ
echo "Converting File $targ.$1 to $targ.lrf"
$12lrf "-t $targ" $2 $targ.$1 &> /dev/null
exec 3<&-

rm inputfiles

Last edited by KaiGoth; 08-05-2007 at 02:33 AM. Reason: formatting
KaiGoth is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash Script/SQL Query for ISBN in filename? zenrhino Calibre 1 09-26-2010 08:55 AM
Is it possible to execute a bash script from the SD card? godel10 iRex 25 06-25-2009 03:55 PM
Gmail utilities ignatz Lounge 7 06-10-2009 05:36 PM
manga2pdf - Linux bash scripts for the Cybook, Sony Reader and iLiad IceHand PDF 52 03-09-2009 06:36 PM
New Ebw-1150 - looking for suggestions on utilities patches etc etc askyn Fictionwise eBookwise 8 09-14-2008 09:29 AM

All times are GMT -4. The time now is 03:54 AM. is a privately owned, operated and funded community.