upcow

A Python program that reports your uptime through cowsay,
and uploads it to a specified ftp server.

Overview & History

Upcow was born in the form of a bash script which utilized the system's uptime command, and ran it through cowsay. Then using a program called quftp, a scriptable ftp client, it uploaded the file to a specified directory on my web server. Add it to the crontab and voila! an automated uptime output.

Well it caught a small few people's attention and they asked if they could have the script. I have no problem with this, except that they need cowsay, they need quftp, and they need to write their own quftp script. Not to mention changing the bash script to reflect their paths.

As you can see, the portability factor is a bit of a chore. That's where this aspect of the project comes in. The python version of upcow is meant to combine everything in a neat, usable package, that has less of a dependancy problem, and can also include a certain level of modularity, allowing users to futher customize the output.

Release Information

As of right now, upcow isn't in a release format. The current version is 0.0.5 and can be thought of as 'alpha'. You can download the files if you wish, and run the program, just know that there is no official support for the program as of yet.

upcow.tar.bz2

Usage Help

upcow.py -[pvh] -o [host] -i [user] [pass] -c [cowfile] -f [output filename]

-h, --help

show this help message and exit

-v, --version

show the program version and exit

-p, --print-only

prints the output to stdout, instead of a file, and exits
Note: Will not execute the ftp transaction.

-f FILE, --file=FILE

file to output to. default: upcow.out

-c COWFILE, --cow=COWFILE

alternate .cow file to use. If not specified, uses cowsay default. Will only use the cowfiles that your cowsay install has availiable.
Example: upcow -c daemon

-o FTPHOST --host=FTPHOST

specify the host for an ftp connection

-i FTPUSER FTPPASS, --info=FTPUSER FTPPASS

specify the username and password for the ftp connection. If omitted, we default to anonymous values.

-d FTPDIR, --dir=FTPDIR

specify the remote directory to put the file. If omitted will put the file int he root ftp directory.

Examples

upcow

Will output the standard cow to upcow.out, and exit.

upcow -c daemon -f daeup

Will use the 'daemon' cow, and will output to file 'daeup'

upcow -c tux -o mydomain.com

Will use the 'tux' cow, and will output to file 'upcow.out'. It will then connect to 'mydomain.com', login anonymously, and send the file to the root ftp directory.

upcow -c tux -o mydomain.com -i myuser passw0rd

Will use the 'tux' cow, and will output to file 'upcow.out'. It will then connect to 'mydomain.com', login with the user 'myuser', the password 'passw0rd', and send the file to the root ftp directory.

upcow -o mydomain.com -i myuser passw0rd -d main/files

Will use the default cow, and will output to file 'upcow.out'. It will then connect to 'mydomain.com', login with the user 'myuser', the password 'passw0rd', and the file to the 'main/files' ftp directory.

upcow -p -o mydomain.com

Will print the generated output to stdout, and will not connect to 'mydomain.com'.
-p, -h, and -v are all single arguments that stop the program after execution.

Contact Infomation

If you would like to contact the members of the dev team (all two of us) for any reason, bugs, suggestions, comments, etc. then please feel free to contact us in these ways:

On IRC we generally lurk in the #linuxcult channel on irc.oftc.net. Our handles are arbscht and colinb.
If you have an odd aversion to IRC, feel free to contact Colin on AIM @ GoodJarb, or on Jabber @ colinb@jabber.co.nz. Futhermore, you can always shoot me [Colin] an e-mail at upcow AT colin dot geek d0t nz. Find Arbscht at arbscht AT gmail D0T com.

Hosting and Project management graciously provided by SourceForge. updated 5.27.05.
SourceForge.net LogoValid XHTML 1.1! Python Powered Logo