aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/quarg/quassel (follow)
Commit message (Collapse)AuthorAgeLines
* Perform initial linting with ruffWolfgang Müller2023-03-30-1/+3
|
* Get rid of pylint directivesWolfgang Müller2023-03-30-2/+0
| | | | Since we are migrating to ruff, these are not used anymore.
* formatter: Use custom time format when printing message timestampsWolfgang Müller2021-05-03-3/+4
| | | | | | | | | | | | Up until now we were relying on isoformat() to format timestamps when printing messages, since that was a simple shortcut to a well-known format. With the addition of timezone support, however, isoformat() started adding the timezone offset to the timestamp. This makes timestamps unnecessarily verbose. This commit has the formatter use a custom ISO 8601-esque time format instead which restores the behaviour previous to the introduction of timezones.
* Remove the INFO message typeWolfgang Müller2021-05-03-2/+2
| | | | | | Quassel uses this message type only for very rare and mostly irrelevant informational messages that users will most likely not be wanting to search for.
* Handle timezones correctlyWolfgang Müller2021-05-02-1/+3
| | | | | | | | | | | | | | | | | | | | Quassel uses UTC message timestamps in its database, but does not save any timezone information along with them. Up until now, we were reading those timestamps from the database naively - resulting in datetime objects that could not be identified as UTC. The same happened with timestamps we got from dateutil.isoparse. If the user did not specify an offset explicitly, the timestamp would be parsed and passed to the program "as is", effectively being interpreted as UTC because they were compared to database timestamps. This commit will ensure that the correct timezone is saved for every datetime object we encounter. Timestamps from the database are marked as UTC. If the user does not explicitly specify an offset, the timestamp is assumed to be in local time. Furthermore, when printing out message timestamps, make sure to convert them to the user's local timezone first.
* types: Ignore unused or nonsensical types and flagsWolfgang Müller2021-04-28-10/+9
| | | | | | | | | | | | | | | As this program interacts with quassel's database only, it does not have access to any state the UI carries. Some types (such as DAYCHANGE, IGNORED, BACKLOG, GROUP) seem to not be represented in the database at all, most likely only set on data structures in memory by the quasselclient application. Some others make no real sense to include in an application like this, which is more focused on human-readable messages and circumstances. For example, INVALID, REDIRECTED, SERVERMSG, etc are all of less concern to the average user than, say, matching on nicknames or buffers. Therefore, ignore all of these until we find a good use for them.
* formatter: Make parameter name for format_netsplit clearerWolfgang Müller2021-04-28-6/+6
|
* formatter: Implement truncation of joined/quit users in netsplitsWolfgang Müller2021-04-28-13/+14
| | | | | | | The list of users that have quit or joined after a netsplit can become quite large. Quassel itself cuts reporting off after printing 15 users, so let's follow that. Note that this will not affect queries - the search is performed against the whole netsplit message.
* formatter: Use functools.partial to simplify the formatterWolfgang Müller2021-04-28-32/+9
| | | | | | | | Instead of defining a function for every message format that trivially returns an f-string, have a generic partially-applied helper function that applies the Message object as a dictionary to the format() function. That way, we can inline the formatter definitions directly in the FORMATTERS dictionary.
* Initial prototypeWolfgang Müller2021-04-28-0/+190