t-doc-common 0.4.dev1__tar.gz → 0.6.dev1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/.gitignore +4 -5
  2. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/.hgignore +2 -3
  3. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/.hgtags +2 -0
  4. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/PKG-INFO +1 -1
  5. t_doc_common-0.6.dev1/docs/demo/index.md +11 -0
  6. t_doc_common-0.6.dev1/docs/demo/people.sql +11 -0
  7. t_doc_common-0.6.dev1/docs/demo/sql.md +113 -0
  8. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/docs/development.md +48 -0
  9. t_doc_common-0.6.dev1/docs/edit.md +106 -0
  10. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/docs/index.md +2 -0
  11. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/docs/install.md +70 -4
  12. t_doc_common-0.6.dev1/package-lock.json +724 -0
  13. t_doc_common-0.6.dev1/package.json +20 -0
  14. t_doc_common-0.6.dev1/rollup.config.mjs +12 -0
  15. t_doc_common-0.6.dev1/serve.bat +2 -0
  16. t_doc_common-0.6.dev1/serve.desktop +10 -0
  17. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/tdoc/common/__init__.py +63 -7
  18. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/tdoc/common/cli.py +1 -0
  19. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/tdoc/common/defaults.py +7 -0
  20. t_doc_common-0.6.dev1/tdoc/common/js/tdoc-editor.js +13 -0
  21. t_doc_common-0.6.dev1/tdoc/common/static/index-V0s6yBBB.js +2553 -0
  22. t_doc_common-0.6.dev1/tdoc/common/static/styles/t-doc.css +100 -0
  23. t_doc_common-0.6.dev1/tdoc/common/static/tdoc-editor-Drz9o1PJ.js +24716 -0
  24. t_doc_common-0.6.dev1/tdoc/common/static/tdoc-editor.bundle.js +27098 -0
  25. t_doc_common-0.6.dev1/tdoc/common/static/tdoc-editor.js +1 -0
  26. t_doc_common-0.6.dev1/tdoc/common/static/tdoc-sql.js +174 -0
  27. t_doc_common-0.4.dev1/tdoc/common/common.mk +0 -52
  28. t_doc_common-0.4.dev1/tdoc/common/static/styles/t-doc.css +0 -22
  29. t_doc_common-0.4.dev1/tdoc/common/static/tdoc-sql.js +0 -141
  30. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/.github/workflows/deploy-github-pages.yml +0 -0
  31. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/.github/workflows/publish.yml +0 -0
  32. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/.gitmodules +0 -0
  33. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/.hgsub +0 -0
  34. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/.hgsubstate +0 -0
  35. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/LICENSE.txt +0 -0
  36. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/README.md +0 -0
  37. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/docs/conf.py +0 -0
  38. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/.gitignore +0 -0
  39. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/.prettierrc +0 -0
  40. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/README.md +0 -0
  41. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/bin/index.js +0 -0
  42. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/demo/index.html +0 -0
  43. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/demo/main-thread.js +0 -0
  44. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/demo/module-workers-polyfill.min.js +0 -0
  45. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/demo/script.js +0 -0
  46. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/demo/worker.js +0 -0
  47. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/demo/wrapped-worker.js +0 -0
  48. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/index.d.ts +0 -0
  49. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/index.mjs +0 -0
  50. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/package-lock.json +0 -0
  51. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/package.json +0 -0
  52. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/sqlite-wasm/jswasm/sqlite3-bundler-friendly.mjs +0 -0
  53. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/sqlite-wasm/jswasm/sqlite3-node.mjs +0 -0
  54. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/sqlite-wasm/jswasm/sqlite3-opfs-async-proxy.js +0 -0
  55. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/sqlite-wasm/jswasm/sqlite3-worker1-bundler-friendly.mjs +0 -0
  56. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/sqlite-wasm/jswasm/sqlite3-worker1-promiser.js +0 -0
  57. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/sqlite-wasm/jswasm/sqlite3-worker1-promiser.mjs +0 -0
  58. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/sqlite-wasm/jswasm/sqlite3-worker1.js +0 -0
  59. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/sqlite-wasm/jswasm/sqlite3.js +0 -0
  60. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/sqlite-wasm/jswasm/sqlite3.mjs +0 -0
  61. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/ext/sqlite-wasm/sqlite-wasm/jswasm/sqlite3.wasm +0 -0
  62. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/pyproject.toml +0 -0
  63. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/tdoc/common/components/copyright.html +0 -0
  64. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/tdoc/common/theme.toml +1 -1
  65. {t_doc_common-0.4.dev1 → t_doc_common-0.6.dev1}/tdoc/common/util.py +0 -0
