Added manpages.

This commit is contained in:
tobast 2012-01-04 18:37:46 +01:00
parent 2e7c989c9d
commit 25e401de06
3 changed files with 220 additions and 5 deletions

View file

@ -10,13 +10,13 @@ OBJS=CurlPost.o func.o main.o ParameterRead.o ConfigRead.o
all: checkdevcode $(TARGET)
checkdevcode:
@if [[ ! -f data_devcode.h ]]; then echo -e "\nERROR: No 'data_devcode.h' file (common error). Please read \"COMPILE.txt\" for more help.\n" ; false ; fi
@if (( `cat data_devcode.h | grep -c '#define DEVELOPPER_CODE ""'` != 0 )); then echo -e "\nERROR: 'DEVELOPPER_CODE' undefined (common error). Please read \"COMPILE.txt\" for more help.\n" ; false ; fi
#checkdevcode:
# @if [[ ! -f data_devcode.h ]]; then echo -e "\nERROR: No 'data_devcode.h' file (common error). Please read \"COMPILE.txt\" for more help.\n" ; false ; fi
# @if (( `cat data_devcode.h | grep -c '#define DEVELOPPER_CODE ""'` != 0 )); then echo -e "\nERROR: 'DEVELOPPER_CODE' undefined (common error). Please read \"COMPILE.txt\" for more help.\n" ; false ; fi
#### Useful while developping. To enable it, uncomment and add it as a dependence of 'all' ####
#makeuser:
# ./pastebincl --usergen < userinput &> /dev/null
makeuser:
./pastebincl --usergen < userinput &> /dev/null
$(TARGET): $(OBJS)
$(CXX) $(CXXLIBS) $^ $(CXXFLAGS) -o $@

121
pastebincl.1 Normal file
View file

@ -0,0 +1,121 @@
PASTEBINCL(1) PASTEBINCL(1)
NNAAMMEE
PPaasstteebbiinnCCLL - Pastebin Commnd-Line, posts a "paste" on _h_t_t_p_:_/_/_p_a_s_t_e_-
_b_i_n_._c_o_m_/
SSYYNNOOPPSSIISS
_p_a_s_t_e_b_i_n_c_l _[_o_p_t_i_o_n_s_]
DDEESSCCRRIIPPTTIIOONN
_P_a_s_t_e_b_i_n_C_L is a program which sends a "paste" at http://pastebin.com/
using a command-line interface.
UUSSAAGGEE
When you run _p_a_s_t_e_b_i_n_c_l, it will wait for user entry until you pressed
_c_t_r_l_+_D. Then, it will send the text on pastebin with the options
given.
PPOOSSTT AASS AA RREEGGIISSTTEERREEDD UUSSEERR
To post as a registered user, you must generate a file containing your
username and password. To do so, run "_p_a_s_t_e_b_i_n_c_l _-_-_u_s_e_r_g_e_n".
OOPPTTIIOONNSS
The possible arguments are:
--vv, ----vveerrssiioonn
Prints the program version and basic informatons, and then
return.
--hh, --??, ----hheellpp
Prints a short help, and then return.
----lliicceennccee
Prints the program licence, and then return.
----uusseerrggeenn
Generates an "users" file for the software with the informations
given after.
--nn _[_n_a_m_e_], _-_-_n_a_m_e=_[_n_a_m_e_]
Defines _[_n_a_m_e_] as the paste name.
--ss _[_s_y_n_t_a_x_], ----ssyynnttaaxx=_[_s_y_n_t_a_x_]
Defines [[ssyynnttaaxx]] as the syntax highlighting pattern of your
text, eg. "c" or "lolcode" (see the full list on http://paste-
bin.com/). To display the complete list, run "_p_a_s_t_e_b_i_n_c_l _-_-_s_y_n_-
_t_a_x_l_i_s_t".
----ssyynnttaaxxlliisstt
Displays the complete list of "_s_y_n_t_a_x" parameters (see "-s").
--ee _[_e_x_p_i_r_e___t_i_m_e_], ----eexxppiirree _[_e_x_p_i_r_e___t_i_m_e_]
Defines _[_e_x_p_i_r_e___t_i_m_e_] as the time before the paste expires. Pos-
sible values : N = Never ; 10M = 10 Minutes ; 1H = 1 Hour ; 1D =
1 Day ; 1M = 1 Month.
--pp, ----pprriivvaattee
Posts a private past instead of a public one. A private paste
willn't be displayed in the latest pastes, neither than be
indexed by search engines.
--gg, ----gguueesstt
Posts the paste as a guest. It's the default option if no con-
figuration file was set.
FFIILLEESS
~/._p_a_s_t_e_b_i_n_c_l_r_c
The file generated by --usergen. It is encrypted with a built-in
key generated during compilation, and contains username and
password for your pastebin account.
EEXXAAMMPPLLEESS
To post a paste without options:
$ _p_a_s_t_e_b_i_n_c_l (type your text, then ctrl+D)
To post without options a file named "foo.txt":
$ cat foo.txt | _p_a_s_t_e_b_i_n_c_l
To post a paste named "foo", in C language, privately, which expires in
10 minutes:
$ _p_a_s_t_e_b_i_n_c_l -n foo -s c -e 10M -p (type your text, then ctrl+D)
AAUUTTHHOORR
Both _p_a_s_t_e_b_i_n_c_l and this manpage were written by Theophile BASTIAN
(aka. Tobast) <contact@tobast.fr>.
LLIICCEENNCCEE
Pastebincl is under GNU GPL licence, as published by the Free Software
Fundation on version 3.
RREEPPOORRTTIINNGG BBUUGGSS
Please report every bug you encounter to <error-report@tobast.fr>.
25 December 2011 PASTEBINCL(1)

