]> rtime.felk.cvut.cz Git - coffee/coffee-flask.git/log
coffee/coffee-flask.git
2 years agoFix "ValueError: cannot convert float NaN to integer" master
Michal Sojka [Thu, 2 Sep 2021 12:29:19 +0000 (14:29 +0200)]
Fix "ValueError: cannot convert float NaN to integer"

2 years agoFix "RuntimeError: In set_text: Could not load glyph (error code 0x14)"
Michal Sojka [Thu, 2 Sep 2021 12:28:15 +0000 (14:28 +0200)]
Fix "RuntimeError: In set_text: Could not load glyph (error code 0x14)"

3 years agoAdd comment why we logout after pressing "A" key
Michal Sojka [Fri, 27 Nov 2020 15:53:23 +0000 (16:53 +0100)]
Add comment why we logout after pressing "A" key

3 years agoLogout on 'Menu' press
Jaroslav Klapalek [Fri, 27 Nov 2020 11:31:44 +0000 (12:31 +0100)]
Logout on 'Menu' press

3 years agoColorize coffee machine cleaning event box when cleaning is due
Michal Sojka [Tue, 1 Sep 2020 07:27:09 +0000 (09:27 +0200)]
Colorize coffee machine cleaning event box when cleaning is due

3 years agoEnsure that the home screen is loaded automatically
Michal Sojka [Thu, 20 Aug 2020 22:06:28 +0000 (00:06 +0200)]
Ensure that the home screen is loaded automatically

Now, when the application starts, only a blank page is shown. The home
screen (summary graphs for all users) shows only after somebody logs
in and out. With this change, the home screen is loaded automatically
on the first start or on manual page reload.

Together with this change, we split the home and user screens to
separate templates (previously the home screen was the user screen
with name unset). Hopefully, this change makes the UI logic a bit
easier to follow.

3 years agoMove "Events UI" to a separate template
Michal Sojka [Thu, 20 Aug 2020 22:23:46 +0000 (00:23 +0200)]
Move "Events UI" to a separate template

This will simplify the next commit.

3 years agoRename the class of the main div from "user" to "content"
Michal Sojka [Thu, 20 Aug 2020 22:27:50 +0000 (00:27 +0200)]
Rename the class of the main div from "user" to "content"

This makes more sense and does not cause confusion because user is
also a name of a template.

3 years agoRemove unused function
Michal Sojka [Thu, 20 Aug 2020 22:29:56 +0000 (00:29 +0200)]
Remove unused function

3 years agoColorize milk cleaning event box after some days without cleaning
Michal Sojka [Thu, 20 Aug 2020 20:21:30 +0000 (22:21 +0200)]
Colorize milk cleaning event box after some days without cleaning

3 years agoReturn last_events as datetime objects rather than as strings
Michal Sojka [Thu, 20 Aug 2020 20:17:17 +0000 (22:17 +0200)]
Return last_events as datetime objects rather than as strings

This simplifies date-related filters - humanize_ts in this commit,
date_filter in the next commit.

3 years agoReport events at most in "days ago", not in weeks, months or years ago
Michal Sojka [Thu, 20 Aug 2020 16:28:43 +0000 (18:28 +0200)]
Report events at most in "days ago", not in weeks, months or years ago

3 years agoShow "cleaning" events next to each other, separate pack opening with space
Michal Sojka [Thu, 20 Aug 2020 11:18:36 +0000 (13:18 +0200)]
Show "cleaning" events next to each other, separate pack opening with space

3 years agoDo not return empty string for future times
Michal Sojka [Thu, 20 Aug 2020 11:08:36 +0000 (13:08 +0200)]
Do not return empty string for future times

3 years agojs: Make the source of error messages more evident
Michal Sojka [Wed, 19 Aug 2020 16:21:25 +0000 (18:21 +0200)]
js: Make the source of error messages more evident

3 years agoFix most of flake8 warnings
Michal Sojka [Wed, 19 Aug 2020 13:09:24 +0000 (15:09 +0200)]
Fix most of flake8 warnings

I deliberately ignored warnings about long lines and a few more.