@@ -3,10 +3,9 @@
3
3
  # SPDX-License-Identifier: MIT
4
4
 
5
5
  *.orig
6
- *.sqlite3
7
6
  __pycache__
8
7
 
9
- build/
10
- dist/
11
- tmp/
12
- *.egg-info/
8
+ /_build/
9
+ /dist/
10
+ /node_modules/
11
+ /tmp/
@@ -4,11 +4,10 @@
4
4
 
5
5
  syntax: glob
6
6
  *.orig
7
- *.sqlite3
8
7
  __pycache__
9
8
 
10
9
  syntax: regexp
11
- ^build/
10
+ ^_build/
12
11
  ^dist/
12
+ ^node_modules/
13
13
  ^tmp/
14
- ^[^/]+\.egg-info/
@@ -1,2 +1,4 @@
1
1
  267a6c8ad66dde08f2b75d2d82d0d2985ca8f137 0.2
2
2
  ea2973414a3779c7ffbed73279ab8d811c795268 0.3
3
+ dcb01efb897d0e04063b92998c17b02b587761c7 0.4
4
+ e4ac6c10dd9194ff48c95d82e462e45bbd651ef1 0.5
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: t-doc-common
3
- Version: 0.4.dev1
3
+ Version: 0.6.dev1
4
4
  Summary: Common functionality for t-doc
5
5
  Project-URL: Code, https://github.com/t-docs/common
6
6
  Project-URL: Documentation, https://t-doc.org/common/
@@ -0,0 +1,11 @@
1
+ <!-- Copyright 2024 Caroline Blank <caro@c-space.org> -->
2
+ <!-- Copyright 2024 Remy Blank <remy@c-space.org> -->
3
+ <!-- SPDX-License-Identifier: MIT -->
4
+
5
+ # Demo
6
+
7
+ ```{toctree}
8
+ :maxdepth: 1
9
+
10
+ sql
11
+ ```
@@ -0,0 +1,11 @@
1
+ create table people (
2
+ first_name text not null,
3
+ last_name text not null,
4
+ height real,
5
+ favorite_food text
6
+ );
7
+ insert into people values
8
+ ('Joe', 'Bar', 1.83, null),
9
+ ('Jack', 'Smith', 1.55, 'burgers'),
10
+ ('Jim', 'Davis', null, 'pizza'),
11
+ ('Anthony', 'Miller', 1.78, null);
@@ -0,0 +1,113 @@
1
+ <!-- Copyright 2024 Caroline Blank <caro@c-space.org> -->
2
+ <!-- Copyright 2024 Remy Blank <remy@c-space.org> -->
3
+ <!-- SPDX-License-Identifier: MIT -->
4
+
5
+ # SQL
6
+
7
+ The `{exec} sql` block allows executing SQL directly in the browser. Each block
8
+ is executed in a new, empty database.
9
+
10
+ ## Directive
11
+
12
+ ````{rst:directive} .. {exec}:: language (sql)
13
+ This directive is a `{code-block}` that allows executing the code directly in
14
+ the browser. It supports all the options of `{code-block}`, and a few more
15
+ described below.
16
+
17
+ {.rubric}
18
+ Options
19
+ ```{rst:directive:option} after: name
20
+ :type: text
21
+ References an `{exec}` block to be executed before this block, in the same
22
+ environment. The referenced block can itself have an `:after:` option, forming
23
+ a chain of blocks to execute in the environment.
24
+ ```
25
+ ```{rst:directive:option} when: value
26
+ :type: click | load | never
27
+ Determines when the block's code is executed: on a click by the user (`click`),
28
+ when the page loads (`load`) or not at all (`never`).
29
+ ```
30
+ ````
31
+
32
+ ## Database definition
33
+
34
+ A database can be defined as a named `{exec} sql` block, to be referenced in the
35
+ `:after:` option of other blocks.
36
+
37
+ ```{exec} sql
38
+ :name: sql-countries
39
+ :when: never
40
+ create table countries (
41
+ country text not null,
42
+ country_code text not null,
43
+ dial_code text not null,
44
+ capital text not null,
45
+ population int not null,
46
+ food text
47
+ );
48
+ insert into countries values
49
+ ('Switzerland', 'CH', '+41', 'Bern', 8776000, 'fondue!'),
50
+ ('France', 'FR', '+33', 'Paris', 67970000, null),
51
+ ('Germany', 'DE', '+49', 'Berlin', 83800000, null),
52
+ ('Italy', 'IT', '+39', 'Rome', 58940000, null),
53
+ ('Austria', 'AT', '+43', 'Vienna', 9042000, 'Kaiserschmarrn'),
54
+ ('Lichtenstein', 'LI', '+423', 'Vaduz', 39327, null);
55
+ ```
56
+
57
+ ## Queries
58
+
59
+ The results of the first `select` statement in an `{exec} sql` block are
60
+ displayed as a table.
61
+
62
+ ```{exec} sql
63
+ :after: sql-countries
64
+ :when: load
65
+ select * from countries;
66
+ ```
67
+
68
+ The SQL code can be hidden by adding `:class: hidden`.
69
+
70
+ ```{exec} sql
71
+ :after: sql-countries
72
+ :when: load
73
+ :class: hidden
74
+ select * from countries where country_code = 'CH';
75
+ ```
76
+
77
+ ### Empty results
78
+
79
+ ```{exec} sql
80
+ :after: sql-countries
81
+ :when: load
82
+ select * from countries where false;
83
+ ```
84
+
85
+ ## Mutations
86
+
87
+ ```{exec} sql
88
+ :after: sql-countries
89
+ :when: load
90
+ update countries set food = 'baguette' where country_code = 'FR';
91
+ select * from countries where country_code = 'FR';
92
+ ```
93
+
94
+ ## SQL errors
95
+
96
+ ```{exec} sql
97
+ :when: load
98
+ select * from unknown_table;
99
+ ```
100
+
101
+ ## Execution trigger
102
+
103
+ By default, `{exec} sql` blocks are executed on click (`:when: click`), with
104
+ controls displayed next to the block.
105
+
106
+ ```{exec} sql
107
+ :after: sql-countries
108
+ select * from countries where country_code = 'LI';
109
+ ```
110
+
111
+ They can also be executed immediately on load (`:when: load`) or not at all
112
+ (`:when: never`, useful for database definitions that are referenced by other
113
+ blocks). In these cases, no controls aren displayed.
@@ -4,45 +4,93 @@
4
4
 
5
5
  # Development
6
6
 
7
+ This page describes how to set up t-doc for development. It isn't necessary for
8
+ creating and editing documents.
9
+
7
10
  ## Install
8
11
 
9
12
  - Install the [required packages](install.md#requirements) for your system.
10
13
 
11
14
  - Clone the `t-doc/common` repository (substitute `USER` with your username).
15
+
12
16
  ```{code-block} shell-session
13
17
  hg clone https://USER@c-space.net/rc/hg/t-doc/common
14
18
  cd common
15
19
  ```
16
20
 
17
21
  - Enable git subrepositories.
22
+
18
23
  ```{code-block} shell-session
19
24
  echo -e '[subrepos]\ngit:allowed = true\n' >> .hg/hgrc
20
25
  ```
21
26
 
22
27
  - Checkout the subrepositories and activate the `main` bookmark.
28
+
23
29
  ```{code-block} shell-session
24
30
  hg checkout main
25
31
  ```
26
32
 
27
33
  - Install the `t-doc-common` package from editable sources.
34
+
35
+ `````{tab-set}
36
+ :sync-group: platform
37
+ ````{tab-item} Windows
38
+ :sync: windows
39
+ ```{code-block} shell-session
40
+ python -m pip install --editable .
41
+ ```
42
+ ````
43
+ ````{tab-item} macOS
44
+ :sync: macos
45
+ ```{code-block} shell-session
46
+ python -m pip install --user --editable .
47
+ ```
48
+ You may have to add `$HOME/.local/bin` to your `PATH`.
49
+ ````
50
+ ````{tab-item} Linux
51
+ :sync: linux
28
52
  ```{code-block} shell-session
29
53
  python -m pip install --user --editable .
30
54
  ```
55
+ You may have to add `$HOME/.local/bin` to your `PATH`.
56
+ ````
57
+ `````
31
58
 
32
59
  ## Upgrade
33
60
 
34
61
  - Pull missing changesets from the `t-doc/common` repository.
62
+
35
63
  ```{code-block} shell-session
36
64
  cd common
37
65
  hg pull
38
66
  ```
39
67
 
40
68
  - Update to the branch head.
69
+
41
70
  ```{code-block} shell-session
42
71
  hg update --check
43
72
  ```
44
73
 
45
74
  - Upgrade the `t-doc-common` package metadata and any out-of-date dependencies.
75
+
76
+ `````{tab-set}
77
+ :sync-group: platform
78
+ ````{tab-item} Windows
79
+ :sync: windows
80
+ ```{code-block} shell-session
81
+ python -m pip install --upgrade --editable .
82
+ ```
83
+ ````
84
+ ````{tab-item} macOS
85
+ :sync: macos
86
+ ```{code-block} shell-session
87
+ python -m pip install --user --upgrade --editable .
88
+ ```
89
+ ````
90
+ ````{tab-item} Linux
91
+ :sync: linux
46
92
  ```{code-block} shell-session
47
93
  python -m pip install --user --upgrade --editable .
48
94
  ```
95
+ ````
96
+ `````
@@ -0,0 +1,106 @@
1
+ <!-- Copyright 2024 Caroline Blank <caro@c-space.org> -->
2
+ <!-- Copyright 2024 Remy Blank <remy@c-space.org> -->
3
+ <!-- SPDX-License-Identifier: MIT -->
4
+
5
+ # Create & edit documents
6
+
7
+ ## Check out a repository
8
+
9
+ Documents are grouped into **repositories**, which represent the unit of
10
+ deployment. Each document repository is tracked as a Mercurial repository. A
11
+ repository can be checked out with (substitute `USER` with your username, and
12
+ `REPO` with the name of the repository):
13
+
14
+ ```{code-block} shell-session
15
+ hg checkout https://USER@c-space.net/rc/hg/t-doc/REPO
16
+ ```
17
+
18
+ The typical structure of a document repository is shown below. The source files
19
+ are located below the `docs` directory.
20
+
21
+ ```{code-block}
22
+ :class: line-height-normal
23
+ ├── .github
24
+ │ └── workflows
25
+ │ └── publish.yml A workflow to publish the repository
26
+ ├── docs
27
+ │ ├── conf.py The Sphinx configuration
28
+ │ ├── index.md The main index page
29
+ │ └── ... The source documents
30
+ ├── .gitignore
31
+ ├── .hgignore
32
+ ├── LICENSE.txt
33
+ ├── README.md
34
+ ├── serve.bat A script to run the local server on Windows
35
+ └── serve.desktop A desktop entry to run the local server on Linux
36
+ ```
37
+
38
+ ## Edit documents
39
+
40
+ - **Run the local server.**
41
+
42
+ `````{tab-set}
43
+ :sync-group: platform
44
+ ````{tab-item} Windows
45
+ :sync: windows
46
+ Double-click the file `serve.bat` in the repository directory.
47
+ ````
48
+ ````{tab-item} macOS
49
+ :sync: macos
50
+ Open a terminal, change to the repository directory, and run:
51
+ ```{code-block} shell-session
52
+ tdoc serve
53
+ ```
54
+ ````
55
+ ````{tab-item} Linux
56
+ :sync: linux
57
+ Double-click the file `serve.desktop` in the repository directory.
58
+
59
+ Alternatively, open a terminal, change to the repository directory, and run:
60
+ ```{code-block} shell-session
61
+ tdoc serve
62
+ ```
63
+ ````
64
+ `````
65
+
66
+ The server renders the source files into HTML, and serves the result over
67
+ HTTP.
68
+
69
+ ```{code-block} text
70
+ Running Sphinx v8.0.2
71
+ loading translations [fr]... done
72
+ making output directory... done
73
+ (...)
74
+ build succeeded.
75
+
76
+ The HTML pages are in _build\serve-1724331687766143000\html.
77
+ Serving at <http://[::1]:8000/>
78
+ ```
79
+
80
+ - **Navigate** to [http://localhost:8000/](http://localhost:8000/) to view the
81
+ generated pages.
82
+
83
+ - **Create and edit documents** in the `docs` directory. This can be done with
84
+ any plain text editor. The local server watches the source files and
85
+ **automatically rebulids the HTML when a file changes**. Reload the page in
86
+ the browser to view the updated output. If a build fails, the errors can be
87
+ found in the terminal.
88
+
89
+ - **Stop the local server** with {kbd}`Ctrl+C` in the terminal, or by closing
90
+ the terminal window.
91
+
92
+ - Don't forget to **commit changes frequently**.
93
+
94
+ ## Deploy documents
95
+
96
+ To deploy the repository to `tdoc.org`, make sure that all changes have been
97
+ committed (and that new files have been added with Mercurial), then push the
98
+ changes to the server.
99
+
100
+ ```{code-block} shell-session
101
+ hg push
102
+ ```
103
+
104
+ The changes should be live at `https://t-doc.org/REPO` within a few minutes. If
105
+ the build fails, GitHub will send you an email notification. It contains a link
106
+ to the build log, which should allow figuring out what went wrong.
@@ -10,5 +10,7 @@ This documentation describes how to install and use t-doc.
10
10
  :maxdepth: 1
11
11
 
12
12
  install
13
+ edit
13
14
  development
15
+ demo/index
14
16
  ```
@@ -15,34 +15,60 @@ t-doc requires the following software to be installed:
15
15
  ### Windows
16
16
 
17
17
  - Install [Python](https://www.python.org/).
18
+
18
19
  ```{code-block} shell-session
19
20
  winget install --id Python.Python.3.12
20
21
  ```
21
22
 
23
+ - Check that Python can be launched from the command-line, by running:
24
+
25
+ ```{code-block} shell-session
26
+ python
27
+ ```
28
+
29
+ If this opens the Microsoft Store, open Windows settings, search for "App
30
+ execution aliases", and disable the "App Installer" entries for `python.exe`
31
+ and `python3.exe`.
32
+
22
33
  - Install [Graphviz](https://graphviz.org/). The installer must be run
23
34
  interactively and the **"Add Graphviz to the system PATH for all users"**
24
35
  option must be enabled.
36
+
25
37
  ```{code-block} shell-session
26
38
  winget install --id Graphviz.Graphviz --interactive
27
39
  ```
28
40
 
29
41
  - Install [TortoiseHg](https://tortoisehg.bitbucket.io/).
42
+
30
43
  ```{code-block} shell-session
31
44
  winget install --id TortoiseHg.TortoiseHg
32
45
  ```
33
46
 
34
- ```{admonition} TODO
35
- TODO: Describe how to update .hgrc to configure the name and email address.
36
- ```
47
+ - Open the TortoiseHg settings, go to your user's global settings, then click
48
+ "Edit file" and add the following to the configuration (substitute `FIRST`
49
+ and `LAST` with your first and last name, and `EMAIL` with your email
50
+ address, e.g. `Joe Smith <joe@example.com>`):
51
+
52
+ ```ini
53
+ [ui]
54
+ username = FIRST LAST <EMAIL>
55
+ ```
37
56
 
38
57
  - (Optional, Windows 10) Install
39
58
  [Windows Terminal](https://github.com/microsoft/terminal) (it's already
40
59
  installed on Windows 11 and later).
60
+
41
61
  ```{code-block} shell-session
42
62
  winget install --id Microsoft.WindowsTerminal
43
63
  ```
44
64
 
45
- ### Linux, macOS
65
+ ### macOS
66
+
67
+ - Install [Python](https://www.python.org/), [Graphviz](https://graphviz.org/)
68
+ and [Mercurial](https://www.mercurial-scm.org/) either by hand or through a
69
+ package manager like [Homebrew](https://brew.sh/).
70
+
71
+ ### Linux
46
72
 
47
73
  - Install [Python](https://www.python.org/), [Graphviz](https://graphviz.org/)
48
74
  and [Mercurial](https://www.mercurial-scm.org/) through your system's package
@@ -53,13 +79,53 @@ t-doc requires the following software to be installed:
53
79
  - Install the [required packages](#requirements).
54
80
 
55
81
  - Install the `t-doc-common` package.
82
+
83
+ `````{tab-set}
84
+ :sync-group: platform
85
+ ````{tab-item} Windows
86
+ :sync: windows
87
+ ```{code-block} shell-session
88
+ python -m pip install t-doc-common
89
+ ```
90
+ ````
91
+ ````{tab-item} macOS
92
+ :sync: macos
93
+ ```{code-block} shell-session
94
+ python -m pip install --user t-doc-common
95
+ ```
96
+ You may have to add `$HOME/.local/bin` to your `PATH`.
97
+ ````
98
+ ````{tab-item} Linux
99
+ :sync: linux
56
100
  ```{code-block} shell-session
57
101
  python -m pip install --user t-doc-common
58
102
  ```
103
+ You may have to add `$HOME/.local/bin` to your `PATH`.
104
+ ````
105
+ `````
59
106
 
60
107
  ## Upgrade
61
108
 
62
109
  - Upgrade the `t-doc-common` package and any out-of-date dependencies.
110
+
111
+ `````{tab-set}
112
+ :sync-group: platform
113
+ ````{tab-item} Windows
114
+ :sync: windows
115
+ ```{code-block} shell-session
116
+ python -m pip install --upgrade t-doc-common
117
+ ```
118
+ ````
119
+ ````{tab-item} macOS
120
+ :sync: macos
121
+ ```{code-block} shell-session
122
+ python -m pip install --user --upgrade t-doc-common
123
+ ```
124
+ ````
125
+ ````{tab-item} Linux
126
+ :sync: linux
63
127
  ```{code-block} shell-session
64
128
  python -m pip install --user --upgrade t-doc-common
65
129
  ```
130
+ ````
131
+ `````