GeezerVison is showing github.com — Mermaid-based Example State Diagrams (#3090) · MSutt/python-telegram-bot@76bfe8c
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: AUTHORS.rst +1Lines changed: 1 addition & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -29,6 +29,7 @@ The following wonderful people contributed directly or indirectly to this projec | 29 | 29 | - `Balduro <https://github.com/Balduro>`_ | 30 | 30 | - `Bibo-Joshi <https://github.com/Bibo-Joshi>`_ | 31 | 31 | - `bimmlerd <https://github.com/bimmlerd>`_ | | 32 | +- `cyc8 <https://github.com/cyc8>`_ | 32 | 33 | - `d-qoi <https://github.com/d-qoi>`_ | 33 | 34 | - `daimajia <https://github.com/daimajia>`_ | 34 | 35 | - `Daniel Reed <https://github.com/nmlorg>`_ | |
Collapse file Copy file name to clipboard +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | sphinx==5.0.1 | 2 | 2 | sphinx-pypi-upload | 3 | 3 | furo==2022.6.4.1 | 4 | | -sphinx-paramlinks==0.5.4 | | 4 | +sphinx-paramlinks==0.5.4 | | 5 | +sphinxcontrib-mermaid==0.7.1 |
Collapse file Copy file name to clipboard +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +.mermaid svg { | | 2 | + height: auto; | | 3 | +} |
Collapse file Copy file name to clipboardExpand all lines: docs/source/conf.py +5-1Lines changed: 5 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 45 | 45 | "sphinx.ext.intersphinx", | 46 | 46 | "sphinx.ext.linkcode", | 47 | 47 | "sphinx_paramlinks", | | 48 | + "sphinxcontrib.mermaid", | 48 | 49 | ] | 49 | 50 |
| 50 | 51 | # Use intersphinx to reference the python builtin library docs | | 211 | 212 | # relative to this directory. They are copied after the builtin static files, | 212 | 213 | # so a file named "default.css" will overwrite the builtin "default.css". | 213 | 214 | html_static_path = ["_static"] | 214 | | -html_css_files = ["style_external_link.css"] | | 215 | +html_css_files = [ | | 216 | + "style_external_link.css", | | 217 | + "style_mermaid_diagrams.css", | | 218 | +] | 215 | 219 | html_permalinks_icon = "¶" # Furo's default permalink icon is `#`` which doesn't look great imo. | 216 | 220 |
| 217 | 221 | # Output file base name for HTML help builder. | |
Collapse file Copy file name to clipboardExpand all lines: docs/source/examples.conversationbot.rst +1-2Lines changed: 1 addition & 2 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| 10 | 10 | State Diagram | 11 | 11 | ------------- | 12 | 12 |
| 13 | | -.. image:: ../../examples/conversationbot.png | 14 | | - | | 13 | +.. mermaid:: ../../examples/conversationbot.mmd |
Collapse file Copy file name to clipboardExpand all lines: docs/source/examples.conversationbot2.rst +1-2Lines changed: 1 addition & 2 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| 10 | 10 | State Diagram | 11 | 11 | ------------- | 12 | 12 |
| 13 | | -.. image:: ../../examples/conversationbot2.png | 14 | | - | | 13 | +.. mermaid:: ../../examples/conversationbot2.mmd |
Collapse file Copy file name to clipboardExpand all lines: docs/source/examples.nestedconversationbot.rst +1-2Lines changed: 1 addition & 2 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| 10 | 10 | State Diagram | 11 | 11 | ------------- | 12 | 12 |
| 13 | | -.. image:: ../../examples/nestedconversationbot.png | 14 | | - | | 13 | +.. mermaid:: ../../examples/nestedconversationbot.mmd |
Collapse file Copy file name to clipboard +21Lines changed: 21 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +flowchart TB | | 2 | + %% Documentation: https://mermaid-js.github.io/mermaid/#/flowchart | | 3 | + A(("/start")):::entryPoint -->|Hi! My name is Professor Bot...| B((GENDER)):::state | | 4 | + B --> |"- Boy <br /> - Girl <br /> - Other"|C("(choice)"):::userInput | | 5 | + C --> |I see! Please send me a photo...| D((PHOTO)):::state | | 6 | + D --> E("/skip"):::userInput | | 7 | + D --> F("(photo)"):::userInput | | 8 | + E --> |I bet you look great!| G[\ /]:::userInput | | 9 | + F --> |Gorgeous!| G[\ /] | | 10 | + G --> |"Now, send me your location .."| H((LOCATION)):::state | | 11 | + H --> I("/skip"):::userInput | | 12 | + H --> J("(location)"):::userInput | | 13 | + I --> |You seem a bit paranoid!| K[\" "/]:::userInput | | 14 | + J --> |Maybe I can visit...| K | | 15 | + K --> |"Tell me about yourself..."| L(("BIO")):::state | | 16 | + L --> M("(text)"):::userInput | | 17 | + M --> |"Thanks and bye!"| End(("END")):::termination | | 18 | + classDef userInput fill:#2a5279, color:#ffffff, stroke:#ffffff | | 19 | + classDef state fill:#222222, color:#ffffff, stroke:#ffffff | | 20 | + classDef entryPoint fill:#009c11, stroke:#42FF57, color:#ffffff | | 21 | + classDef termination fill:#bb0007, stroke:#E60109, color:#ffffff |
Collapse file Copy file name to clipboard Collapse file Copy file name to clipboard +17Lines changed: 17 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +flowchart TB | | 2 | + %% Documentation: https://mermaid-js.github.io/mermaid/#/flowchart | | 3 | + A(("/start")):::entryPoint -->|Hi! My name is Doctor Botter...| B((CHOOSING)):::state | | 4 | + B --> C("Something else..."):::userInput | | 5 | + C --> |What category?| D((TYPING_CHOICE)):::state | | 6 | + D --> E("(text)"):::userInput | | 7 | + E --> |"[save choice] <br /> I'd love to hear about that!"| F((TYPING_REPLY)):::state | | 8 | + F --> G("(text)"):::userInput | | 9 | + G --> |"[save choice: text] <br /> Neat! <br /> (List of facts) <br /> More?"| B | | 10 | + B --> H("- Age <br /> - Favourite colour <br /> - Number of siblings"):::userInput | | 11 | + H --> |"[save choice] <br /> I'd love to hear about that!"| F | | 12 | + B --> I("Done"):::userInput | | 13 | + I --> |"I learned these facts about you: <br /> ..."| End(("END")):::termination | | 14 | + classDef userInput fill:#2a5279, color:#ffffff, stroke:#ffffff | | 15 | + classDef state fill:#222222, color:#ffffff, stroke:#ffffff | | 16 | + classDef entryPoint fill:#009c11, stroke:#42FF57, color:#ffffff | | 17 | + classDef termination fill:#bb0007, stroke:#E60109, color:#ffffff |
|