OESF Portables Forum
Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: patzoul on May 10, 2006, 07:38:30 am
-
Do you know what is the syntax to open an html file with justreader using the command line?
I tried justreader x.html but I doesnt open the file. It just launches justereader and an error message pops up saying it couldnt open the file.
-
I can't install it to try out right now, but I'd suggest giving justreader the full path to the file, 'justreader /mnt/card/myfiles/myfile.html' for example. See if that works. hth
-
Didnt work. My objective is to find the command that work and set it in the ROX file manager to automatically open an html file.
-
Didnt work. My objective is to find the command that work and set it in the ROX file manager to automatically open an html file.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=126546\"][{POST_SNAPBACK}][/a][/div]
Most commands will give you some usage tips on the command line. Try:
justreader -h
in a terminal to see if it will tell you...
-
Most commands will give you some usage tips on the command line. Try:
justreader -h
in a terminal to see if it will tell you...[div align=\"right\"][a href=\"index.php?act=findpost&pid=126604\"][{POST_SNAPBACK}][/a][/div]
That didn't work (for me anyway) & since I couldn't find any other way, AND to be one to never shrink form a challenge, I came up with this 'simple' script . Hope it works for you, patzoul. Just stick it somewhere in your path.
#!/bin/sh
# justreader.sh - enables opening a specified file from the command line
# 2006-05-11 GROG!
#set -x # TESTING
# make sure justreader isn't already running.
ps | grep -E "\b[j]ustreader\b" | grep -v $$ && exit 0
if [ ! -s "$1" ]; then
echo "Usage: ${0##*/} filename" >&2
exit 1
fi
INFILE=$1
INDIR=${1%/*}
CONFFILE=~/Choices/common/JustReader.conf
TMPFILE=${CONFFILE%/*}/$$
trap "\rm -f $TMPFILE" 1 2 3 15
while read LINE; do
set -- $LINE
case $1 in
File) echo "File = $INFILE";;
Folderpath) echo "Folderpath = $INDIR";;
*) echo "$LINE";;
esac
done < $CONFFILE > $TMPFILE
\mv -f $TMPFILE $CONFFILE
exec justreader
HTH