94
pastebincl.man Normal file
View file

@ -0,0 +1,94 @@
.TH PASTEBINCL 1 "25 December 2011"
.SH NAME
\fBPastebinCL\fP - Pastebin Commnd-Line, posts a "paste" on \fIhttp://pastebin.com/\fP
.SH SYNOPSIS
\fI\fIpastebincl\fP\fP [options]
.SH DESCRIPTION
\fIPastebinCL\fP is a program which sends a "paste" at http://pastebin.com/ using a command-line interface.
.SS USAGE
When you run \fIpastebincl\fP, it will wait for user entry until you pressed \fIctrl+D\fP.
Then, it will send the text on pastebin with the options given.
.SS POST AS A REGISTERED USER
To post as a registered user, you must generate a file containing your username and password.
To do so, run "\fIpastebincl --usergen\fP".
.SH OPTIONS
The possible arguments are:
.TP
\fB-v\fP, \fB--version\fP
Prints the program version and basic informatons, and then return.
.TP
\fB-h\fP, \fB-?\fP, \fB--help\fP
Prints a short help, and then return.
.TP
\fB--licence\fP
Prints the program licence, and then return.
.TP
\fB--usergen\fP
Generates an "users" file for the software with the informations given after.
.TP
\fB-n\fP \fI[name]\fP, \fP--name\fP=\fI[name]\fP
Defines \fI[name]\fP as the paste name.
.TP
\fB-s\fP \fI[syntax]\fP, \fB--syntax\fP=\fI[syntax]\fP
Defines \fB[syntax]\fP as the syntax highlighting pattern of your text, eg. "c" or "lolcode" (see the full list on http://pastebin.com/).
To display the complete list, run "\fIpastebincl --syntaxlist\fP".
.TP
\fB--syntaxlist\fP
Displays the complete list of "\fIsyntax\fP" parameters (see "-s").
.TP
\fB-e\fP \fI[expire_time]\fP, \fB--expire\fP \fI[expire_time]\fP
Defines \fI[expire_time]\fP as the time before the paste expires. Possible values : N = Never ; 10M = 10 Minutes ; 1H = 1 Hour ; 1D = 1 Day ; 1M = 1 Month.
.TP
\fB-p\fP, \fB--private\fP
Posts a private past instead of a public one. A private paste willn't be displayed in the latest pastes, neither than be indexed by search engines.
.TP
\fB-g\fP, \fB--guest\fP
Posts the paste as a guest. It's the default option if no configuration file was set.
.SH FILES
.TP
~/.\fIpastebinclrc\fP
The file generated by --usergen. It is encrypted with a built-in key generated during compilation, and contains username and password for your pastebin account.
.SH EXAMPLES
.TP
To post a paste without options:
$ \fIpastebincl\fP
(type your text, then ctrl+D)
.TP
To post without options a file named "foo.txt":
$ cat foo.txt | \fIpastebincl\fP
.TP
To post a paste named "foo", in C language, privately, which expires in 10 minutes:
$ \fIpastebincl\fP -n foo -s c -e 10M -p
(type your text, then ctrl+D)
.SH AUTHOR
Both \fIpastebincl\fP and this manpage were written by Theophile BASTIAN (aka. Tobast) <contact@tobast.fr>.
.SH LICENCE
Pastebincl is under GNU GPL licence, as published by the Free Software Fundation on version 3.
.SH REPORTING BUGS
Please report every bug you encounter to <error-report@tobast.fr>.