NAME

webpaste


DESCRIPTION

webPaste is a small script that acts as front-end to the paste bot family http://sourceforge.net/projects/pastebot/. Those bots are an external alternative to paste content from a user to a public place without clobbing and annoying a lot of people in irc channels. This bot provides a web interface to paste the data someone wants to publish.

This interface is neat if you have small amounts of data to paste, as soon as it goes to extracts of logfiles or code-data, it can become quite painful to paste screenpages over screenpages to a webformular.

This is where this script comes in. For data which is allready in file form, there is no need to transfer it into a X buffer and from there into a web formulary:

Call the script, it takes a filename as argument and pastes it to the paste bot.


COPYRIGHT and LICENCE

 Copyright (c) 2003 Bruno Boettcher
 webPaste.pl is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; version 2
 of the License.
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.


FUNCTIONS OF THIS SCRIPT

handler_start
take the first argument given along on the command line, open that file, read it in and send it to the paste bot

handler_end
The http request completed, read in the incoming webpage, transform it to text and extract the URL reference to the text...


INSTALLATION

Just fetch the script from http://bboett.free.fr/webPaste.pl . Check the perl-path at the beginning (this line: #!/usr/bin/perl), as the data section at the top of the file (default nickname, server and channel). After making the file excutable (chmod +x webPaste.pl) you are ready to use it.

You should place it somewhere the shell might find it, the rest of the help supposes you have it in the local directory (thus ./) but it is suggested to put it into ~/bin or /usr/local/bin.


USAGE

To invoque the script:

./webPaste.pl someFile

This script accepts some command line arguments, those have to come before the filename:

  -n nick    to change the defautl nickname used by the script
  -s summary a summary describing the data that will be pasted
  -c channel a channel to post the URL to the pasted data
  -u URL the url of the paste bot

example:

./webPaste.pl -c '#perlhelp' -n ``anonymouscoward'' -s 'error log' -u http://nopaste.snit.ch:8000 core

You can preset the nickname, channel, pastebot-URL at the beginning of the script.

If the channel given wasn't valid the script returns the URL where you can view the pasted data, otherwise the URL is send to the selected channel.


AUTHOR

Bruno Böttcher <bboett at adlp dot org>


SEE ALSO

http://poe.perl.org/