From f1a4bf0ce674b0b8ea3f05bd2d3605e19097244a Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 4 May 2021 00:50:07 +0300 Subject: README: update --- docs/status.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 docs/status.md (limited to 'docs/status.md') diff --git a/docs/status.md b/docs/status.md new file mode 100644 index 0000000..8fe0746 --- /dev/null +++ b/docs/status.md @@ -0,0 +1,44 @@ +track_status.py +=============== + +Track when people go online/offline. + +Usage +----- + +Run from the top-level directory using `python -m`: + + > python -m bin.track_status -h + usage: track_status.py [-h] [-t SECONDS] [-l PATH] [-f {csv,log,null}] + [-o PATH] + UID [UID ...] + ... + +For example (using made up user IDs/"screen names"), + + > python -m bin.track_status john.doe jane.smith + [2016-06-18 01:43:34] John Doe is ONLINE. + [2016-06-18 01:43:34] John Doe was last seen at 2016-06-18 01:33:58+03:00 using the official iPhone app. + [2016-06-18 01:43:34] Jane Smith is OFFLINE. + [2016-06-18 01:43:34] Jane Smith was last seen at 2016-06-18 01:15:47+03:00 using the web version (or an unrecognized app). + [2016-06-18 01:59:09] Jane Smith went ONLINE. + [2016-06-18 01:59:09] Jane Smith was last seen at 2016-06-18 01:59:07+03:00 using the official Android app. + [2016-06-18 02:10:00] John Doe went OFFLINE. + [2016-06-18 02:10:00] John Doe was last seen at 2016-06-18 01:54:58+03:00 using the official iPhone app. + ... + +By default, the script produces a human-readable log. +Use the `--log` parameter to write the log to a file. +If you want to record when people go online/offline for further analysis using +[online_sessions.py], specify the path to a database using the `--output` +parameter. +Be careful: if the file already exists, it will be overwritten! + +[online_sessions.py]: online_sessions.md + +See also +-------- + +* [License] + +[License]: ../README.md#license -- cgit v1.2.3