From c60f19d7c6d7d7d192dbdeefbd54cbdc6d211331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anna=20=E2=80=9CCyberTailor=E2=80=9D?= Date: Wed, 10 May 2023 08:50:52 +0500 Subject: [PATCH 1/2] Fixed misplaces ul/ol in node_to_plaintext --- mastoposter/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mastoposter/utils.py b/mastoposter/utils.py index f46d789..3cab198 100644 --- a/mastoposter/utils.py +++ b/mastoposter/utils.py @@ -264,7 +264,7 @@ def node_to_plaintext(el: PageElement) -> str: " \u2022 %s" % li.replace("\n", "\n ").strip() for li in children ) - if el.name == "ol" + if el.name == "ul" else ( "%d. %s" % (i, li.replace("\n", "\n ").strip()) for i, li in enumerate(children) From a08630e23bc058a88a670d12ea6bbb8b68413775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anna=20=E2=80=9CCyberTailor=E2=80=9D?= Date: Wed, 10 May 2023 07:13:18 +0500 Subject: [PATCH 2/2] Updated boilerplate config There were some mistakes. --- config.ini | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/config.ini b/config.ini index f383747..230c539 100644 --- a/config.ini +++ b/config.ini @@ -1,8 +1,3 @@ -[DEFAULT] -# Number of retries in case request fails. Applies globally -# Can be changed on per-module basis -http-retries = 5 - [main] # This is a list of output modules. Each module should be defined in section, # named "module/MODULENAME". Space-separated list of strings. @@ -12,7 +7,7 @@ modules = telegram instance = mastodon.example.org # Mastodon user token. -# Required permissions: read:statuses read:lists +# Required permissions: read:accounts read:statuses read:lists # You can get your token by creating application in # ${instance}/settings/applications token = blahblah @@ -38,6 +33,10 @@ list = 1 auto-reconnect = yes reconnect-delay = 1.0 +# Number of retries in case request fails. Applies globally +# Can be changed on per-module basis +http-retries = 5 + # Example Telegram integration. You can use it as a template [module/telegram] type = telegram @@ -109,7 +108,7 @@ webhook = url ;type = content ;# Mode of the filter. ;# "regexp" requires "regexp" property and should contain... A RegExp -;# "hashtag" should contain space-separated list of tags +;# "tag" should contain space-separated list of tags ;mode = regexp ;# Regular expression pattern to be matched ;regexp = ^x-no-repost