Skip to content

Commit

Permalink
Added autobuild, copybutton and updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dsbaars committed May 12, 2022
1 parent 00714eb commit 92f40ee
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 54 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ help:
gettext3:
@$(SPHINXBUILD) -b gettext "$(SOURCEDIR)" "$(BUILDDIR)/gettext"

livehtml:
sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
myst-parser==0.17.2
sphinx-intl==2.0.1
sphinx-rtd-theme==1.0.0
sphinx-copybutton==0.5.0
21 changes: 21 additions & 0 deletions source/_static/ringtools.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
button.copybtn {
opacity: 1;
}

table {
width: 100%;
}

.rst-content table.docutils td {
vertical-align: top;
}

.rst-content table.docutils tbody tr td:first-child {
position: relative;
width: 50%;

}

.rst-content table.docutils tbody tr td:last-child p {
white-space: break-spaces;
}
14 changes: 11 additions & 3 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# -- Project information -----------------------------------------------------

project = 'RingTools'
copyright = '2021-2022 Djuri Baars'
copyright = '2021-2022 RingTools'
author = 'Djuri Baars'


Expand All @@ -31,7 +31,8 @@
# ones.
extensions = [
'sphinx_rtd_theme',
"myst_parser",
'myst_parser',
'sphinx_copybutton'
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -74,5 +75,12 @@
}

html_static_path = ['_static']
html_css_files = ["ringtools.css"]

locale_dirs = ['locales/']
locale_dirs = ['locales/']

# copybutton_prompt_text = r"/[A-Za-z]*"
# copybutton_prompt_is_regexp = True

copybutton_only_copy_prompt_lines = False
copybutton_selector = "div.highlight pre, tbody tr td:first-child p"
2 changes: 2 additions & 0 deletions source/tg/admins.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
The ring wizard automates the channel setup, just use `/start_ring_wizard` and follow the steps. Make sure you set all necessary permissions correctly.

<center>

![Required admin permissions](/screenshots/admin-permissions-small.png)

</center>

