• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

pastebin.d/H03-Aug-2019-202164

po/H03-Aug-2019-7,7646,172

utils/H03-Aug-2019-429270

.bzrignoreH A D03-Aug-201915 32

COPYINGH A D03-Aug-201917.6 KiB341281

READMEH A D03-Aug-20193.5 KiB12381

pastebinitH A D03-May-202216.1 KiB461363

pastebinit.xmlH A D03-Aug-20194.6 KiB131123

release.confH A D03-Aug-201997 32

test.shH A D03-Aug-2019734 2419

README

1USING PASTEBIN.D FILES
2
3To enable support for private pastebins, first you will need to know the fields
4that are in use by the pastebin when posting data.
5
6Add a file in the ~/.pastebin.d or /etc/pastebin.d/ directory with the
7following format:
8
9[pastebin]
10basename = domain.name
11regexp = "http://(.*)\.?domain.name/"
12
13[format]
14reserved_keyword = pastebin_site_field
15custom_keyword = pastebin_site_field
16
17[defaults]
18custom_keyword = value
19
20
21THE PASTEBIN SECTION
22
23Under "[pastebin]", you will want to keep the very basic information to
24identify the pastebin. Only two fields are used in that section:
25
26	basename - 	the generic domain name for the pastebin.
27			this domain name should not contain
28			possible sub-domains in use.
29
30	regexp -	a regular expression that matches the
31			basename, as well as any sub-domains that
32			may be in use.
33
34
35THE FORMAT SECTION
36
37Under "[format]", identify the various fields in use in the pastebin you want
38to setup. Identify any fields used to publish data on the pastebin, and add
39them to the configuration file.
40
41The "[format]" section expects reserved and custom keywords matched to the real
42name for the field for the pastebin you are setting up. In other words, the
43data that a reserved or custom keyword (the left-hand side) refers to will be
44put in the named field assigned to it (the right-hand side).
45
46A number of reserved keywords can be used, but are optional:
47
48	user - 		contains the username for the user
49			calling the pastebinit utility.
50
51	content -	contains the data that will be posted.
52
53	title -		contains the title if set at the command
54			line.
55
56	version -	contains the version as set at the
57			command line.
58
59	format -	contains the format setting:
60			usually used for syntax highlighting.
61
62	permatag -	contains permatag as set at the command
63			line.
64
65	username -	contains the pastebin username if
66			required.
67
68	password -	contains the pastebin user's password
69			if required.
70
71	jabberid -	contains the jabberid for the poster
72			as set at the command line.
73
74	private -	make the paste private if possible
75
76Two additional special parameters are available for use:
77
78	page -		used to specify a page from which to
79			post data. It is the actual URL of
80			the pastebin's form.
81
82	regexp -	used to specify a regexp to execute
83			on the resulting page after posting.
84			This is useful to deal with special
85			pastebins that don't redirect you
86			to the new post's URL.
87
88Add any other fields in use for the specific pastebin you are setting up may be
89added to the "[format]" section using the same syntax.
90
91An easy way to deal with special parameters that need to be passed to the
92pastebin, such as expiry time for a post, is to assign the pastebin's field
93name to a variable, and set the correct value for that variable under the
94"[defaults]" section later, as such:
95
96[format]
97expire = expiry
98
99[defaults]
100expire = 365
101
102Where 'expire' can then be reused as the keyword to retrieve a static value in
103the '[defaults]' section. See below for an example.
104
105
106THE DEFAULTS SECTION
107
108The '[defaults]' section is used to set static values for custom fields.
109
110Some pastebins require setting fields such as expiry time for posts, or
111whether to use cookies. Such values are set using a custom field, followed by
112the value to give it.
113
114To reuse the example above, statically set a post to be expire after 365 days:
115
116[defaults]
117expire = 365
118
119Here, the value 365 will be assigned to the expire keyword. In the "[format]"
120section, the value in the expire keyword is applied to the field called
121"expiry".
122
123