A Twitter bot to enhance the hashtag #doctoctoc ("Toc, toc!" is the equivalent of "Knock, knock!" in French, but is not used to introduce a joke). #DocTocToc is used by French speaking doctors and other healthcare professionals to help each other with clinical cases or administrative chores.
Contributions to the code are welcome. Data mining, NLP hackers, I need you!
Cloning this repository
This repository contains a submodule
src/bot/lib/python-twitter. It is a modified version of python-twitter that allows sending and retrieving direct messages with the new Twitter API.
For a 1st time clone use
git clone --recursive https://github.com/DocTocToc/doctoctocbot.git
If you already cloned the repository, cd into it and
git submodule update --init --recursive
- I retweet tweets containing the hashtag #doctoctoc.
- I retweet only MDs and midwives.
- Twitter users who do not want to be retweeted can DM me (manually processed please be patient) or block me (effective immediately).
- I don't retweet retweets.
- I don't retweet answers.
- I don't retweet "quote tweets".
- I exclude a few usecases such as professionals looking for a replacement.
- I retweet only questions.
- How to tell MDs from non-MDs on Twitter?
- How to enhance the dialogue with other healthcare professionals (pharmacists, ...)?
- Can we automatically classify the type of request (clinical case, administrative tip, other kind of help)?
- Can we automatically classify the medical category of the request? (Dermatology, cardiology, psychiatry, social problems)
- What classifications should we use? (ICPC, ICD)
- Should we use another hashtag for clinical quizzes (when the requester already knows the answer) such as #DocQuiz ?
Wiki, documentation, links
Read more about technical issues, code: wiki
DocTocTocBot was created by @medecinelibre
We would like to adapt the bot to Mastodon. Can you help with this?
Python & Django version
- Python version 3.6
- Django version 2.0 (for compatibility with CleanerVersion)
pip install -r requirements.txt
How to start:
Even though the bot is now integrated into a larger Django project, the bot app inside src could easily be adapted to be used as a standalone retweet bot.
- Define the hashtag(s) you want to retweet and the hashtag(s) you want to track in the config file.
- You can track more hashtags than you retweet (for archival purpose)
- Start the tracking stream:
python3 manage.py run_bot_stream
- You can also use the retweet bot based on Search API:
python3 manage.py run_bot_search
- You can run both Django commands with systemd.
- For the search and retweet module doctoctocbot.py, define the number of retweets at a time (This avoids overloading -Limit is 180 RT/ 15 mins)
- Add your Twitter app credentials in environment variables (avoid putting secrets in the config file)
- (Tune some other options if you like)
To @natolh for his technical advice and pull requests.