Pastebin from the console. Simple and convenient
He began to frequently use the service and add your notes through a browser hands quickly tired.
Searched and found in the repository programs from pastebinit - did not work because of restrictions on work with pastebin-services (to add a new service - you should write to the author, and wait, wait, wait - is not very interesting), the more that I'm just on a hosting made his service on the standard engine pastebin, not to have problems with the encoding (pastebin default does not work in unicode), and just out of interest.
Below cap script (see full and download pastebinput ):
#! / Usr / bin / perl #================================================= ============================== # DESCRIPTION: Simple otpravlyalka command output or body file on pastebin. Sets backlight # For some of these through-i files. # # USAGE: cat file.txt | pastebinput.pl or pastebinput.pl-i file.txt # # OPTIONS:-i <input_file>;-u <server_url>;-s <syntax>;-e <expire=[f,m,d]>;-r <remember=[0,1]>;-n < name> # AUTHOR: dimio # URL: http://www.dimio.org # VERSION: 0.9 # CREATED: 2010-01-31 #================================================= ==============================
Reference to the script:
Use: pastebinput [OPTION] ... <-I input_file> (1 st form)
or: COMMAND | pastebinput (2 nd form)
In the first form on the server will be sent to the specified file input_file.
In the second form on the server will send the result of the withdrawal of COMMAND.
Keys:
-S [text, perl, ...] The syntax for illumination at pastebin;
-U [http://server.com] URL server (for other than pastebin.org);
-E [d, m, f] The term storage on the server:
d - one day, m - month, f - permanent;
-I [input_file] The name of the input file, which would
posted on pastebin server;
-N [username] The name of the sender (otherwise - anonimous);
-R Remember the sender (if installed);
-H Output this help, and the completion of the program;
Example: pastebinput-r-s perl-em-n User-i. / Test.pl
Then create a link to run the script:
ln-s / home / user / scripts / pastebinput.pl / usr / local / bin / pastebinput In .bashrc alias added with the correct settings for the call:
alias pbout = 'pastebinput-u http://pastebin.dimio.org-n dimio-r' (You can append to the end of rule to the clipboard immediately get a link to the data sent to the following: | xclip or | xsel -i -b , but then stops working to send body of the specified file, the data obtained by the second form of call - via conveyor - such problems do not have).

Recent comments