3 years agoMove Events block before user rename/id block
Michal Sojka [Tue, 18 Aug 2020 19:12:09 +0000 (21:12 +0200)]
Move Events block before user rename/id block

Events block will probably be used more often, so this will result in
less scrolling.

3 years agoAdd event logging
Michal Sojka [Tue, 18 Aug 2020 18:13:29 +0000 (20:13 +0200)]
Add event logging

This allows users to log various events such as coffee machine or milk
container cleaning. Also, all users can see when was the last
occurrence of the particular event.

[Credits: This is a modified version of a patch from Jarda Klapálek.]

3 years agoExtend database schema for event logging
Michal Sojka [Tue, 18 Aug 2020 17:36:57 +0000 (19:36 +0200)]
Extend database schema for event logging

Actual event logging will be implemented in the next commits.

3 years agoAdd humanize filter for Jinja2 templates
Michal Sojka [Tue, 18 Aug 2020 17:24:22 +0000 (19:24 +0200)]
Add humanize filter for Jinja2 templates

This filter converts date/time values into relative time strings such
as "an hour ago".

It will be used in later commits.

3 years agoAdd comments
Michal Sojka [Fri, 31 Jul 2020 08:42:52 +0000 (10:42 +0200)]
Add comments

3 years agoWorkaround the incompatibility created by Matplotlib 3.3.0
Jaroslav Klapálek [Fri, 31 Jul 2020 05:16:56 +0000 (07:16 +0200)]
Workaround the incompatibility created by Matplotlib 3.3.0

3 years agoSuppress Matplotlib's deprecation warning
Michal Sojka [Thu, 30 Jul 2020 06:47:06 +0000 (08:47 +0200)]
Suppress Matplotlib's deprecation warning

The warning was:

    coffee-flask/app.py:127: MatplotlibDeprecationWarning:
    normalize=None does not normalize if the sum is less than 1 but
    this behavior is deprecated since 3.3 until two minor releases
    later. After the deprecation period the default value will be
    normalize=True. To prevent normalization pass normalize=False

4 years agoAdd TODO
Michal Sojka [Mon, 13 Jan 2020 22:42:27 +0000 (23:42 +0100)]
Add TODO

4 years agoAdd doc string
Michal Sojka [Mon, 13 Jan 2020 22:41:50 +0000 (23:41 +0100)]
Add doc string

4 years agoAdd `type` for flavors and build current consumption dynamically
Jaroslav Klapalek [Wed, 11 Dec 2019 10:00:12 +0000 (11:00 +0100)]
Add `type` for flavors and build current consumption dynamically

4 years agoAdd new beverage `tea` and make buttons larger
Jaroslav Klapalek [Mon, 11 Nov 2019 12:31:36 +0000 (13:31 +0100)]
Add new beverage `tea` and make buttons larger

4 years agoAdd missing quotes in JS handler for disabling identifier
Michal Sojka [Mon, 19 Aug 2019 10:53:17 +0000 (12:53 +0200)]
Add missing quotes in JS handler for disabling identifier

The identifier should always be treated as string, never as a number.

4 years agoInclude constant SQL values directly in queries
Michal Sojka [Mon, 19 Aug 2019 06:16:31 +0000 (08:16 +0200)]
Include constant SQL values directly in queries

It makes the query slightly more readable.

4 years agoUpdate debug message
Michal Sojka [Mon, 19 Aug 2019 06:14:46 +0000 (08:14 +0200)]
Update debug message

4 years agoRename DB field identifiers.status to identifiers.active
Michal Sojka [Sun, 18 Aug 2019 20:19:31 +0000 (22:19 +0200)]
Rename DB field identifiers.status to identifiers.active

This better reflects what is the meaning of the value.

If you need to manually create the table, use the following command,
not the one from the previous commit.

    CREATE TABLE if not exists identifiers (
        `userid` varchar ( 24 ) NOT NULL,
        `id` varchar ( 24 ) PRIMARY KEY NOT NULL,
        `name` varchar ( 24 ),
        `active` INTEGER NOT NULL DEFAULT 1,
        FOREIGN KEY(`userid`) REFERENCES `users`(`id`)
    );

