Git Product home page Git Product logo

beerlog's Introduction

BeerLog

Program NFC215 tags with some code, and use that to keep a leaderboard of who is drinking the manyest beers.

Tested with these NFC215 stickers. Program them with your phone and your favorite app.

NFC reader is this one.

Other recommended hardware, especially if the device you're setting up doesn't have access to the internet is a I2C RTC such as this one which has its own battery and is pretty small.

Installation

sudo apt install python3-virtualenv
virtualenv --system-site-packages beerlog
cd beerlog
source bin/activate

git clone https://github.com/conchyliculture/beerlog

On a Raspberry Pi:

pip install -r requirements.txt

On a Desktop, do this instead:

export CFLAGS=-fcommon
pip install -r requirements-desktop.txt
sudo apt install jq
wget  https://goto.rip/beertags -O - | jq ".[keys[1]]" | jq "del(.|.[].release)" > known_tags.json

In known_tags.json, add the optional characteristics realname or glassvolume to each entry:

{
  "0x0000000000000002": {
     "name": "Marius",
     "realname": "Raymond",
     "glass": "40" // This is in cL
}

This way, Raymond will be displayed in the UI instead of Marius, and we'll count 40cL for earch scan.

PYTHONPATH="." python beerlog/cli/beerlog_cli.py

If you need hardware clock, here are some helpful links:

[Unit]
Description=hwclock
[Service]
Type=oneshot
ExecStart=/sbin/hwclock --hctosys
ExecStop=
[Install]
WantedBy=multi-user.target

Tests

I have some!

python run_tests.py

Development

For development purposes, you can run the code with an emulated interface.

apt install python3-gi

beerlog's People

Contributors

conchyliculture avatar djdeath avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

djdeath

beerlog's Issues

Add an example known_tags.json

README has this line :

wget  https://goto.ninja/beertags -O - | jq ".[keys[1]]" | jq "del(.|.[].release)" > known_tags.json

But goto.ninja ain't no more :(

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.