## Manually set up Telegram channel
Expand Down
4 changes: 4 additions & 0 deletions source/tg/convenience.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@ All convenience features are optional to use. The bot will not announce your reg
You can say `/set_country [2-letter country code]` in a DM to [@ringtools_bot](https://t.me/ringtools_bot), so you don't have type this every time you join a ring.

<center>

![Set country](/screenshots/setcountry.png)

</center>

## Show flag in participation list

After setting your country in a DM with [@ringtools_bot](https://t.me/ringtools_bot) you can show the country you are from in the participation lists, you can enable visibility with `/country_visible`. Saying it again will toggle it off again.

<center>

![Country visibility](/screenshots/country_consent.png)

![Flag in participation system](/screenshots/pollcountries.jpg)

</center>


Expand Down
106 changes: 55 additions & 51 deletions source/tg/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,64 +3,68 @@
The RingTools Telegram-bot is currently main supporting the Satoshi Radio / Connect the World Rings of Fire and therefore mainly suited as support for the process they are using. It is still is early development so commands might change.

## Public commands
````text
/ping - Check if I'm alive.
/donate [Sats] [Message] - Donate to Ringtools-Web Development
/fullnodeaddress [PubKey] - Get full address of lightning node
/nodeinfo [PubKey] - Get Lightning node info
/chaninfo [ChannelID] - Get Lightning channel info
/set_country [CountryCode] - Set your country to #connect_the_world (e.g. NL or US)
/add_node - Register node (see convience features)
/country_visible - Make country visible in ring participation polls.
````
| Command | Description |
| --- | --- |
| /ping | Check if I'm alive. |
| /set_language [lang] | Change language of the bot (en, es, de, nl) |
| /fullnodeaddress [PubKey] | Get full address of lightning node |
| /nodeinfo [PubKey] | Get Lightning node info |
| /chaninfo [ChannelID] | Get Lightning channel info |
| /set_country [CountryCode] | Set your country to #connect_the_world (e.g. NL or US) |
| /add_node | Register node (see convience features) |
| /country_visible | Make country visible in ring participation polls. |
| /howtojoin | Get instructions on how to join a Ring of Fire |
| /donate [Sats] [Message] | Donate to Ringtools-Web Development |

## Ring-group commands

### For all ring participants
````text
/ringurl - Get ring-specific link for Ringtools-Web
/ring_channels - Get overview of channels
/node_overview_csv - Export Groupnodes CSV
/node_overview - Ring participant overview
````
| Command | Description |
| --- | --- |
| /ringurl | Get ring-specific link for Ringtools-Web |
| /get_tz | Get overview of timezones of all participants|


### For individual ring participants
````text
/participate [PubKey] - Join this ring (if you don't have any channels,
use your full node URI)
/unparticipate - Leave this ring
/set_funded - Confirm you are funded
/set_country [CountryCode] - Set your country to #connect_the_world (e.g. NL or US)
/unparticipate - Leave this ring
/get_tz - Get overview of timezones of all participants
/get_file [igniterconf] - Get igniter.conf file (only when all channels are opened)
````
| Command | Description |
| --- | --- |
| /participate [PubKey] | Join this ring (if you don't have any channels, use your full node URI) |
| /unparticipate | Leave this ring |
| /set_funded | Confirm you are funded |
| /set_country [CountryCode] | Set your country to #connect_the_world (e.g. NL or US) |
| /unparticipate | Leave this ring |
| /get_file [igniterconf] | Get igniter.conf file (only when all channels are opened) |

### For masters of ceremony
````text
/set_name [RingName] - Get Lightning channel info
/set_size [RingSize] - Get Lightning channel info
/import_csv [FileContents] - Import Groupnodes CSV from Cheeserobot
/set_ring_mode [mode] - Set ring mode (e.g. opening_channels)
/ring_group_logo [Size] [Nr] - Create a ring group logo (admins only)
last parameters are balanced and country
/set_order [PubKeysContents] - Reorder participants (using pubkeys.txt export
from Ringtools-Web)
/set_ringleader - Set Ringleader of the ring
/post_message [welcome|channels] - Post welcome/channel opening message
/view_channel_settings - View channel settings
/set_autoclean [cmd|self] [true] - Change autoclean settings
/set_greeting [text] - Set new user message
/ring_greet [true/false] [cleanDelay] - Enable/disable new user greeting
/update_name - Update ring name
/ring_visual - Get ring visual (same as on rof.tools)
/update_logo - Update ring group logo
````
| Command | Description |
| --- | --- |
| /ring_channels | Get overview of channels |
| /node_overview | Ring participant overview |
| /start_ring_wizard | Start Ring Wizard |
| /edit_ring_wizard | Edit Ring Wizard |
| /set_order [PubKeysContents] | Reorder participants (using pubkeys.txt export from Ringtools-Web) |
| /set_order_user [username] | Reorder participants (set @username at the bottom for igniter) |
| /set_ringleader | Set Ringleader of the ring |
| /update_ring | Update ring name and logo |
| /ring_visual | Get ring visual (same as on rof.tools) |
| /raffle [user1] [user2] [user...] | Do a raffle, e.g. ringleader selection. |
| /explain_igniter | Explain Igniter output. Reply to a single message with output or to a file in the chat. |
| /view_channel_settings | View channel settings |
| /import_csv [FileContents] | Import Groupnodes CSV from Cheeserobot |
| /update_name | Update ring name |
| /update_logo | Update ring group logo |
| /set_autoclean [cmd\|self] [true] | Change autoclean settings |
| /set_greeting [text] | Set new user message |
| /post_message [template] | Post message (welcome, opening_channels, igniter, fee_info, balanced) |
| /set_name [RingName] | Set name of ring |
| /set_size [RingSize] | Set size of ring |
| /set_ring_mode [mode] | Set ring mode (e.g. opening_channels) |
| /ring_greet [true/false] [cleanDelay]| Enable/disable new user greeting |

### Poll commands
````diff
- /poll_ring [RingName] [MaxPpl] - Create poll to join a ring, old format (admins only)
/poll_ring_v2 [RingName] [MaxPpl] - Create poll to join a ring (admins only)
/poll_ringleader - Create poll to become ringleader (admins only)
/admin_close_poll - Force close poll
````
| Command | Description |
| --- | --- |
| /poll_ring [RingName] [MaxPpl] | Create poll to join a ring |
| /poll_repost [RingName] [MaxPpl] | Repost poll to join a ring |
| /poll_ringleader | Create poll to become ringleader (admins only) |
| /admin_close_poll | Force close poll |
2 changes: 2 additions & 0 deletions source/tg/participate.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@
3. Let know if/when you have the funds to open the channel `/set_funded true`

<center>

![Participate screenshot](/screenshots/participate_country_funded.png)

</center>

0 comments on commit 92f40ee

Please sign in to comment.