4 years agoAdd support for multiple identifiers per user
Jaroslav Klapalek [Wed, 14 Aug 2019 11:29:21 +0000 (13:29 +0200)]
Add support for multiple identifiers per user

Users can register multiple identifiers for a single account. Also
they can rename identifiers (each identifier has its own name) and
unregister/remove them from the account.

Required: Create new table in database (will be created automatically
on first startup)

CREATE TABLE if not exists identifiers (
    `userid` varchar ( 24 ) NOT NULL,
    `id` varchar ( 24 ) PRIMARY KEY NOT NULL,
    `name` varchar ( 24 ),
    `status` INTEGER NOT NULL DEFAULT 1,
    FOREIGN KEY(`userid`) REFERENCES `users`(`id`)
);

Note: `status` is used for activating/deactivating associations.

This table creates 1:N relation (users:identifiers), where 'userid'
is marked as foreign key from 'users' table. There is no reason for
changing 'users.id', but it could be done.

Column 'id' is marked as primary key to avoid creating M:N relation
instead. Each time a relation is removed, it is marked as deactivated
and it is deleted from the table next time, when a new relation with
the same identifier is created.

Each coffee is now saved with 'identifiers.id' instead of 'users.id'.
Because we were not using custom id in 'users' table, we do not
have to change anything in currently recorded data/design of tables.

On user creation / first login 'users.id' (or id of identifier) and
id of identifier are added to 'identifiers' table.

Selected changes:
> app.py:login()
From now on we expect that received variable is 'iid' (id of identi-
fier). At first this identifier is checked if it belongs to a user.
If True: 'uid' (users.id) is found in database,
Otherwise: 'iid' is registred as 'uid' for a new user.

> app.py:user_XXX_identifier()
Functions add/rename/disable modifies identifiers for current user.
Note: 'session["uid"]' is used because client side (.js) does not
know the difference between 'uid' and 'iid' (and there is no reason
to change this). This solves a problem of invalid ids when trying to
modify ID#1 of account ID#0 while logged by ID#2 in case we are
assuming that id of identifier ID#0 is the same as 'users.id'.

> app.py:coffee_add()
Add consistency check to avoid situations when user without valid
identifier is trying to register a coffee.

> coffee_db.py
Add functions to match new functions in app.py. Also modify current
functions to use 'identifiers' table in SQL queries.

> coffee_db.py:add_user_identifier()
Creates relation between user and identifier. It is also deleting
old (and deactivated!) relation from the database before registering
a new one.

> templates/main.js:addIdentifier_start() and addIdentifier_finish()
Modifies UI for the user and changes 'identifier_registration' variable.

> templates/user.html
Add table of identifiers for current user, which contains names,
ids and buttons to rename/remove identifier from current account.

Possible TODOs:
 - add option to merge two identifiers (e. g. if one is lost, it
should be possible to transfer all coffees to different one),
 - divide identifiers to 2+ groups -- 'master key' and 'regular',
so the public ones (e. g. mugs) cannot remove identifiers from an
account.

5 years agoWrap long line and unify upper-casing of SQL keywords
Michal Sojka [Tue, 9 Apr 2019 14:43:26 +0000 (16:43 +0200)]
Wrap long line and unify upper-casing of SQL keywords

5 years agoSeparate counting of coffees and club-mate
Tomas Prochazka [Tue, 9 Apr 2019 14:21:26 +0000 (16:21 +0200)]
Separate counting of coffees and club-mate

The patch solves the problem of separate counting of individual types
of drinks.

[commit message updated by M. Sojka]

5 years agoRemove last coffe pack opened button
Jiri Vlasak [Fri, 22 Mar 2019 08:44:40 +0000 (09:44 +0100)]
Remove last coffe pack opened button

As it has showed to be annoying and misused.

5 years agoAdd support for another beverages (namely club mate)
Jaroslav Klapalek [Thu, 7 Mar 2019 13:47:03 +0000 (14:47 +0100)]
Add support for another beverages (namely club mate)

