AskMe is a Python program that allow you to search questions and answers on the internet using keywords.
- Original instructions
- Project activities on Trello Kaban Board
- Starck Overflow Wrapper on GitHub
Install pip, virtualenv and virtualenvwrapper packages:
sudo apt-get install python3-pip
sudo pip3 install virtualenv virtualenvwrapper
For configure the VirtualEnvWrapper, edit the file /home/user/.bashrc
:
Include the content bellow at the end of the file:
# Python Virtualenvs
export WORKON_HOME=/home/user/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3.6
source /usr/local/bin/virtualenvwrapper.sh
export PIP_REQUIRE_VIRTUALENV=true
Restart the terminal and run the command bellow to create a virtualenv:
mkvirtualenv askme
Clone this repository and access to the folder:
git clone https://github.com/rafaelassacconi/askme.git
Activate the virtualenv:
workon askme
Install the packages required:
pip install -r requirements.txt
Run the command bellow to execute the program:
python askme.py
For execute the program with all the parameters:
python askme.py --keywords=html --items=20
To get help, use the --help
parameter:
python askme.py --help
Help command result:
Usage: askme.py [OPTIONS]
AskMe use keywords to search related questions and answers on the
internet.
Options:
--keywords TEXT Keywords to search related questions and answers.
--items INTEGER Max number of items that will be returned.
--help Show this message and exit.
Run the command bellow to start bot:
python askme_telegram_bot.py
On Telegram, chat with the user @askme_telegram_bot
.
Press Ctrl-C
on the command line to stop.
For run the tests, install the pytest
package and run the command bellow:
pytest
Command line interface:
Telegram chatbot: