readme + usability improvements

+ added requirements.txt
* updated readme
This commit is contained in:
nico 2018-10-04 00:46:57 +02:00
parent 6c6c14b55f
commit 6bb9f1d5b8
2 changed files with 20 additions and 9 deletions

View file

@ -1,28 +1,35 @@
# Python XMPP Chatbot # Python XMPP Chatbot
## beforehand ## beforehand
Do not opperate this bot on foreign servers. Do not operate this bot on foreign servers. Many servers prohibit the usage of bots on their service.
### functions ### functions
- query xmpp server software and version [XEP-0092](https://xmpp.org/extensions/xep-0092.html) - query xmpp server software and version [XEP-0092](https://xmpp.org/extensions/xep-0092.html)
- query xmpp server uptime [XEP-0012](https://xmpp.org/extensions/xep-0012.html) - query xmpp server uptime [XEP-0012](https://xmpp.org/extensions/xep-0012.html)
- query xmpp server contact addresses [XEP-0157](https://xmpp.org/extensions/xep-0157.html) - query xmpp server contact addresses [XEP-0157](https://xmpp.org/extensions/xep-0157.html)
- display information about XEP from the [XSF extensions website](https://xmpp.org/extensions/)
- display help output - display help output
- respond to username being mentioned - respond to username being mentioned
### install ### install
#### requirements #### virtualenv
- slixmpp With virtualenv it is possible to run the bot inside a virtual environment without disrupting other python processes
- logging and or dependencies. This repo comes with a `requirements.txt` to make the install process as easy as possible.
- ssl ````bash
- configparser cd to_the_path/of_the_bot/
- validators mkdir ./venv
# create the virtual environment
virtualenv -p $(which python3) ./venv
source ./venv/bin/activate
pip3 install -r requirements.txt
````
#### configuration #### configuration
`bot.cfg` replace dummy file with correct credentials/ parameters Replace the dummy `bot.cfg` file, filled with correct credentials/ parameters.
````cfg ````cfg
[Account] [Account]
jid=nick@domain.tld/querybot-0.1 jid=nick@domain.tld/querybot
password=super_secret_password password=super_secret_password
[MUC] [MUC]
rooms=room_to_connect_to@conference.domain.tld,another_room@conference.domain.tld rooms=room_to_connect_to@conference.domain.tld,another_room@conference.domain.tld

4
requirements.txt Normal file
View file

@ -0,0 +1,4 @@
slixmpp>=1.2.2
defusedxml>=0.5.0
requests>=2.19.1
validators>=0.12.2