Required to run on the server database before using this patch:
```
alter table flavors add ord integer not null default 999;
update flavors set ord=1 where name='cappuccino';
update flavors set ord=2 where name='espresso';
update flavors set ord=3 where name='espresso lungo';
update flavors set ord=4 where name='latte macchiato';
```

This patch slightly changes structure of a `flavors` table. It adds
another column called `ord`, which is used for ordering of coffee
flavors / beverages on the graphs (to maintain the same color scheme).

Scripts `app.py` and `coffee_db.py` are modified to work with this
change.

5 years agoChange the name of the configuration file
Michal Sojka [Wed, 27 Feb 2019 15:26:54 +0000 (16:26 +0100)]
Change the name of the configuration file

The reason for this is that the Apache mod_wsgi sets the current
directory of WSGI processes to $HOME and on our server $HOME/.config
is a directory. Instead of changing the working directory of WSGI
processes (which I don't know how to configure), I prefer to use a
different (non-colliding) file name: .coffee.conf. Having the
configuration file outside of the source directory has the advantage
that running "git clean -fx" in that directory does not delete the
configuration, which cannot be easily recovered (our Slack history is
limited).

5 years agoFix column name in UNIQUE index
Michal Sojka [Wed, 27 Feb 2019 14:54:24 +0000 (15:54 +0100)]
Fix column name in UNIQUE index

Thanks to Jiri for noticing that.

5 years agoFix duplicate recording of coffees
Jaroslav Klapalek [Tue, 26 Feb 2019 12:58:42 +0000 (13:58 +0100)]
Fix duplicate recording of coffees

In case that coffee machine loses connection during recording of a
coffee, this coffee is added once again as a part of offlineQueue.

Note: This commit implements a simpler solution suggested by Michal
Sojka and tested by Jiří Vlasák.

5 years agoEnglish fixes
Michal Sojka [Wed, 27 Feb 2019 13:56:01 +0000 (14:56 +0100)]
English fixes

5 years agoMake config-related error message more informative
Michal Sojka [Wed, 27 Feb 2019 13:55:38 +0000 (14:55 +0100)]
Make config-related error message more informative

Without this information, it's hard to figure out why things do not work.

5 years agoAdd last coffee pack button
Jiri Vlasak [Tue, 12 Feb 2019 13:15:35 +0000 (14:15 +0100)]
Add last coffee pack button

When clicked, the message notifying Tonda about the lack of coffee is
sent to the Slack.

There must be `.config` file in `coffee-flask` folder. The `.config`
file is JSON formated. For this patch the following is needed:
```
{
        "coffeebot": {
                "url": "https://hooks.slack.com/services/..."
        }
}
```

5 years agoFix data acquisition for flavor graph.
Jaroslav Klapalek [Wed, 14 Nov 2018 07:49:50 +0000 (08:49 +0100)]
Fix data acquisition for flavor graph.

Function 'coffee_flavors' wasn't doing what it was supposed to do.
Upper bound was shifted by a day (so for a week graph it was count-
ing 8 days) and also it didn't take into account 'start' variable.

5 years agoAdd TODO
Michal Sojka [Fri, 12 Oct 2018 07:13:43 +0000 (09:13 +0200)]
Add TODO

5 years agoAdd graphs with total coffee consumption on login screen
Jaroslav Klapalek [Thu, 11 Oct 2018 11:42:38 +0000 (13:42 +0200)]
Add graphs with total coffee consumption on login screen

5 years agoFix tag in 'user' template
Jaroslav Klapalek [Thu, 11 Oct 2018 11:43:40 +0000 (13:43 +0200)]
Fix tag in 'user' template

5 years agoRemove unused function
Jaroslav Klapalek [Fri, 14 Sep 2018 09:39:54 +0000 (11:39 +0200)]
Remove unused function

5 years agoFix incorrect counting of coffees made during time close to midnight
Jaroslav Klapalek [Fri, 14 Sep 2018 09:39:53 +0000 (11:39 +0200)]
Fix incorrect counting of coffees made during time close to midnight

Datetime in database is stored in UTC timezone. Currently we are in
UTC +2 timezone (GMT +1). Because of time shifts fixing the time
cannot be done in a static way.

Dynamic solution is using paramater 'localtime' in SQL query function
date(). Therefore it is required for the target device to have
properly set timezone.

TODO:
Suggested solution is to use 'type converters' for python/sqlite3.

5 years agoFix coffee graph for start of the month
Jaroslav Klapalek [Mon, 3 Sep 2018 16:03:43 +0000 (18:03 +0200)]
Fix coffee graph for start of the month

An error was found during the start of new month. To fix this I have
changed the SQL query to use '%s' (unix time) instead of '%d' (day
number).

How does this work?
The SQL query is using relation between two tables based on the date.
This relation is created using these parts of query:
 > "select num,date('now',-num || ' days')" as d from days
 > d = date(c.time)

First line creates timestampes of last 7 days -- time is set to
UTC midnight.
Second line converts data in 'c.time' to date struct - BUT! Even
here the time is set to midnight. This behaviour makes the relation
possible.

How does it behave in app.py?
Result of the query contains data that are ordered by time.
Unfortunately this order is lost during recasting the data to
list/dict (which are unordered). To solve this sorting is used.
Sorting data with unix time is safe, because it is always increasing.

To highlight this change, 'days' variable is refactored to 'unix_days'.

5 years agoCenter all content
Michal Sojka [Thu, 16 Aug 2018 21:56:54 +0000 (23:56 +0200)]
Center all content

It looks less ugly.

5 years agoShow current content of the offline queue when going offline
Michal [Wed, 15 Aug 2018 10:14:06 +0000 (12:14 +0200)]
Show current content of the offline queue when going offline

5 years agoDo not allow multiple reconnect timers running simultaneously
Michal [Wed, 15 Aug 2018 10:14:06 +0000 (12:14 +0200)]
Do not allow multiple reconnect timers running simultaneously

It is unnecessary waste of resources.

5 years agoWhen replaying offline queue, use the original event time rather than now()
Michal [Wed, 15 Aug 2018 10:14:06 +0000 (12:14 +0200)]
When replaying offline queue, use the original event time rather than now()

This way, coffees will be logged with correct time independently of
online/offline mode.

5 years agoRemove unused variable
Michal [Wed, 15 Aug 2018 10:14:06 +0000 (12:14 +0200)]
Remove unused variable

5 years agoReplace "fuck" with "ajax_failure"
Michal [Wed, 15 Aug 2018 10:14:06 +0000 (12:14 +0200)]
Replace "fuck" with "ajax_failure"

It makes the reason of the data structure clearer :-)

5 years agoLogout automatically even without selecting any beverage
Michal [Wed, 15 Aug 2018 10:14:06 +0000 (12:14 +0200)]
Logout automatically even without selecting any beverage

When a user logs in, and no beverage is selected within 120 seconds,
she are logged out automatically.

The main purpose for this functionality that when somebody swipes a
card in the offline mode and than goes away, because she does not see
nice graph. When the server is online again, the offline-collected
data is replayed and the user would stay logged in forever.

5 years agoImplement clean switching between online and offline mode
Michal Sojka [Thu, 16 Aug 2018 17:58:58 +0000 (19:58 +0200)]
Implement clean switching between online and offline mode

Now it is simple. When we are online, #remote div is shown and #local
is hidden, when offline, it is the opposite.

5 years agoCatch all exceptions in JS function updateUI
Michal [Wed, 15 Aug 2018 10:14:06 +0000 (12:14 +0200)]
Catch all exceptions in JS function updateUI

It fails when offline data is processed. It is important that offline
data are processed entirely and only once. If the code crashes in the
middle, due to an exception, the same offline queue will be replayed
next time, causing some coffees to be accounted multiple times and
some maybe never accounted.

5 years agoUse new data structure for offline-collected data
Michal [Wed, 15 Aug 2018 10:14:06 +0000 (12:14 +0200)]
Use new data structure for offline-collected data

The data is now stored in an array. For details, see commit
985405cd4345315d0502fe9e75ef879ad0c452b3 in mt-apps repository.

5 years agoRemove commented out code
Michal [Wed, 15 Aug 2018 10:14:06 +0000 (12:14 +0200)]
Remove commented out code

5 years agoImprove log messages
Michal Sojka [Thu, 16 Aug 2018 13:41:09 +0000 (15:41 +0200)]
Improve log messages

5 years agoReplace loggedIn with id_user
Michal Sojka [Thu, 16 Aug 2018 09:51:43 +0000 (11:51 +0200)]
Replace loggedIn with id_user

Now, when we have the id_user variable, the value loggedIn is not
needed anymore, because its value corresponds to whether the id_user
is set or not.

5 years agoImprove the last commit
Michal Sojka [Thu, 16 Aug 2018 09:46:55 +0000 (11:46 +0200)]
Improve the last commit

- Move id_user variable to where other variables are defined and
  document it.
- Set its value in the login() function. All other activities related
  to logging in are in that function, so I don't see a reason, why
  this should be outside.
- Unset this variable in addCoffee() and logout(). We should not need
  it after these events.

5 years agoSave id user local for add coffee
Tomas Prochazka [Wed, 15 Aug 2018 12:45:18 +0000 (14:45 +0200)]
Save id user local for add coffee

Related to commit 0a3365605be571d23e78b9cc14b014aeee8ec15d

5 years agoUse button element instead of input
Michal Sojka [Wed, 15 Aug 2018 10:14:06 +0000 (12:14 +0200)]
Use button element instead of input

It seems that the web browser on the terminal does not understand '\n' in
value attribute so I hope that it will understand '<br>' in button's
content.

5 years agoWhen the server goes offline, try to teload the page automatically
Michal Sojka [Tue, 14 Aug 2018 23:04:27 +0000 (01:04 +0200)]
When the server goes offline, try to teload the page automatically

5 years agoFix the data log in offline server mode
Tomas Prochazka [Tue, 14 Aug 2018 20:11:38 +0000 (22:11 +0200)]
Fix the data log in offline server mode

Retrieve data JSON in the correct order.
JSON are sorted by the key (date), when they were stored.

5 years agoAttempt to sanitize the JS code + fix few bugs
Michal Sojka [Tue, 14 Aug 2018 22:38:17 +0000 (00:38 +0200)]
Attempt to sanitize the JS code + fix few bugs

The problems solved by this commit:

- When another user logs in during logout timeout, he was logged out
  automatically, even before choosing a coffee.

- Logout timer was not shown always when it should. After choosing a
  coffee, the timer was shown for a while. Then, after the user page
  was reloaded from the server, the timer disappeared and after an
  elapsed second, the timer was shown again.

- Local debug area was not shown and hidden consistently.

The first problem was resolved by canceling the logout timer after
login. The last two problems were fixed by centralizing of the UI
updates to a single function, which does the update based on the value
of state variables.

5 years agoRemove unnecessary condition
Michal Sojka [Tue, 14 Aug 2018 21:54:01 +0000 (23:54 +0200)]
Remove unnecessary condition

The same condition is already in addCoffee()

5 years agoSimplify timer-triggered logout call
Michal Sojka [Tue, 14 Aug 2018 21:28:34 +0000 (23:28 +0200)]
Simplify timer-triggered logout call

5 years agoUnify logout button spelling and layout
Michal Sojka [Tue, 14 Aug 2018 21:25:04 +0000 (23:25 +0200)]
Unify logout button spelling and layout

Changes:

- Logout button text is always in small caps (both initial value from
  HTML and modified value from JavaScript).
- Position of the "logout" text is always the same - when we add a
  line with seconds counter below, we have to add also a line above.

5 years agoAdd function automatic logout
Tomas Prochazka [Tue, 14 Aug 2018 07:47:57 +0000 (09:47 +0200)]
Add function automatic logout

If the user makes a coffee, the user will logout automatically in 10 second.

5 years agoDo not show zeros in the taste graph
Michal Sojka [Fri, 10 Aug 2018 11:56:56 +0000 (13:56 +0200)]
Do not show zeros in the taste graph

5 years agoReformat
Michal Sojka [Fri, 10 Aug 2018 11:50:13 +0000 (13:50 +0200)]
Reformat

