Commit Graph

36 Commits

Author SHA1 Message Date
Thor77 4c872930db
Update pendulum to 2.1.2 2023-01-14 19:02:53 +01:00
Thor77 5ea2f6ab3d Remove extra lines after encoding header 2018-02-01 20:49:23 +01:00
Thor77 3acf282470 Don't drop current nick in prepare_clients
because that's already handled in the Client.nick-property now
2017-09-08 15:39:39 +02:00
Thor77 edff1e956d Optionally Pendulum.diff_for_humans instead of frmttime
for relative last seen time (default)

* introduce --lastseenabsolute
* introduce tsstats.template.render_servers(lastseen_relative=True)
2017-07-07 14:23:10 +02:00
Thor77 65a8379261 Use pendulum instead of plain datetime
because it is more intuitive to use and doesn't require the
tz_aware_datetime-workaround.
2017-07-07 14:22:24 +02:00
Thor77 3d469ce28c Sort imports 2017-06-02 23:34:33 +02:00
Thor77 4adfb9cfc1 Make all datetime-objects timezone-aware
Because the tool is using utc-timestamps everywhere, this emphasizes
this fact (by default) in the output.
If you don't want timezones behind each datetime in your output, just
remove the "%Z" from the `datetimeformat`.

Fix #9
2017-02-16 22:44:51 +01:00
Thor77 22f6402bce Add nick-history functionality
hover a nickname to show previous nicks
2017-02-11 22:14:34 +01:00
Thor77 8d2e0c1345 Add funcdoc for tsstats.template.prepare_clients 2016-11-24 22:57:56 +01:00
Thor77 cb449558e0 Fix onlinetime_threshold not used 2016-11-23 21:23:20 +01:00
Thor77 062da49244 Rename render_template to render_servers
also includes refactoring for multiserver-output

* now accepts list of servers instead of clients as input
* index.jinja2 is now the default template
2016-11-22 23:02:26 +01:00
Thor77 51225175ce Refactor clients preperation into prepare_clients 2016-11-19 22:50:28 +01:00
Thor77 117dff2486 Use TemplateStream.dump for writing template
instead of manually opening a file and writing to it
2016-11-18 22:11:14 +01:00
Thor77 273a01bec6 Rename default template to stats.jinja2
from template.html
2016-11-18 21:52:30 +01:00
Thor77 9a38e0e7cb Rename template_path to template 2016-11-18 21:46:38 +01:00
Thor77 b8d2df4650 Load templates from templates-subdirectory
instead of package-root
2016-11-18 21:42:27 +01:00
Thor77 4ac27143a6 Add onlinetime_threshold-arg to render_template
and filter_threshold-function to tsstats.utils.
Only display clients in onlinetime-section with a onlinetime
greater than onlinetime_threshold seconds
2016-11-11 18:40:30 +01:00
Thor77 679473f7b4 Use utcnow for creation_time
because utc timestamps are used in logs and for online_dc, too.
2016-11-04 20:05:02 +01:00
Thor77 7cd057d3c5 Write template-output as utf-8 2016-11-02 21:24:19 +01:00
Thor77 d1627d369f Add debug-logging-output to tsstats.template.render_template
* bump version to 0.11.1
2016-09-18 21:51:24 +02:00
Thor77 ddd220d629 Include datetime_fmt in funcdoc of tsstats.template.render_template 2016-09-17 22:49:05 +02:00
Thor77 1ecf24b9b2 Add datetime_fmt-arg to tsstats.template.render_template
Specify a custom datetime-format for various datetime-renderings (creation-time, last
online)
2016-09-17 22:38:30 +02:00
Thor77 bbd2ff7a46 Add template_path-kwarg to tsstats.template.render_template 2016-08-10 22:47:19 +02:00
Thor77 60bdcb7aab add credit and render-date/time to template-footer 2016-07-04 21:14:29 +02:00
Thor77 477ca7d739 add timezone to output of tsstats.template.render_template.frmttime 2016-07-04 21:11:34 +02:00
Thor77 12a86539d2 convert onlinetime to int before converting to text
* => don't display milliseconds in text
2016-06-12 18:11:27 +02:00
Thor77 e3df7f8185 template-filter frmttime just returns formatted timestamp now
* instead of converting it to localtime before
2016-06-12 18:02:47 +02:00
Thor77 32234b4886 rename template-filter fmttime to frmttime 2016-06-12 17:55:03 +02:00
Thor77 c3dabb9082 give .total_seconds() to sort_clients instead of datetime.timedelta 2016-06-12 17:54:32 +02:00
Thor77 89906d04c7 expect key as lambda in tsstats.utils.sort_clients
* kwarg renamed to key_l (from key)
* add possibility to modify attribute
2016-06-12 17:36:12 +02:00
Thor77 fe29b6f050 refactor template-loading
* use ChoiceLoader([PackageLoader, FileSystemLoader]) instead of FileSystemLoader
* add PackageLoader to allow template-access on egg-installations
* use correct way to get filesystem-path to package (dirname(__file__))
* remove superflous template_name-arg from tsstats.template.render_template
* bump version to 0.6.0
2016-06-07 17:51:28 +02:00
Thor77 52a05acdab add source-encoding (utf-8) to all files 2016-06-07 17:42:53 +02:00
Thor77 8ca23e0115 add documentation to tsstats.{config,log,template,utils}.* 2016-05-30 20:23:03 +02:00
Thor77 216bedc38f refactor tsstats.client.Clients
* use collections.MutableMapping as base
* use one dict to store all types of Clients
* don't use implicit += but explicit .setdefault in tsstats.log for client-adding
* give all clients to sort_clients in tsstats.template
* remove now unneccessary clients-assignment in tsstats.utils.sort_clients
2016-05-18 22:50:23 +02:00
Thor77 d836b807be move logging-setup into __init__.py and use one central logger-object 2016-05-10 22:50:34 +02:00
Thor77 a25a596d02 split tsstats.py into package with multiple files 2016-05-08 21:32:37 +02:00