Ticket #520: nopaste.patch
File nopaste.patch, 1.0 KB (added by fperrad, 13 years ago) |
---|
-
nopaste.pl
9 9 10 10 use WWW::Mechanize; 11 11 use Getopt::Std; 12 use Pod::Usage; 12 13 13 14 14 15 my $server = 'nopaste.snit.ch'; … … 21 22 22 23 getopt( 'c:n:t:', $opt ); 23 24 24 usage()25 pod2usage(2) 25 26 unless defined $opt->{t}; 26 27 27 28 … … 51 52 print "Your paste can be found at ", $link[0]->url, "\n"; 52 53 53 54 54 sub usage {55 print <<USAGE;56 nopaste.pl - paste the contents of a file via $server57 58 nopaste.pl -t "TITLE" [ -c CHANNEL ] [ -n NAME ] [ FILENAME ]59 60 TITLE the title of the paste61 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)64 USAGE65 exit 0;66 }67 68 ########## DOCUMENTATION ##########69 70 55 =head1 NAME 71 56 72 57 tools/dev/nopaste.pl - paste the contents of a file via a pastebot server