From a4dfb1393defe6ca47ee13e570d5eb7c855c7268 Mon Sep 17 00:00:00 2001 From: Hemna Date: Fri, 2 Aug 2024 11:12:09 -0400 Subject: [PATCH] Updated config options This also updates the README --- README.rst | 33 ++++++++++++++++++-------- aprsd_telegram_plugin/conf/__init__.py | 7 ++---- aprsd_telegram_plugin/conf/telegram.py | 8 +++---- 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/README.rst b/README.rst index 1acbd71..01b3f2b 100644 --- a/README.rst +++ b/README.rst @@ -32,20 +32,33 @@ You can install *aprsd-telegram-plugin* via pip_ from PyPI_: $ pip install aprsd-telegram-plugin -Now edit your aprsd.yml config file and add the plugin +Now edit your aprsd.conf config file and add the plugin -.. code:: yaml +.. code:: ini - aprsd: - enabled_plugins: - - aprsd_telegram_plugin.telegram.TelegramChatPlugin - services: - telegram: - apiKey: - shortcuts: - 'wb': hemna6969 + [DEFAULT] + enabled_plugins = aprsd_telegram_plugin.telegram.TelegramChatPlugin + [aprsd_telegram_plugin] + + # + # From aprsd_telegram_plugin.conf + # + + # Callsign allowed to use Telegram! For example, if you set this to + # WB4BOR then anycallsign starting with WB4BOR will be allowed to use + # this.This way WB4BOR-1 can use this instance. (string value) + #callsign = + + # Your telegram apiKeyInformation for creating your api keys is here: + # https://core.telegram.org/api/obtaining_api_id (string value) + #apiKey = + + # List of shortcuts for sending telegram messages For Example: + # wb=hemna6969,cl=craigerl + # Means use 'wb' to send a telegram message to hemna6969 (list value) + #shortcuts = Usage diff --git a/aprsd_telegram_plugin/conf/__init__.py b/aprsd_telegram_plugin/conf/__init__.py index 6e29587..4c572a5 100644 --- a/aprsd_telegram_plugin/conf/__init__.py +++ b/aprsd_telegram_plugin/conf/__init__.py @@ -1,9 +1,6 @@ -import logging - -from aprsd_twitter_plugin.conf import twitter +from aprsd_telegram_plugin.conf import telegram from oslo_config import cfg CONF = cfg.CONF - -twitter.register_opts(CONF) +telegram.register_opts(CONF) diff --git a/aprsd_telegram_plugin/conf/telegram.py b/aprsd_telegram_plugin/conf/telegram.py index c942745..1411a7c 100644 --- a/aprsd_telegram_plugin/conf/telegram.py +++ b/aprsd_telegram_plugin/conf/telegram.py @@ -12,18 +12,18 @@ telegram_opts = [ help="Callsign allowed to use Telegram! " "For example, if you set this to WB4BOR then any" "callsign starting with WB4BOR will be allowed to use this." - "This way WB4BOR-1 can tweet from this instance.", + "This way WB4BOR-1 can use this instance.", ), cfg.StrOpt( "apiKey", - help="Your twitter apiKey" + help="Your telegram apiKey" "Information for creating your api keys is here: " - "https://developer.twitter.com/en/docs/authentication/oauth-1-0a/api-key-and-secret", + "https://core.telegram.org/api/obtaining_api_id", ), cfg.ListOpt( "shortcuts", help="List of shortcuts for sending telegram messages " - "For Exmaple: wb=hemna6969,cl=craigerl\n" + "For Example: wb=hemna6969,cl=craigerl\n" "Means use 'wb' to send a telegram message to hemna6969", ), ]