This project aims to provide simple interface to get lists of beers from my favourite pubs.
- Malt Worm
- Ochutnávková pivnice
- Craftbeer bottle shop & bar
- JBM Brew Lab Pub
- F.A. Bar Oranžová
- Pivní Ambasáda
- The parsers can be used separately, there are just a few simple dependencies as mentioned in
requirements.txt. - The parsers can be easily run in their own python virtual environment:
python3 -m venv ./venv
source /venv/bin/activate
pip3 install -r requirements.txt
python3 ./parsers/mwparser.py
- Add
update_cache.shscript to crontab
*/20 0,1,9-23 * * * /path/to/tools/update_cache.sh
- Check out the code to a web accessible directory with PHP support
- Change group of
cachedirectory to that of the web server (e.g. www-data)
chgrp www-data cache
chmod 6775 cache
- Check that all files are first created by calling
tools/update_cache.shto ensure that the usr has owner rights - Setup log file with permissions:
touch log/beerlog.json
chgrp www-data log/beerlog.json
- Allow mod_rewrite (a2enmod rewrite)
- Allow .htaccess for the dir
<Directory /var/www/html/beer>
AllowOverride All
</Directory>
The following features allow interacting with IRC. To connect to a selected IRC channel, set up an instance of ii (IRC file based client)
apt-get install ii
sudo cp beerbot/beerbot-connection.service /etc/systemd/user/
# the config file must be accessible even for www-data, therefore this ugly place
sudo cp beerbot/beerbot.conf /etc/
systemctl --user daemon-reload
systemctl --user enable beerbot-connection
systemctl --user start beerbot-connection
To configure the IRC server, channel and bot name, edit the beerbot.conf file.
Notifications are enabled by default and can be disabled in beerbot.conf.
The beerbot can respond to IRC commands in form of !pub where pub is a shortcut of one of the supported pubs
For this to work, you need to start the beerbot-connection service. Pushing notifications to IRC can be disabled.
- Configure the path to the beerbot script in the
/etc/beerbot.conf. It must be within the original directory structure. - The beerbot systemd service needs to be enabled:
sudo cp beerbot/beerbot.service /etc/systemd/user/
systemctl --user daemon-reload
systemctl --user enable beerbot
systemctl --user start beerbot
Untappd drinking notifications from your friends can be easily pushed to the configured IRC channel.
To enable Untappd notifications:
- It is necessary to write Untappd user names and corresponding IRC nicks into
beerbot.conffile.UNTAPPD_USERS="beeruser1 beeruser2" UNTAPPD_IRC_NICKS="cervezaadicto1 cervezaadicto2" - Add
update_untappd.shscript to crontab*/10 * * * * /path/to/tools/update_untappd.sh
Look at https://www.mujkaktus.cz/novinky for news
To enable notifications:
- Add nicks to be highlighted to
beerbot.conffile toKAKTUS_NOTIFYvariable. - Call kaktus update script from crontab
10 8-20 * * * /path/to/tools/update_kaktus.sh