~swalladge/pc

ref: c1e90f8eda51044d57c8ae7a07cf4be02d1f8bd0 pc/example_config.toml -rw-r--r-- 6.5 KiB
c1e90f8eSamuel Walladge Add contribution guidelines 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# Example configuration

[main]
# Default server if none given on command line.
# Optional; if missing, will use arbitrary server entry
server = "fedora"

# Optional; if missing, will not log url history.  if set, will append url of
# successful pastes to this file, one per line, newest to the bottom. The file
# is created if not existing. Parent directories will not be created. If paste
# successful but failed to write to histfile, a warning will be printed to
# stderr and will exit with a non-zero exit code.
# Relative paths will be resolved relative to the current working directory.
histfile = "/tmp/paste_history.txt"


# Now each "server" is a configuration stored under a certain key in the
# `servers` hashmap. The key (eg. "vpaste" in the case of "servers.vpaste") is
# what is used to select a server on the command line and the default `server`
# option. Note that this can be different to the value of the `backend` for a
# server block, and multiple server blocks can be defined using the same
# backend (eg. for different public servers or different default config).

# Must have at least one server defined in the config, otherwise the program
# will exit on error.

# What follows is an example server block for each backend and an example value
# for each possible option along with comments detailing usage. Each backend
# can have a different set of options. When defining your own config, use this
# example file as a reference, or see the output of `pc show-backend
# <backendname>`.

# Where a duration value is required, it should be formatted according to
# <https://docs.rs/humantime/1.2.0/humantime/fn.parse_duration.html>.
# Basically, values like "1month 2d 3h 30m 30s" or "5m" or "300s".

[servers.vpaste]
# supports any servers running http://pileus.org/tools/vpaste
backend = "vpaste"
url = "http://vpaste.net/"


[servers.rs]
backend = "paste_rs"
url = "https://paste.rs/"


[servers.haste]
# supports any servers running https://github.com/seejohnrun/haste-server
backend = "haste"
url = "https://hastebin.com/"


[servers.termbin]
# supports any servers running https://github.com/solusipse/fiche
backend = "fiche"
domain = "termbin.com"
# port is optional; defaults to 9999
port = 9999


[servers.fedora]
# supports any servers running https://github.com/LINKIWI/modern-paste
backend = "modern_paste"
url = "https://paste.fedoraproject.org/"

# optional; title for the paste; default is no title (set by the server; usually
# 'Untitled')
title = "my paste"

# optional; expires in X duration. Default is set
# by the server (eg. fedora paste defaults to a week iirc)
expires = "10min"

# optional; syntax highlighting to use. Default is plain text
# (set by the server).
syntax = "python"

# password protect the paste url. Optional - default is not password protected.
password = "password123"

# optional api key to authenticate paste upload requests. Default is submit as
# anonymous.
apikey = "BbK1F09sZZXL2335iqDGvGeQswQUcvUmzxMoWjp3yvZDxpWwRiP4YQL6PiUA8gy2"


[servers.dpastecom]
backend = "dpaste_com"
url = "http://dpaste.com/"

# optional; default is plain text
# see <http://dpaste.com/api/v2/syntax-choices/> for list of supported names
syntax = "js"

# optional; time to live as a duration. default is use server default (7 days).
# Max duration supported by server is 1year.
expires = "1d"

# optional username to publish as; default is anonymous author
author = "my name"

# optional; default is no title
title = "my paste"

[servers.ots]
# supports any servers running https://github.com/onetimesecret/onetimesecret
backend = "onetimesecret"
url = "https://onetimesecret.com/"

# Optional options.

# password protect the secret
password = "password123"

# optional; time to live as a duration
expires = "2days"

# tell the server to email the secret link to this address. Note that
# onetimesecret.com only allow this with authenticated uploads. (anonymous
# uploads also have other restrictions; see website)
recipient = "user@example.com"

# username and api token; if these are both provided, the program will
# attempt to authenticate with them. Note that either both must be provided, or
# neither. It is ok to provide them in stages - eg. username in the config file
# and api_token on the command line.
username = "myuser@example.com"
apikey = "DEADBEEF"


[servers.sprunge]
backend = "sprunge"
url = "http://sprunge.us/"

# optional; default is raw/plaintext. If syntax provided, the text is shown
# with line numbers and has pygments based html syntax highlighting. Note that
# this is a client-side option that takes effect by adding a query paramater to
# the resulting paste url.
syntax = "py"


[servers.pip]
backend = "pipfi"
url = "http://p.ip.fi/"


[servers.dpaste]
# supports any servers running <https://github.com/bartTC/dpaste>
backend = "dpaste"
url = "https://dpaste.de/"

# optional; syntax highlighting filetype (default is set by server)
syntax = "c"

# optional; lifetime as a duration. Default server config also supports special
# values like "onetime" and "never".
expires = "3600s"


[servers.ubuntu]
backend = "ubuntu"
url = "https://paste.ubuntu.com/"

# Optional values

# Filetype for syntax highlighting.
syntax = "js"

# Approximate time to live. Default is use server default (no expiration, but not guaranteed).
# Supported values are day, week, month, and year.
expires = "week"

# Username to publish as. Default is anonymous author.
author = "my name"


[servers.ix]
backend = "ix"
url = "http://ix.io/"

# Optional values

# Filetype for syntax highlighting. If syntax provided, the text is shown with
# line numbers and has pygments based html syntax highlighting. This is a
# client side option that works by adding to the resulting url. Default is raw
# plain text without html markup. See also http://ix.io/ for more client-side
# options.
syntax = "python"

# DISABLED - does not appear to work.
# # Set number of reads before the paste is deleted. Default is unlimited reads.
# reads = 2

# Username and password for authenticated pastes; if these are both provided,
# the program will attempt to authenticate with them. From ix.io: "If the login
# does not exist, it will be created." Note that either both must be provided,
# or neither. It is ok to provide them in stages - eg.  username in the config
# file and api_token on the command line.
username = "me"
apikey = "hunter2"

[servers.bpaste]
backend = "bpaste"
url = "https://bpaste.net/"

# Optional values

# Filetype for syntax highlighting. Default is set by the server.
syntax = "python"

# Paste lifetime. Supports "1day" and "1week". Default is 1 day.
expires = "1week"