3 # Copyright (C) 2008, Parrot Foundation.
4 # $Id: nopaste.pl 38612 2009-05-08 18:30:25Z Infinoid $
15 my $server = 'scsys.co.uk';
16 my $url = "http://$server:8001/paste";
18 c => '#sdl', # channel
19 n => getlogin || getpwuid($<) || 'someone', # name
23 getopt( 'c:n:t:', $opt );
26 unless defined $opt->{t};
29 my $text; while(<>) { $text .= $_; }
30 my $mech = WWW::Mechanize->new(
38 form_name => 'pasteForm',
48 my @link = $mech->links;
49 print "Your paste can be found at ", $link[0]->url, "\n";
54 tools/dev/nopaste.pl - paste the contents of a file via a pastebot server
58 nopaste.pl -t "TITLE" [ -c CHANNEL ] [ -n NAME ] [ FILENAME ]
60 TITLE the title of the paste
61 CHANNEL the irc channel (defaults to #parrot)
62 NAME the username (defaults to username or 'someone')
63 FILENAME the name of the file to paste (defaults to STDIN)
67 This program can be used to paste the contents of a file on a pastebot server
68 -- specifically, B<nopaste.snit.ch> -- for immediate linkage on an IRC channel --
73 Originally written by particle, with subsequent contributions to functionality
74 by LimbicRegion, paultcochrane and cotto.
80 # cperl-indent-level: 4
83 # vim: expandtab shiftwidth=4: