Skip to content
This repository was archived by the owner on Jun 16, 2020. It is now read-only.

Commit d5b51f1

Browse files
committed
Generate man page
1 parent 87e86d3 commit d5b51f1

File tree

3 files changed

+109
-88
lines changed

3 files changed

+109
-88
lines changed

cmd/cistern/man.go

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,21 @@ T}@T{
230230
Move cursor down by one screen
231231
T}
232232
T{
233+
<
234+
T}@T{
235+
Move sort column left
236+
T}
237+
T{
238+
>
239+
T}@T{
240+
Move sort column right
241+
T}
242+
T{
243+
!
244+
T}@T{
245+
Reverse sort order
246+
T}
247+
T{
233248
o, +
234249
T}@T{
235250
Open the fold at the cursor
@@ -315,13 +330,9 @@ If \f[C]XDG_CONFIG_HOME\f[R] (resp.
315330
cistern uses a configuration file in TOML version
316331
v0.5.0 (https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.5.0.md)
317332
format.
318-
The configuration file is made of keys grouped together in tables.
319-
The specification of each table is given in the example below.
320-
.SS Reference
321333
.PP
322-
The complete format of the configuration file is described in a
323-
self-documenting example included in the release archives and also
324-
available on
334+
The complete format of the configuration file is described in the
335+
example included in the release archives which is also available on
325336
GitHub (https://github.com/nbedos/cistern/blob/master/cmd/cistern/cistern.toml)
326337
.SS Minimal example
327338
.PP
@@ -359,8 +370,8 @@ sort = \[dq]-started\[dq]
359370
# cistern will still run but with some limitations:
360371
# - GitHub: cistern will hit the rate-limit for
361372
# unauthenticated requests in a few minutes
362-
# - GitLab: cistern will NOT be able to access job of
363-
# pipelines
373+
# - GitLab: cistern will NOT be able to access pipeline
374+
# jobs
364375
#
365376
366377
### GITHUB ###
@@ -472,7 +483,7 @@ Monitor pipelines of other repositories
472483
cistern -r https://gitlab.com/nbedos/cistern # Web URL
473484
cistern -r git\[at]github.com:nbedos/cistern.git # Git URL
474485
cistern -r github.com/nbedos/cistern # URL without scheme
475-
cistern -r /home/user/repos/repo # Path to a repository
486+
cistern -r /home/user/repos/repo # Path to a repository
476487
477488
# Specify both repository and git reference
478489
cistern -r github.com/nbedos/cistern master

docs/cistern.man.html

Lines changed: 85 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name="generator" content="pandoc" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
77
<meta name="author" content="Nicolas Bedos" />
8-
<title>CISTERN(1) | version 0.2.0dev0-6-gb627dab-dirty-linux-amd64</title>
8+
<title>CISTERN(1) | version 0.2.0dev0-23-g9a477eb-linux-amd64</title>
99
<style>
1010
code{white-space: pre-wrap;}
1111
span.smallcaps{font-variant: small-caps;}
@@ -19,7 +19,7 @@
1919
</head>
2020
<body>
2121
<header id="title-block-header">
22-
<h1 class="title">CISTERN(1) | version 0.2.0dev0-6-gb627dab-dirty-linux-amd64</h1>
22+
<h1 class="title">CISTERN(1) | version 0.2.0dev0-23-g9a477eb-linux-amd64</h1>
2323
<p class="author">Nicolas Bedos</p>
2424
</header>
2525
<h1 id="name">NAME</h1>
@@ -118,6 +118,25 @@ <h2 id="h---help"><code>-h, --help</code></h2>
118118
<p>Show usage of cistern</p>
119119
<h2 id="version"><code>--version</code></h2>
120120
<p>Print the version of cistern being run</p>
121+
<h1 id="columns">COLUMNS</h1>
122+
<h2 id="ref">REF</h2>
123+
<p>Tag or branch associated to the pipeline</p>
124+
<h2 id="pipeline">PIPELINE</h2>
125+
<p>Identifier of the pipeline</p>
126+
<h2 id="type">TYPE</h2>
127+
<p>Either “P” (Pipeline), “S” (Stage), “J” (Job) or “T” (Task)</p>
128+
<h2 id="state">STATE</h2>
129+
<p>State of the pipeline</p>
130+
<h2 id="xfail">XFAIL</h2>
131+
<p>Expected failure. Boolean indicating whether this step is allowed to fail without impacting the overall state of the pipeline</p>
132+
<h2 id="created-started-finished">CREATED, STARTED, FINISHED</h2>
133+
<p>Date when the pipeline was created, started or finished</p>
134+
<h2 id="duration">DURATION</h2>
135+
<p>Time it took for the pipeline to finish</p>
136+
<h2 id="name-1">NAME</h2>
137+
<p>Name of the provider followed by the name of the pipeline, if any</p>
138+
<h2 id="url">URL</h2>
139+
<p>URL of the step on the website of the provider</p>
121140
<h1 id="interactive-commands">INTERACTIVE COMMANDS</h1>
122141
<p>Below are the default commands for interacting with cistern.</p>
123142
<table style="width:82%;">
@@ -141,6 +160,14 @@ <h1 id="interactive-commands">INTERACTIVE COMMANDS</h1>
141160
<td style="text-align: left;">Move cursor down by one line</td>
142161
</tr>
143162
<tr class="odd">
163+
<td style="text-align: left;">Right, l</td>
164+
<td style="text-align: left;">Scroll right</td>
165+
</tr>
166+
<tr class="even">
167+
<td style="text-align: left;">Left, h</td>
168+
<td style="text-align: left;">Scroll left</td>
169+
</tr>
170+
<tr class="odd">
144171
<td style="text-align: left;">Page Up</td>
145172
<td style="text-align: left;">Move cursor up by one screen</td>
146173
</tr>
@@ -149,50 +176,62 @@ <h1 id="interactive-commands">INTERACTIVE COMMANDS</h1>
149176
<td style="text-align: left;">Move cursor down by one screen</td>
150177
</tr>
151178
<tr class="odd">
179+
<td style="text-align: left;">&lt;</td>
180+
<td style="text-align: left;">Move sort column left</td>
181+
</tr>
182+
<tr class="even">
183+
<td style="text-align: left;">&gt;</td>
184+
<td style="text-align: left;">Move sort column right</td>
185+
</tr>
186+
<tr class="odd">
187+
<td style="text-align: left;">!</td>
188+
<td style="text-align: left;">Reverse sort order</td>
189+
</tr>
190+
<tr class="even">
152191
<td style="text-align: left;">o, +</td>
153192
<td style="text-align: left;">Open the fold at the cursor</td>
154193
</tr>
155-
<tr class="even">
194+
<tr class="odd">
156195
<td style="text-align: left;">O</td>
157196
<td style="text-align: left;">Open the fold at the cursor and all sub-folds</td>
158197
</tr>
159-
<tr class="odd">
198+
<tr class="even">
160199
<td style="text-align: left;">c, -</td>
161200
<td style="text-align: left;">Close the fold at the cursor</td>
162201
</tr>
163-
<tr class="even">
202+
<tr class="odd">
164203
<td style="text-align: left;">C</td>
165204
<td style="text-align: left;">Close the fold at the cursor and all sub-folds</td>
166205
</tr>
167-
<tr class="odd">
206+
<tr class="even">
168207
<td style="text-align: left;">/</td>
169208
<td style="text-align: left;">Open search prompt</td>
170209
</tr>
171-
<tr class="even">
210+
<tr class="odd">
172211
<td style="text-align: left;">Escape</td>
173212
<td style="text-align: left;">Close search prompt</td>
174213
</tr>
175-
<tr class="odd">
214+
<tr class="even">
176215
<td style="text-align: left;">Enter, n</td>
177216
<td style="text-align: left;">Move to the next match</td>
178217
</tr>
179-
<tr class="even">
218+
<tr class="odd">
180219
<td style="text-align: left;">N</td>
181220
<td style="text-align: left;">Move to the previous match</td>
182221
</tr>
183-
<tr class="odd">
222+
<tr class="even">
184223
<td style="text-align: left;">v</td>
185224
<td style="text-align: left;">View the log of the job at the cursor<sup>[a]</sup></td>
186225
</tr>
187-
<tr class="even">
226+
<tr class="odd">
188227
<td style="text-align: left;">b</td>
189228
<td style="text-align: left;">Open with default web browser</td>
190229
</tr>
191-
<tr class="odd">
230+
<tr class="even">
192231
<td style="text-align: left;">q</td>
193232
<td style="text-align: left;">Quit</td>
194233
</tr>
195-
<tr class="even">
234+
<tr class="odd">
196235
<td style="text-align: left;">?</td>
197236
<td style="text-align: left;">View manual page</td>
198237
</tr>
@@ -210,86 +249,70 @@ <h2 id="location">Location</h2>
210249
</ol>
211250
<p>If <code>XDG_CONFIG_HOME</code> (resp. <code>XDG_CONFIG_DIRS</code>) is not set, cistern uses the default value <code>"$HOME/.config"</code> (resp. <code>"/etc/xdg"</code>) instead.</p>
212251
<h2 id="format">Format</h2>
213-
<p>cistern uses a configuration file in <a href="https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.5.0.md">TOML version v0.5.0</a> format. The configuration file is made of keys grouped together in tables. The specification of each table is given in the example below.</p>
214-
<h2 id="example">Example</h2>
215-
<p>This example describes and uses all existing configuration options.</p>
252+
<p>cistern uses a configuration file in <a href="https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.5.0.md">TOML version v0.5.0</a> format.</p>
253+
<p>The complete format of the configuration file is described in the example included in the release archives which is also available <a href="https://github.com/nbedos/cistern/blob/master/cmd/cistern/cistern.toml">on GitHub</a></p>
254+
<h2 id="minimal-example">Minimal example</h2>
255+
<p>This is a minimal example of a configuration file focused mostly on setting up credentials. It should be enough to get you started running cistern.</p>
216256
<pre class="toml"><code>#### CISTERN CONFIGURATION FILE ####
217-
# This file is a complete, valid configuration file for cistern
218-
# and should be located at $XDG_CONFIG_HOME/cistern/cistern.toml
219-
#
257+
# This is a configuration file for cistern that should be located at
258+
# $XDG_CONFIG_HOME/cistern/cistern.toml
259+
260+
## GENERIC OPTIONS ##
261+
# List of columns displayed on screen. Available columns are
262+
# &quot;ref&quot;, &quot;pipeline&quot;, &quot;type&quot;, &quot;state&quot;, &quot;created&quot;, &quot;started&quot;,
263+
# &quot;finished&quot;, &quot;duration&quot;, &quot;xfail&quot;, &quot;name&quot;, &quot;url&quot;
264+
columns = [&quot;ref&quot;, &quot;pipeline&quot;, &quot;type&quot;, &quot;state&quot;, &quot;started&quot;, &quot;duration&quot;, &quot;name&quot;, &quot;url&quot;]
265+
266+
# Name of the column used for sorting the table prefixed by an
267+
# optional &quot;+&quot; (ascending order) or &quot;-&quot; (descending order).
268+
sort = &quot;-started&quot;
269+
220270

221271
## PROVIDERS ##
222272
[providers]
223-
# The &#39;providers&#39; table is used to define credentials for
224-
# accessing online services. cistern relies on two types of
225-
# providers:
273+
# The sections below define credentials for accessing source
274+
# providers (GitHub, GitLab) and CI providers (GitLab, Travis,
275+
# AppVeyor, Azure Devops, CircleCI).
226276
#
227-
# - &#39;source providers&#39; are used for listing the CI pipelines
228-
# associated to a given commit (GitHub and GitLab are source
229-
# providers)
230-
# - &#39;CI providers&#39; are used to get detailed information about
231-
# CI pipelines (GitLab, AppVeyor, CircleCI, Travis and Azure
232-
# Devops are CI providers)
233-
#
234-
# cistern requires credentials for at least one source provider and
235-
# one CI provider to run. Feel free to remove sections below
236-
# as long as this rule is met.
237-
#
238-
# Note that for all providers, not setting an API token or
239-
# setting `token = &quot;&quot;` will cause the provider to make
240-
# unauthenticated API requests.
277+
# Feel free to remove any section as long as you leave one
278+
# section for a source provider and one for a CI provider.
279+
#
280+
# When an API token is not set or set to the empty string,
281+
# cistern will still run but with some limitations:
282+
# - GitHub: cistern will hit the rate-limit for
283+
# unauthenticated requests in a few minutes
284+
# - GitLab: cistern will NOT be able to access pipeline
285+
# jobs
241286
#
242287

243288
### GITHUB ###
244289
[[providers.github]]
245290
# GitHub API token (optional, string)
246-
#
247-
# Note: Unauthenticated API requests are heavily rate-limited by
248-
# GitHub (60 requests per hour and per IP address) whereas
249-
# authenticated clients benefit from a rate of 5000 requests per
250-
# hour. Providing an API token is strongly encouraged: without
251-
# one, cistern will likely reach the rate limit in a matter of
252-
# minutes.
253-
#
254291
# GitHub token management: https://github.com/settings/tokens
255292
token = &quot;&quot;
256293

257294

258295
### GITLAB ###
259296
[[providers.gitlab]]
260-
# Name shown by cistern for this provider
261-
# (optional, string, default: &quot;gitlab&quot;)
262-
name = &quot;gitlab&quot;
263-
264-
# GitLab instance URL (optional, string, default: &quot;https://gitlab.com&quot;)
297+
# GitLab instance URL (optional, string, default:
298+
# &quot;https://gitlab.com&quot;)
265299
# (the GitLab instance must support GitLab REST API V4)
266300
url = &quot;https://gitlab.com&quot;
267301

268302
# GitLab API token (optional, string)
269-
#
270-
# Note: GitLab prevents access to pipeline jobs for
271-
# unauthenticated users meaning if you wish to use cistern
272-
# to view GitLab pipelines you will have to provide
273-
# appropriate credentials. This is true even for pipelines
274-
# of public repositories.
275-
#
276303
# gitlab.com token management:
277304
# https://gitlab.com/profile/personal_access_tokens
278305
token = &quot;&quot;
279306

280307

281308
### TRAVIS CI ###
282309
[[providers.travis]]
283-
# Name shown by cistern for this provider
284-
# (optional, string, default: &quot;travis&quot;)
285-
name = &quot;travis&quot;
286-
287310
# URL of the Travis instance. &quot;org&quot; and &quot;com&quot; can be used as
288311
# shorthands for the full URL of travis.org and travis.com
289312
# (string, mandatory)
290313
url = &quot;org&quot;
291314

292-
# API access token for the travis API (string, optional)
315+
# API access token for the travis API (string, optional).
293316
# Travis tokens are managed at:
294317
# - https://travis-ci.org/account/preferences
295318
# - https://travis-ci.com/account/preferences
@@ -298,39 +321,26 @@ <h2 id="example">Example</h2>
298321

299322
# Define another account for accessing travis.com
300323
[[providers.travis]]
301-
name = &quot;travis&quot;
302324
url = &quot;com&quot;
303325
token = &quot;&quot;
304326

305327

306328
### APPVEYOR ###
307329
[[providers.appveyor]]
308-
# Name shown by cistern for this provider
309-
# (optional, string, default: &quot;appveyor&quot;)
310-
name = &quot;appveyor&quot;
311-
312330
# AppVeyor API token (optional, string)
313331
# AppVeyor token managemement: https://ci.appveyor.com/api-keys
314332
token = &quot;&quot;
315333

316334

317335
### CIRCLECI ###
318336
[[providers.circleci]]
319-
# Name shown by cistern for this provider
320-
# (optional, string, default: &quot;circleci&quot;)
321-
name = &quot;circleci&quot;
322-
323337
# Circle CI API token (optional, string)
324338
# See https://circleci.com/account/api
325339
token = &quot;&quot;
326340

327341

328342
### AZURE DEVOPS ###
329343
[[providers.azure]]
330-
# Name shown by cistern for this provider
331-
# (optional, string, default: &quot;azure&quot;)
332-
name = &quot;azure&quot;
333-
334344
# Azure API token (optional, string)
335345
# Azure token management is done at https://dev.azure.com/ via
336346
# the user settings menu
@@ -366,7 +376,7 @@ <h1 id="examples">EXAMPLES</h1>
366376
cistern -r https://gitlab.com/nbedos/cistern # Web URL
367377
cistern -r [email protected]:nbedos/cistern.git # Git URL
368378
cistern -r github.com/nbedos/cistern # URL without scheme
369-
cistern -r /home/user/repos/repo # Path to a repository
379+
cistern -r /home/user/repos/repo # Path to a repository
370380

371381
# Specify both repository and git reference
372382
cistern -r github.com/nbedos/cistern master</code></pre>

man.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,16 @@ Right, l Scroll right
128128

129129
Left, h Scroll left
130130

131+
Page Up Move cursor up by one screen
132+
133+
Page Down Move cursor down by one screen
134+
131135
< Move sort column left
132136

133137
\> Move sort column right
134138

135139
! Reverse sort order
136140

137-
Page Up Move cursor up by one screen
138-
139-
Page Down Move cursor down by one screen
140-
141141
o, + Open the fold at the cursor
142142

143143
O Open the fold at the cursor and all sub-folds

0 commit comments

Comments
 (0)