# OESF Portables Forum

## Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: patzoul on May 10, 2006, 07:38:30 am

Title: Justreader Command Line
Post 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.
Title: Justreader Command Line
Post by: grog on May 10, 2006, 07:37:30 pm
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
Title: Justreader Command Line
Post by: patzoul on May 11, 2006, 09:03:27 am
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.
Title: Justreader Command Line
Post by: karlto on May 11, 2006, 04:11:23 pm
Quote
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:
Code: [Select]
justreader -hin a terminal to see if it will tell you...
Title: Justreader Command Line
Post by: grog on May 11, 2006, 06:19:50 pm
Quote
Most commands will give you some usage tips on the command line. Try:
Code: [Select]
justreader -hin 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.

Code: [Select]
#!/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 0if [ ! -s "1" ]; then echo "Usage: {0##*/} filename" >&2 exit 1fiINFILE=1INDIR={1%/*}CONFFILE=~/Choices/common/JustReader.confTMPFILE={CONFFILE%/*}/$$trap "\rm -f $TMPFILE" 1 2 3 15while read LINE; do set --$LINE    case $1 in File) echo "File =$INFILE";;         Folderpath) echo "Folderpath = $INDIR";; *) echo "$LINE";;    esacdone < $CONFFILE >$TMPFILE\mv -f $TMPFILE$CONFFILEexec justreader
HTH