- Create env.cfg file with your token (see env-example.cfg)
- Use Dockerfile to build and run a Docker container
Base project for Great Northern Health Tracking Trek. EESTEC LC Tampere workshop November 2022
-
git status
- returns status of the repository
-
git add <filename>
- stages file for commit
-
git add -A
- stages all changed files for commit
-
git commit -m "Commit message"
- commit changes to head, not yet to the remote
- if you forget message an editor will open. propably vim, don't get scared
-
git push
- sends changes to remote
-
git checkout -b <branchname>
- creates new branch and switches to it
- without -b handle checkout just switches from one branch to another
-
git pull
- fetch and merge changes from remote to your local directory
-
check for more: https://confluence.atlassian.com/bitbucketserver/basic-git-commands-776639767.html
-
actual git documentation: https://git-scm.com/docs/git
sudo apt install git
sudo apt install python3-pip
pip install python-telegram-bot -U --pre
- pre-releases https://github.com/python-telegram-bot/python-telegram-bot/wiki/introduction-to-the-API
- If you want to use older version like 13.0 the syntax is quite different.
sudo apt install sqlite3
- Log in or sign up to github.
- Now let's fork this repository: https://github.com/ahvena91/eesteclctampere_ws_22
- Forking means that you take a copy of source code and start independet development on it
- main branch has few minimal examples
- if you get stuck or want to check something there's a bit more advanced sources in other branches
pip install -r requirements.txt
- start conversation with https://t.me/botfather
- make a copy of
env-example.cfg
and rename it toenv.cfg
env.cfg
is se to .gitignore so that we wont't publish our personal bot token by accident
- run
python3 echobot.py
andpython3 conversationbot.py
separately - and figure out how they work
- after this point you should at least get familiar with
- In the original repository there's separate branches with more code included if you get stuck or just want to check something for reference
- You may also fork the repository again
- or just copy some of the contents
- Minimum requirements would be that user is able to store data and plot it
- But of course this is your own design
- You may check out this features.mmd https://github.com/ahvena91/eesteclctampere_ws_22/blob/main/features.mmd
- if you want to view it locally you need to install extension for VS Code to view it.
-
First make sure you have sqlite3 installed
-
This should be useful for windows users: https://www.sqlitetutorial.net/download-install-sqlite/
-
Check the changes in https://github.com/ahvena91/eesteclctampere_ws_22/tree/2_database_test
-
There's two new files:
initdatabase.py
anddb_handler.py
- first one is creating the database and second one is used for implementing methods that use the db
- Database handling can be tested by running
database_test.py
program /new
command asks user a new datapoint which is now stored in the database by callingadd_data
method from db_handler- you can check that the value is indeed saved by starting sqlite3
sqlite3 <nameofdatabase>
.tables
lists created data tablesSELECT <data> FROM <nameoftable>
lists added datapoints- for example:
SELECT datapoint FROM data_table
- for example: