Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
See https://github.com/mozilla/bleach/issues/698
nh3 is a small wrapper around https://crates.io/crates/ammonia - more
Rust code in Fietsboek! \o/
The default seems to be to strip unknown tags instead of replace them
with htmlentities, which is fine. Then the <script> tags are completely
gone.
|
|
|
|
Considering this is the example/"official" image, it makes sense to
support the big (open source) databases PostgreSQL and MySQL/MariaDB out
of the box.
|
|
|
|
|
|
|
|
|
|
I'm not too happy with the longest/shortest time/duration words (neither
in English nor in German), but those will do for now until we can think
of better ones.
|
|
Python seems to do fine, but pylint complains (probably rightfully,
since the tests do not represent packages). We lose type hinting for the
playwright_helper, but there's probably a better way to do it in the
future.
|
|
They caused issues because they might not have created the database
tables or the data directory. Since the cleanup job runs globally after
every test, it should take that into consideration and not error out.
|
|
I'd like to have more, but this is a start (and already caught some
errors, see the last two commits).
|
|
Now that round_to_seconds can actually return 0, we need to catch this
case.
|
|
It was ovious that this is broken when you try to round "0s" to
second-level granularity, and you end up with "1s". The problem comes
from the fact that we use the integer divison when checking whether we
should round up or down, but then also use strict inequality.
To fix this, we now also round down if the second_offset is equal to the
halfway point (which in the case of second-level granularity is 0).
|
|
Otherwise everyone can just access any profile.
|
|
We copied the factory method from Track, but forgot to change some of
the words. Now the code fits better with what the function is doing.
As a bonus, pylint no longer complains about a duplicate method.
|
|
We basically do the same hacky trick in two different places, so maybe
we should put it into a separate function, test it, and if a better
implementation arises, swap it.
|
|
|
|
Otherwise it'll show progress bars.
|
|
|
|
|
|
This would otherwise happen if e.g. the user has the page open, the
SQLite file is deleted, the user then activates the overlay layer, and
the sqlite3.connect() creates the database.
|
|
|
|
This might be helpful to see some errors early.
|
|
|
|
|
|
|
|
|
|
With fietsboek.ini, those commands become very ergonomic to use (as long
as the user has the configuration at the default place)
|
|
|
|
|
|
This makes it easy to use the scripts without always having to specify
-c.
The error message could be a bit better if fietsboek.ini is not found
and -c is not given, maybe we can fix that later.
|
|
|
|
The reason for that is that we want to add "longest track"/"shortest
track" soon, and the profile() function is getting a bit long
|
|
|
|
|
|
This makes it a bit easier to generate heatmaps, but at the moment, it
only works manually.
The "long-term" goal is to have fietscron generate heatmaps on a regular
basis.
|
|
With the previous logic, we only counted those that the user themselves
uploaded.
|
|
|
|
|