This project is a Twitter Bot for the Wikitrans website which allows any user to perform a request from Twitter.
The available commands are the following :
- article [KEYWORDS]
Looks for an article on the Wikitrans website with the provided keywords. Keywords must be separated by a space - intro, bases
Gets the introduction to transidentity page from the Wikitrans website - trombinoscope, trombi, galerie
Gets the photos page from the Wikitransbot website - map, carte, associations, association, assos, asso
Gets the map of associations page from the Wikitransbot website - help, aide
Gets this section of the project page, describing the available commands
Below is an example of a request to look for an article with the keywords "numéro de sécurité sociale" on the Wikitrans website.
A configuration template is provided in the repo. You can find it at the root of the project with the name config_template.json
.
You can find different sections:
twitter
twitter_api_key
: your Twitter API keytwitter_api_key_secret
: your Twitter API key screttwitter_access_token
: your Twitter access tokentwitter_access_token_secret
: your Twitter access token secrettwitter_bearer_token
: your Twitter bearer tokenuser_id
: the user ID of your account
last_id_file
: the path to the file where the last checked tweet id (called since_id) is stored
sleep_time
: the time between two runs, in seconds (60 is strongly adviced)trigger_keyword
: the keyword to use to ask the bot an articlelogfile_path
: the path to the logfilestop_words
: a list of words to ignore when performing a search
They are configured in the command_handlers
section.
You define a command handler section with the name of the class of the handler.
Every command handlers must at least define :
module
: the path to the module of the handleraliases
: the list of keywords to trigger the handler
More configuration can be put in a handler section as needed, (i.e. : templates for the answers)
- To submit new issues, please do it in Github using the correct template if there is one. Before doing so, be sure your issue hasn't already been reported. For personnal support please send a mail to roelandt.jef@proton.me
- To contribute, fork the project and make a PR. Commits are expected to be atomics, functionnal and well-named. All features must be tested and must pass the CI.
- Jef "SuperMeepBoy" Roelandt - roelandt.jef@proton.me