5 years agoShowing the total number different coffee flavor in chart
Tomas Prochazka [Fri, 10 Aug 2018 11:40:29 +0000 (13:40 +0200)]
Showing the total number different coffee flavor in chart

5 years agoFix axis-Y only integer numbers show
Tomas Prochazka [Fri, 10 Aug 2018 10:35:48 +0000 (12:35 +0200)]
Fix axis-Y only integer numbers show

5 years agoReformat with autopep8
Michal Sojka [Fri, 10 Aug 2018 09:04:21 +0000 (11:04 +0200)]
Reformat with autopep8

5 years agoFix color graph history for different flavors coffee
Tomas Prochazka [Fri, 10 Aug 2018 07:02:37 +0000 (09:02 +0200)]
Fix color graph history for different flavors coffee

5 years agoPlot x axis labels in local variable
Jiri Hubacek [Fri, 10 Aug 2018 08:58:56 +0000 (08:58 +0000)]
Plot x axis labels in local variable

5 years agoIncrease the size of the logout button
Jiri Hubacek [Thu, 9 Aug 2018 14:09:51 +0000 (14:09 +0000)]
Increase the size of the logout button

5 years agoUse day abbreviations instead of numbers for days
Jiri Hubacek [Thu, 9 Aug 2018 13:26:20 +0000 (13:26 +0000)]
Use day abbreviations instead of numbers for days

The originally meant x axis description may be accomplished by using

    plt.xticks(range(len(days)), days)

instead of

    plt.xticks(range(len(days)), xdays)

5 years agoMake on-screen buttons work only once after card swipe
Michal Sojka [Wed, 8 Aug 2018 11:36:32 +0000 (13:36 +0200)]
Make on-screen buttons work only once after card swipe

Now, even if a user does not log out, there is no way for somebody
else to charge coffees on their behalf.

5 years agoBetter guidance for users
Michal Sojka [Wed, 8 Aug 2018 07:58:39 +0000 (09:58 +0200)]
Better guidance for users

5 years agoDeploy without pushing to central server
Michal Sojka [Wed, 8 Aug 2018 11:11:59 +0000 (13:11 +0200)]
Deploy without pushing to central server

This makes testing easier.

5 years agoShow public address of git repository
Michal Sojka [Wed, 8 Aug 2018 07:47:08 +0000 (09:47 +0200)]
Show public address of git repository

5 years agoUpdate 'Hack me' section
Michal Sojka [Tue, 7 Aug 2018 13:27:50 +0000 (15:27 +0200)]
Update 'Hack me' section

5 years agoAdd Makefile with deploy target
Michal Sojka [Tue, 7 Aug 2018 13:26:18 +0000 (15:26 +0200)]
Add Makefile with deploy target

5 years agoUpdate html
Michal Sojka [Tue, 7 Aug 2018 13:23:52 +0000 (15:23 +0200)]
Update html

5 years agoMake figures fit on screen
Michal Sojka [Tue, 7 Aug 2018 13:23:30 +0000 (15:23 +0200)]
Make figures fit on screen

5 years agoUpdate web pages a bit
Michal Sojka [Tue, 7 Aug 2018 13:07:11 +0000 (15:07 +0200)]
Update web pages a bit

5 years agoOlder sqlite complains about 'true' in expressions - don't use it
Michal Sojka [Tue, 7 Aug 2018 13:05:24 +0000 (15:05 +0200)]
Older sqlite complains about 'true' in expressions - don't use it

5 years agoFix type errors when drawing bar graph
Michal Sojka [Tue, 7 Aug 2018 13:03:09 +0000 (15:03 +0200)]
Fix type errors when drawing bar graph

DB returns strings as day numbers, but matplotlib seems to want integers.

5 years agoMake un run under WSGI
Michal Sojka [Tue, 7 Aug 2018 11:17:51 +0000 (13:17 +0200)]
Make un run under WSGI

5 years agoclean slate
Jiří Matěják [Thu, 24 May 2018 22:59:17 +0000 (00:59 +0200)]
clean slate