Jan-Jaap Bakker schrieb:
I googled a couple of posts about opening nzb files directly from
firefox amongst which some in this mailing list (dating from last
spring).
But they provided no definite solution,
you can open nzb files with the pan -o "downloaddir" --nzb command,
but this doesn't work correctly if pan is allready running/downloading.
I've got a solution using a simple bash script:
----------------------------------------------------------------------
#!/bin/bash
#get the process id of pan (if running):
PANPID=$(ps ax | grep -v grep | grep -v gnome-panel | grep pan | sed
's/\([0-9]*\).*/\1/')
#if you've got a process that has "pan" as a substring <---!!!!
#of its name, you have to add it to the grep pipe sequence
#the same way as is allready done for gnome-panel.
#(check with ps ax | grep pan)
if [ "$PANPID" != "" ]
then
echo Pan is allready running, stopping it first...
kill -15 $PANPID
#this soft kill allows pan to save the current tasks.
else
echo Pan is not running...
fi
echo Starting Pan now.....
pan -o /home/jan-jaap/Desktop/temp --nzb "$1" &
#change /home/jan-jaap/Desktop/temp to fit your download dir. <---!!!!
----------------------------------------------------------------------
just instruct firefox / nautilus or whatever browser you are using to
associate nzb files with the script and it should work.
Hope it helpes someone,
JJ
_______________________________________________
Pan-users mailing list
Pan-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/pan-users
alternatively, one could assign a pthread in pan to regularly check for
nzb's in
a certain folder. (say, every second once, that should suffice) and then
import
them (e.g. spawn a new "open" and open the "save-to" dialog).
a similar solution exists in newsleecher if i'm not wrong.
_______________________________________________
Pan-users mailing list
Pan-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/pan-users