Skip to content

Commit 822bf4d

Browse files
committed
Restructure content
1 parent 4175c86 commit 822bf4d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1254
-1095
lines changed

content/_index.en.md

Lines changed: 15 additions & 469 deletions
Large diffs are not rendered by default.

content/analysis/_index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: "Analysis"
3+
weight: 2
4+
---
5+

content/analysis/how-to/_index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: How to
3+
weight: 1
4+
---

content/terms/how-to-navigate-history.md renamed to content/analysis/how-to/how-to-navigate-history.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "How to navigate history"
2+
title: Navigate history
33
weight: 1
44
aliases: /navigate-history/
55
---

content/memos/how-to-publish.en.md renamed to content/analysis/how-to/publish.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "How to publish a memo"
2+
title: Publish a memo
33
---
44

55
# How to publish a memo
@@ -10,7 +10,7 @@ No technical skills are required.
1010

1111
## Prerequisites
1212

13-
- A drafted memo compliant with the [copywriting reference]({{< relref "/memos/copywriting-reference" >}}).
13+
- A drafted memo compliant with the [copywriting reference]({{< relref "/analysis/reference/copywriting" >}}).
1414

1515
## 1. Send
1616

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: Reference
3+
weight: 2
4+
---

content/memos/copywriting-reference.en.md renamed to content/analysis/reference/copywriting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Copywriting reference"
2+
title: Copywriting
33
---
44

55
# Copywriting reference

content/api/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
2-
title: API
3-
weight: 4
2+
title: Programmatic access
3+
weight: 8
44
---

content/api/cli.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: CLI
3+
weight: 1
4+
---
5+
6+
# CLI
7+
8+
Once the engine module is installed as a dependency within another module, the `ota` command with the following subcommands is available.
9+
10+
In these commands:
11+
12+
- **`<service_id>`** is the case sensitive name of the service declaration file without the extension. For example, for `Twitter.json`, the service ID is `Twitter`.
13+
- **`<terms_type>`** is the property name used under the `documents` property in the declaration to declare a terms. For example, in the getting started declaration, the terms type declared is `Privacy Policy`.
14+
15+
#### Tracking
16+
17+
{{< configOption name="ota track" type="command" description="Track the current terms of services according to provided declarations. The declarations, snapshots and versions paths are defined in the configuration." example="npx ota track" >}}
18+
19+
> Note that the snapshots and versions will be recorded at the moment the command is executed, on top of the existing local history. If a shared history already exists and the goal is to add on top of it, that history has to be downloaded before executing that command.
20+
21+
{{< configOption name="ota track --help" type="command" description="Show help and available options for track command" example="npx ota track --help" >}}
22+
23+
{{< configOption name="ota track --services" type="command" description="Track terms of specific services only" example="npx ota track --services \"<service_id>\" [\"<service_id>\"...]" >}}
24+
25+
{{< configOption name="ota track --services --types" type="command" description="Track specific terms types of specific services only" example="npx ota track --services \"<service_id>\" [\"<service_id>\"...] --types \"<terms_type>\" [\"<terms_type>\"...]" >}}
26+
27+
{{< configOption name="ota track --schedule" type="command" description="Track terms on a schedule (four times daily)" example="npx ota track --schedule" >}}
28+
29+
#### Validating
30+
31+
{{< configOption name="ota validate" type="command" description="Check that all declarations allow recording a snapshot and a version properly. If service IDs are provided, check only those services." example="npx ota validate [--services <service_id>...] [--types <terms_type>...]" >}}
32+
33+
{{< configOption name="ota validate --schema-only" type="command" description="Check that all declarations are readable by the engine. Allows for a much faster check of declarations, but does not check that the terms are actually accessible." example="npx ota validate --schema-only [--services <service_id>...] [--types <terms_type>...]" >}}
34+
35+
{{< configOption name="ota validate --modified" type="command" description="Run ota validate only on files that have been modified in Git" example="npx ota validate --modified" >}}
36+
37+
#### Linting
38+
39+
{{< configOption name="ota lint" type="command" description="Test the format of declarations' normalisation. Use --fix to automatically correct formatting mistakes and ensure that all declarations are standardised." example="npx ota lint [--services <service_id>...] [--fix] [--modified]" >}}
40+
41+
#### Dataset publishing
42+
43+
{{< configOption name="ota dataset" type="command" description="Export the versions dataset into a ZIP file and publish it to GitHub releases. The dataset title and the URL of the versions repository are defined in the configuration." example="npx ota dataset [--file <filename>]" >}}
44+
45+
To export the dataset into a ZIP file and publish it on GitHub releases:
46+
47+
{{< configOption name="ota dataset --publish" type="command" description="Export and publish dataset to GitHub releases" example="GITHUB_TOKEN=ghp_XXXXXXXXX npx ota dataset --publish" >}}
48+
49+
The `GITHUB_TOKEN` can also be defined in a [`.env` file](#environment-variables).
50+
51+
To export, publish the dataset and remove the local copy that was created after it has been uploaded:
52+
53+
{{< configOption name="ota dataset --publish --remove-local-copy" type="command" description="Export, publish dataset and remove local copy after upload" example="GITHUB_TOKEN=ghp_XXXXXXXXX npx ota dataset --publish --remove-local-copy" >}}
54+
55+
{{< configOption name="ota dataset --schedule" type="command" description="Schedule export, publishing and local copy removal" example="GITHUB_TOKEN=ghp_XXXXXXXXX npx ota dataset --schedule --publish --remove-local-copy" >}}
56+
57+
#### Exposing the collection API
58+
59+
{{< configOption name="ota serve" type="command" description="Start the collection Web API server. The Web API will be available under http://localhost:<port>/<basePath>/<apiVersion>/<resource>. The server port and basePath are defined in the configuration." example="npx ota serve" >}}
60+
61+
> For example, with the default configuration, the list of services can be found at [`http://localhost:3000/api/v1/services`](http://localhost:3000/api/v1/services).

content/api/collection.en.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: Collection
2+
title: Collection REST API
33
weight: 2
44
---
55

6-
# Collection Web API [Beta]
6+
# Collection Web API
77

88
As Open Terms Archive is decentralised, each instance embarks its own API. The documentation relevant to the specific version of the engine on that instance is provided on that instance itself.
99

0 commit comments

Comments
 (0)