aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-07-19fix track_id/id mismatch in add-comment routeDaniel Schadt
2022-07-19no round borders in image previewDaniel Schadt
2022-07-18remove images when removing a trackDaniel Schadt
2022-07-18update changelogDaniel Schadt
2022-07-18update message catalogsDaniel Schadt
2022-07-18give tests a temporary data dirDaniel Schadt
2022-07-18update documentation with new data dirDaniel Schadt
2022-07-18implement image uploadDaniel Schadt
2022-07-18set tox up to test with pypy (and optionally lxml)Daniel Schadt
2022-07-17run pylint-tests in gitlab CIDaniel Schadt
2022-07-17run pylint on the test files as wellDaniel Schadt
2022-07-17Merge branch 'multi-download'Daniel Schadt
2022-07-17add tests for archive downloadDaniel Schadt
2022-07-17make sure all tracks are found in the archiveDaniel Schadt
2022-07-17track: don't fail when id is not setDaniel Schadt
This is just debug logging information, but accessing self.id for an object that is not in the database raises an error, because self.id is None and %d cannot format None. In this case, we simply use -1 as id instead.
2022-07-16actually implement the multi download buttonDaniel Schadt
2022-07-16remove MyTourbook timezone guessingDaniel Schadt
It turns out that the mt:TourStartTime is also given in UTC, and therefore cannot be used to get the timezone offset. The problem was that my local computer's timezone was the same as the tour timezone, so by the magic of Python's datetime.datetime.fromtimestamp (and the date CLI util), I did not notice that the timestamp actually represents UTC. Sadly, it currently looks like there is no way to extract the time zone from a MyTourbook export.
2022-07-16enable gitlab CIDaniel Schadt
2022-07-16fix lint issuesDaniel Schadt
2022-07-16add tox to run tests & lintersDaniel Schadt
2022-07-16include markdown files in MANIFESTDaniel Schadt
This is used for the README and the CHANGELOG, as they are read during setup.py. If we do not include them, building a source distribution will fail.
2022-07-14[wip] implement multi track downloadDaniel Schadt
2022-07-11ignore empty IDs when retrieving multipleDaniel Schadt
This is for example useful for the template inputs. They should not be sent due to the "disabled" attribute, but we never know what browsers are doing, therefore we stay defensive. The test case already has to do extra steps to prevent those from being sent.
2022-07-11add integration tests for uploadingDaniel Schadt
2022-07-11don't overwrite date after editingDaniel Schadt
A few lines above the change, we set track.date to a timezone-aware date. We shouldn't overwrite it with a naive datetime right after.
2022-07-11better styling for friend buttons in track editDaniel Schadt
The big button with the large padding looked kind of silly, so now the button is slimmer and the text is actually centered.
2022-07-11move user menu (login, logout, ...) to right sideDaniel Schadt
2022-07-09add tests for the login formDaniel Schadt
2022-07-09add docs on translation workDaniel Schadt
2022-07-09add a "Delete" button to tracksDaniel Schadt
2022-07-09save timestamps in UTCDaniel Schadt
For the most part, we want to know the instant of when something happened. To stay consistent, we save everything as UTC. For internal things, this doesn't really matter - we just need to know the timezone to be able to compare the values (like "is the upload older than 5 days"). For user-facing things (like comments), we still want to store the UTC time and then convert it to the user's preferred timezone on display.
2022-07-09Bump version to 0.1.0v0.1.0Daniel Schadt
2022-07-09fix CSRF token mismatch on password reset formsDaniel Schadt
2022-07-09fix "Invalidate Share" actionDaniel Schadt
After the change to pyramid contexts, this parameter is now track_id. This was missed back then.
2022-07-09add CSRF protection for actions that modify dataDaniel Schadt
2022-07-09take title suggestion from track nameDaniel Schadt
Sometimes, the GPX itself does not have a name set, but the single tracks might have.
2022-07-09start writing docs properly, not in the READMEDaniel Schadt
2022-07-08better loading in util.read_localized_resourceDaniel Schadt
The other code kinda assumed that we can turn the resource path into a package by replacing the slashes (path separators) with dots. That turned out to not really work in the end, especially if the resource subfolders don't have a __init__.py in there. This uses the .files() API (available in Python 3.9 and backported in importlib_resources) to better handle folders in the resources.
2022-07-07add a text if no tracks are browsableDaniel Schadt
2022-07-07wire jinja2 filters in codeDaniel Schadt
Those things are not really a configuration thing that changes, rather they are part of how the code of the application works. As such, it doesn't make too much sense to require those configuration values. Instead, we now add those filters programatically. This also ensures that the filters are the same between development, production and testing environment.
2022-07-07add tests for util.guess_gpx_timezoneDaniel Schadt
2022-07-07add text to the home pageDaniel Schadt
2022-07-07start adding some unit testsDaniel Schadt
2022-07-06better timezone handling for track datesDaniel Schadt
2022-07-06update styles for password reset formsDaniel Schadt
2022-07-06use ACLs for upload authorizationDaniel Schadt
2022-07-06move track authorization to ACLsDaniel Schadt
This cuts down on the code duplication and makes sure that we use the same algorithm everywhere. It also keeps the view code cleaner.
2022-07-05start to use pyramid context factoriesDaniel Schadt
This puts the handling of retrieving the right database object at a single place, which makes it easier to use from the different routes, and unifies the error handling (some places for example lacked the check to see if the returned object is None). It is also the first step to a better permission system based on Pyramid's ACLs, as we can now implement those on the object. This will make the code even better and even more uniform, as we don't need to do the permission checks manually anymore.
2022-07-03fix <strong> elementDaniel Schadt
The main issue was this: Our body has a slightly lower font weight of 300, so "bolder" works out to be 400 - which is a barely noticable increase. The reason for this is that "bolder" (and "lighter") are relative font weights, but they only work relative to certain "breakpoints" - and 300 was just a notch below the next breakpoint of 400 [1]. By setting the font-weight of "strong" to 700 directly, we get a noticable boldness increase instead, though we might tone it down just a notch in the future. In order to prevent font issues in the future, we've now also included all proper variants of OpenSans, so that all font styles are available to us, using the webfonts helper tool [2]. [1]: https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight#meaning_of_relative_weights [2]: https://google-webfonts-helper.herokuapp.com/fonts
2022-07-02allow images in markdown descriptionsDaniel Schadt
This might need some fine tuning in the future