Skip to content

Commit 0db53f8

Browse files
committed
Documentation: Improve and refactor, accompanying naming things
... and subsystem changes.
1 parent 8a191cf commit 0db53f8

File tree

15 files changed

+328
-202
lines changed

15 files changed

+328
-202
lines changed

CHANGES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
- Goof: Added wrapper around Slack conversations, available per
77
CLI `goof slack send`.
88
- Shell (Reports/Daily+Weekly): Generate daily and weekly reports in
9-
Markdown or YAML formats.
9+
Markdown or YAML formats, available per `rapporto report`.
1010
- Shell (Slack/Weekly): Publish daily reports to Slack, in a per-week
11-
context, with hourly granularity.
11+
context, with hourly granularity, available per `rapporto notify`.
1212

1313
## v0.3.0, 2025-02-24
1414
- Opsgenie: Added alert reporter. Thanks, @WalBah.

docs/guide/github.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,21 @@ token (classic), that permits access to those scopes:
1919

2020
## Usage
2121

22-
### Introduction
22+
### Authentication
2323

2424
Please provide a valid GitHub token. This token is invalid.
2525
```shell
2626
export GH_TOKEN=ghp_600VEZtdzinvalid7K2R86JTiKJAAp1wNwVP
2727
```
2828

29-
Note that many options are optional. Just omit them in order to expand the
30-
search scope.
29+
### Options
30+
31+
The [`--when`](#when-option) command-line option accepts a wide range of
32+
values to adjust the time interval. You can also omit the option completely,
33+
in which case the program will assume the current day or calendar week.
34+
35+
Note that many other options are also optional. Just omit them in order to
36+
expand the search scope.
3137

3238
### Actions report
3339
Report about activities of GitHub Actions workflow runs, mostly failing ones.

docs/guide/index.md

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# User Guide
1+
# Sources
22

3-
Learn how to use Rapporto for acquiring information and reporting.
3+
Use Rapporto for acquiring information from different APIs.
44

55
```{toctree}
66
:maxdepth: 1
@@ -9,7 +9,6 @@ Learn how to use Rapporto for acquiring information and reporting.
99
github
1010
opsgenie
1111
slack
12-
options
1312
```
1413

1514
::::{grid} 3
@@ -48,16 +47,4 @@ Tap into the Opsgenie API and generate reports in Markdown format.
4847
Tap into the Slack API and export threads into Markdown format.
4948
:::
5049

51-
:::{grid-item-card}
52-
:link: options
53-
:link-type: doc
54-
:class-body: sd-text-center sd-fs-3 sd-font-weight-bold
55-
:class-footer: sd-fs-6
56-
Options
57-
58-
{fas}`gears;sd-text-white fa-2xl`
59-
+++
60-
Program options, input and output.
61-
:::
62-
6350
::::

docs/guide/opsgenie.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,32 @@ In order to authenticate with the Opsgenie API, you will need an Opsgenie API ke
1414

1515
## Usage
1616

17+
### Authentication
18+
1719
Either define the authentication token as an environment variable,
1820
```bash
1921
export OPSGENIE_API_KEY="your-api-key"
2022
```
2123
or use the `--api-key` command-line option.
2224

23-
### Alert report
25+
### Options
2426

25-
Generate report about Opsgenie alerts.
27+
The [`--when`](#when-option) command-line option accepts a wide range of
28+
values to adjust the time interval. You can also omit the option completely,
29+
in which case the program will assume the current day or calendar week.
2630

27-
Report about the previous seven days.
28-
```shell
29-
rapporto opsgenie export-alerts --when="-7d"
30-
```
31+
### Alert report
32+
33+
Generate report about Opsgenie alerts in Markdown format.
3134

3235
Report about yesterday.
3336
```shell
3437
rapporto opsgenie export-alerts --when="yesterday"
3538
```
3639

37-
Report about the previous week.
38-
```shell
39-
rapporto opsgenie export-alerts --when="last week"
40-
```
41-
42-
Report about the current week.
40+
Report about the previous seven days.
4341
```shell
44-
rapporto opsgenie export-alerts --when="this week"
42+
rapporto opsgenie export-alerts --when="-7d"
4543
```
4644

4745
Describe the time interval by start time and duration in days.

docs/guide/options.md

Lines changed: 0 additions & 45 deletions
This file was deleted.

docs/guide/slack.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ authentication token with access permissions to the required [OAuth scopes].
2727

2828
## Usage
2929

30+
### Authentication
31+
3032
Either define the authentication token as an environment variable,
3133
```bash
3234
export SLACK_TOKEN='xoxb-your-slack-bot-token'
@@ -37,7 +39,8 @@ or use the `--slack-token` command-line option.
3739

3840
Export Slack conversation thread into Markdown document.
3941
```shell
40-
rapporto slack export https://acme.slack.com/archives/D018V8WDABA/p1738873838427919
42+
rapporto slack export \
43+
"https://acme.slack.com/archives/D018V8WDABA/p1738873838427919"
4144
```
4245

4346

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ in different ways. [DWIM].
1010
1111
install
1212
guide/index
13-
sink/index
1413
report/index
14+
tool/index
1515
project
1616
```
1717

docs/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Installation
1+
# Install
22

33
We recommend to use the [uv] package manager for installing or running Rapporto.
44
```shell

docs/project.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Project Information
1+
# Project
22

33
```{toctree}
44
:maxdepth: 1

docs/report/index.md

Lines changed: 50 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,30 @@
11
# Reports
22

3-
Daily reports and notifications, using a weekly context and a hourly
4-
granularity, fluently converging to Slack conversations, at your disposal.
3+
Produce daily reports and notifications, using a weekly context and an hourly
4+
granularity, fluently converging into Slack conversations, at your disposal.
55

6-
7-
## Usage
6+
## Overview
87

98
The reporting section includes two subsystems. Both produce reports about
109
a given time interval.
1110

12-
:`rapporto report`: Produce reports in Markdown or YAML formats.
11+
:`rapporto report`: Produce reports in Markdown or YAML format.
1312
:`rapporto notify`: Produce reports and submit to Slack conversation.
1413

15-
:::{tip}
16-
In the examples below, you can also omit the `--when` option completely.
17-
In this case, the current day or week will be assumed.
18-
:::
14+
> I am currently producing Markdown with Rapporto, similar to how you would
15+
> use a [static site generator] like a traditional tool in tech-writing,
16+
> for example Docusaurus, Hugo, Jekyll, MkDocs, Sphinx, or [many others].
17+
>
18+
> Contrary to a generator that produces HTML output,
19+
> Rapporto does not render Markdown or reStructuredText into HTML, which
20+
> is then displayed in the browser. Instead, information is acquired from
21+
> API calls, converted into Markdown, then displayed, for example, on Slack.
22+
23+
> Using Rapporto to drive threaded conversations on Slack tries to behave
24+
> like a static site generator, producing idempotent message content, even
25+
> when spanning multiple messages.
26+
27+
## Usage
1928

2029
### Authentication
2130

@@ -31,33 +40,57 @@ export SLACK_TOKEN='xoxb-your-slack-bot-token'
3140
Alternatively to using the environment variable, you can also use the
3241
`rapporto notify --slack-token=` command-line option.
3342

43+
### Options
44+
45+
The [`--when`](#when-option) command-line option accepts a wide range of
46+
values to adjust the time interval. You can also omit the option completely,
47+
in which case the program will assume the current day or calendar week.
3448

35-
## Reports
49+
## Markdown Reports
3650

3751
Report about given day.
3852
```shell
39-
rapporto report --github-organization=acme daily --when=2025-02-28
53+
rapporto report --github-organization="acme" daily --when="2025-02-28"
54+
```
55+
56+
Report about given calendar week.
57+
```shell
58+
rapporto report --github-organization="acme" weekly --when="2025W09"
4059
```
4160

42-
Report about given week.
61+
Print yesterday's report.
4362
```shell
44-
rapporto report --github-organization=acme weekly --when=2025W09
63+
rapporto report --github-organization="acme" daily --when="yesterday"
4564
```
4665

66+
Print today's report in YAML format.
67+
```shell
68+
rapporto report --github-organization="acme" --format="yaml" daily
69+
```
4770

48-
## Conversations
71+
72+
## Slack Conversations
4973

5074
Report and notify about current calendar week.
5175
```shell
52-
rapporto notify --slack-channel="janitor-bot" weekly
76+
rapporto notify --gh-org="acme" --slack-channel="janitor-bot" weekly
5377
```
5478

5579
Report and notify about given calendar week.
5680
```shell
57-
rapporto notify --slack-channel="janitor-bot" weekly --week=2025W09
81+
rapporto notify --gh-org="acme" --slack-channel="janitor-bot" weekly --week="2025W09"
5882
```
5983

6084
For development purposes, zap messages after pressing enter.
6185
```shell
62-
rapporto notify --slack-channel="janitor-bot" weekly --zap=key
86+
rapporto notify --gh-org="acme" --slack-channel="janitor-bot" weekly --zap=key
6387
```
88+
89+
:::{tip}
90+
The command-line option `--gh-org` is a shorthand version of `--github-organization`.
91+
You can use it to save a few keystrokes.
92+
:::
93+
94+
95+
[many others]: https://github.com/myles/awesome-static-generators
96+
[static site generator]: https://en.wikipedia.org/wiki/Static_site_generator

0 commit comments

Comments
 (0)