Easy paste to pastebin.ca

0 Likes
Fed up with:

- Selecting your text

- Going to pastebin.ca website

- Paste your text

- Submit

- Copy the URL you got back

- Paste that link to IRC, or whatever ?



My script gives you the ability to copy a file's content directly from
command line, and it returns the URL back to you, saving you precious
steps. It will also accepts stuff from STDIN. Examples:



me@mybox#: ./paste2paste.pl myfilename.conf

Your paste URL is: http://pastebin.ca/30095

or

df -h | ./paste2paste.pl

Your paste URL is: http://pastebin.ca/30096



If the script breaks for you, it may mean the code on pastebin.ca has
changed. Send me an email, and I will look at your problem. Avoid
sending me emails because you have missing perl modules. Read the
requirements.



Usage:

------

The following command line arguments are accepted:



./paste2pastebin.pl \
--content "SOME STRING" \
--description "SOME STRING" \
--type INTEGER \
--expiry "SOME STRING" \
--name "YOUR NAME"


See below for the "expiry" and "type" of text options.



Requirements:
-------------
It requires Perl, WWW::Mechanize, and Getopt::Long.

Defaults arguments values:
--------------------------
- 30 minutes expiry
- Raw text
- clueless (your name ;))
- description "-- automated paste by paste2pastebin.pl chapeaurouge
_AT_madpenguin_DOT_org"

Types of text:
-------------
1/Raw -- DEFAULT
2/Asterisk Configuration
3/C Source
4/C Source
5/PHP Source
6/Perl Source
7/Java Source
8/Visual Basic Source
9/C# Source
10/Ruby Source
11/Python Source
12/Pascal Source
13/mIRC Script
14/PL/I Source
15/XML Document
16/SQL Statement
17/Scheme Source
18/Action Script
19/Ada Source
20/Apache Configuration
21/Assembly (NASM)
22/ASP
23/BASH Script
24/CSS
25/Delphi Source
26/HTML 4.0 Strict
27/JavaScript
28/LISP Source
29/Lua Source
30/Microprocessor ASM
31/Objective C
32/Visual Basic .NET

Expiry times:
------------
Never -- DEFAULT
5 minutes
10 minutes
15 minutes
30 minutes
45 minutes
1 hour
2 hours
4 hours
8 hours
12 hours
1 day
2 days
3 days
1 week
2 weeks
3 weeks
1 month
2 months
3 months
4 months
5 months
6 months
1 year

Labels:

Collateral
Comment List
Anonymous
Related Discussions
Recommended