Vortex
Vortex
Due to some interest in our little Vortex application CatDude and I have made it available.
Basically you can configure it to upload files to a server simply by dragging and dropping the file onto the script which sits on the desktop.
In xfce you place the script in a folder and drop the files on the script. It doesn't work if the script is on the desktop.
This file is required. Compile instructions in the script.
ftp://ftp.ncftp.com/ncftp/ncftp-3.2.5-src.tar.bz2
Basically you can configure it to upload files to a server simply by dragging and dropping the file onto the script which sits on the desktop.
In xfce you place the script in a folder and drop the files on the script. It doesn't work if the script is on the desktop.
This file is required. Compile instructions in the script.
ftp://ftp.ncftp.com/ncftp/ncftp-3.2.5-src.tar.bz2
- Attachments
-
- vortex-1.0.tar.gz
- Drag & Drop File Uploader
- (764 Bytes) Downloaded 444 times
Regarding the use of the idea of a "Vortex":
Robert Burns wrote about it in the late 1700's.
Find HERE....
QUOTE
"...thorough-paced selfishness is always the work of time. Indeed, in a
little time, we generally grow so attentive to ourselves and so
regardless of others that I have often in poetic frenzy looked on this
world as one vast ocean, occupied and commoved by innumerable vortices,
each whirling round its centre. These vortices are the children of men.
The great design and, if I may say so, merit of each particular vortex
consists in how widely it can extend the influence of its circle, and
how much floating trash it can suck in and absorb."
I guess the "trash" means "things...
i.e. Money, possessions, power, influence, etc.
Robert Burns wrote about it in the late 1700's.
Find HERE....
QUOTE
"...thorough-paced selfishness is always the work of time. Indeed, in a
little time, we generally grow so attentive to ourselves and so
regardless of others that I have often in poetic frenzy looked on this
world as one vast ocean, occupied and commoved by innumerable vortices,
each whirling round its centre. These vortices are the children of men.
The great design and, if I may say so, merit of each particular vortex
consists in how widely it can extend the influence of its circle, and
how much floating trash it can suck in and absorb."
I guess the "trash" means "things...
i.e. Money, possessions, power, influence, etc.
not sure I understand what you mean.smokey01 wrote:Sylvander you need to take a bit more water with it
Must I be innebriated to quote such ideas?
Doesn't the idea still apply today?
Does not the top few percent claim ownership of nearly ALL of the worlds' resources today?
Haven't the few been accumulation "things" throughout history?
Does the name "vortex" have unfortunate connotations?
Take some water with your scotch.
We called it the Vortex, you know, like a whirlpool. Drop a file on it and it get sucks up into the cloud/your storage.
CatDude has made a portable version of it so it will work from anywhere you place it, like /mnt/home, so you don't have to install it in every distro.
Just drag and drop the script onto the desktop then drag and drop files onto the script, job done.
Cheers
We called it the Vortex, you know, like a whirlpool. Drop a file on it and it get sucks up into the cloud/your storage.
CatDude has made a portable version of it so it will work from anywhere you place it, like /mnt/home, so you don't have to install it in every distro.
Just drag and drop the script onto the desktop then drag and drop files onto the script, job done.
Cheers
Smokey and CatDude,
I'm pretty sure you could achieve the same result using just curl.
I once wrote a script that took a screen snapshot of a certain website with a cron job, had it cropped (used netpbm tools iirc), then uploaded the resulting image to my website, all done with curl. It was totally automated. I'll dig around for the script, pretty sure it's on my usb hdd.
EDIT: found it
The image part is irrelevant but the curl part should work exactly (well close enough) to your ncftp routine. A config could be a good idea too and possibly encrypting the password with something simple like base64 so it isn't in plain text.
I'm pretty sure you could achieve the same result using just curl.
I once wrote a script that took a screen snapshot of a certain website with a cron job, had it cropped (used netpbm tools iirc), then uploaded the resulting image to my website, all done with curl. It was totally automated. I'll dig around for the script, pretty sure it's on my usb hdd.
EDIT: found it
Code: Select all
#!/bin/bash
#takes a screeny of webage, crops and uploads
#designed to be set as a cron job
#TODO, encrypt/decrypt config file otf
# depends +curl, +xwd, +netpbm
#[+pnmcut (in ubuntu and debian maybe change to "pamcut")]
#you can make @ config file in /etc/catchrc for vars
#eg
#GETSNAPURL="" #the url where you want to get screeny
#CROPLEFT=277 #x position of top left image
#CROPTOP=356 #y position of top left image
#x2=1004 #x size of image
#y2=809 #y size of image
#SAVEPATH="" #where to store image
#IMAGE="" #pre image name
#NEWIMAGE="" #final image name
#curl args
#USER="" #user
#PASS="" #password
#UPURL="" # url [of server]
#PORT="" # port
[ ! $DISPLAY ] && echo "error: no X" && exit
#read config
[ ! -f /etc/catchrc ] && echo "error: no config" && exit || . /etc/catchrc
$DEFAULTBROWSER $GETSNAPURL &
sleep 20
xwd -root | xwdtopnm | pnmtopng > capture.png
IMAGE=capture.png
NEWIMAGE=ladder.png
Xwin=$(( $x2 - $CROPLEFT)) Ywin=$(( $y2 - $CROPTOP))
pngtopnm $IMAGE \
| pamcut -left=${CROPLEFT} \
-top=${CROPTOP} \
-height=$Ywin \
-width=$Xwin | \
pnmtopng > $HOME/my-documents/$NEWIMAGE
curl -m 300 -o /var/webtrsfr.log -T $SAVEPATH/$NEWIMAGE \
ftp://${USER}:${PASS}@${UPURL}:$PORT/
killall $DEFAULTBROWSER
Puppy Linux Blog - contact me for access
Smokey and CatDude,
I see 01micko found his code just as I was posting this but here's the general form I've used.
Cheers,
s
I see 01micko found his code just as I was posting this but here's the general form I've used.
Code: Select all
curl -u user:pass -T myfile.txt ftp://ftp.testserver.com/dir
s
Catdude has rewritten the vortex script to use cURL instead of ncFTPput.
This removes the requirement to use additional binaries, as most, if not all Puppy's come with cURL included. This of course makes the package considerably smaller.
Neither CatDude or I realised cURL could upload files. Thanks to 01micko and seaside for enlightening us.
Enjoy.
This removes the requirement to use additional binaries, as most, if not all Puppy's come with cURL included. This of course makes the package considerably smaller.
Neither CatDude or I realised cURL could upload files. Thanks to 01micko and seaside for enlightening us.
Enjoy.
- Attachments
-
- vortex-1.1.tar.gz
- cURL version of Vortex
- (802 Bytes) Downloaded 382 times
Nicely done with homegrown vegetables .
If anyone is interested in encrypting their log on information, here's some code to insert at the beginning of Vortex.
The first time it's run, it prompts for a username and password which is then encrypted and saved to the file $HOME/upload/.eid.
The next run prompts for a password and then uploads the file.
Be sure to comment or remove the two lines
Cheers,
s
If anyone is interested in encrypting their log on information, here's some code to insert at the beginning of Vortex.
The first time it's run, it prompts for a username and password which is then encrypted and saved to the file $HOME/upload/.eid.
The next run prompts for a password and then uploads the file.
Code: Select all
# First run creates encrypted username password in hidden file
# $HOME/upload/.eid
# Next run asks for password and if ok calls upload_script
# passing parameters $USER $PASS
pass_dialog() {
PASSWD=`Xdialog --stdout --password --inputbox "Enter Password:" 10 30 Password Password `
[ $? != 0 ] && exit
userpass=(`echo "$PASSWD"|openssl des3 -in "$EID" -d -pass stdin`)
EXIT_CODE=$?
if [ $EXIT_CODE != 0 ];then
Xdialog --msgbox "Password Error - Try Again" 0 0
pass_dialog
fi
}
export -f pass_dialog
export EID=$HOME/upload/.eid
if [ ! -f "$EID" ] ; then # create user and password
mkdir -p $HOME/upload
userpass=` Xdialog --stdout --separator " " --password --2inputsbox "Enter Username and Password:" 20 40 Username Username Password Password `
[ $? != 0 ] && exit
Auserpass=($userpass)
PASS=${Auserpass[1]}
openssl des3 -out "$EID" -pass pass:"$PASS"<<<"$userpass"
exec "$0"
else # open password dialog
pass_dialog
USER=${userpass[0]}
PASS=${userpass[1]}
fi
##USER="username"
##PASS="password"
in VortexUSER="username"
PASS="password"
Cheers,
s
Very nice seaside.
Some time ago I discovered a nice little script compiler, see here:
http://linux.softpedia.com/get/System/S ... 8503.shtml
This allows you to compile the script so the passwords are hidden.
Some time ago I discovered a nice little script compiler, see here:
http://linux.softpedia.com/get/System/S ... 8503.shtml
This allows you to compile the script so the passwords are hidden.