aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/mutuals.md14
-rw-r--r--docs/sessions.md43
-rw-r--r--docs/status.md22
3 files changed, 35 insertions, 44 deletions
diff --git a/docs/mutuals.md b/docs/mutuals.md
index 39ee76f..eeaa23d 100644
--- a/docs/mutuals.md
+++ b/docs/mutuals.md
@@ -1,20 +1,18 @@
-mutual_friends.py
-=================
+vk-mutuals
+==========
Learn who your ex and her new boyfriend are both friends with.
Usage
-----
-Run from the top-level directory using `python -m`:
-
- > python -m bin.mutual_friends -h
- usage: mutual_friends.py [-h] [-f {csv,json}] [-o PATH] UID [UID ...]
+ > vk-mutuals -h
+ usage: vk-mutuals [-h] [-f {csv,json}] [-o PATH] UID [UID ...]
...
For example (using made up user IDs/"screen names"),
- > python -m bin.mutual_friends john.doe jane.doe
+ > vk-mutuals john.doe jane.doe
89497105,John,Smith
3698577,Jane,Smith
@@ -24,7 +22,7 @@ Smith" and "Jane Smith", whose user IDs are 89497105 and 3698577 respectively.
The output format is CSV (comma-separated values) by default.
You can also get a JSON document:
- > python -m bin.mutual_friends --format json john.doe jane.doe
+ > vk-mutuals --format json john.doe jane.doe
[
{
"uid": 89497105,
diff --git a/docs/sessions.md b/docs/sessions.md
index 7c9d4d4..882f010 100644
--- a/docs/sessions.md
+++ b/docs/sessions.md
@@ -1,30 +1,27 @@
-online_sessions.py
-==================
+vk-sessions
+===========
View/visualize the amount of time people spend online.
Usage
-----
-Run from the top-level directory using `python -m`:
-
```
-> python -m bin.online_sessions -h
-usage: online_sessions.py [-h] [-g {user,date,weekday,hour}]
- [-i {csv,log,null}] [-o {csv,json,plot}]
- [-a TIME_FROM] [-b TIME_TO]
- [input] [output]
+> vk-sessions -h
+usage: vk-sessions [-h] [-g {user,date,weekday,hour}] [-i {csv,log,null}]
+ [-o {csv,json,plot}] [-a TIME_FROM] [-b TIME_TO]
+ [input] [output]
```
This script additionally requires [matplotlib] to be installed.
-Analyze the database produced by [track_status.py] and calculate the total
-amount of time people spent online.
-For example (assuming the database in "db.csv" was generated by
-[track_status.py] before):
+Analyze the database produced by [vk-status] and calculate the total amount of
+time people spent online.
+For example (assuming the database in "db.csv" was generated by [vk-status]
+before):
```
-> python -m bin.online_sessions db.csv
+> vk-sessions db.csv
89497105,John,Smith,john.smith,0:12:31
3698577,Jane,Smith,jane.smith,1:34:46
```
@@ -36,7 +33,7 @@ The output format is CSV (comma-separated values) by default.
You can also get a JSON document:
```
-> python -m bin.online_sessions --output-format json db.csv
+> vk-sessions --output-format json db.csv
[
{
"uid": 89497105,
@@ -63,7 +60,7 @@ For example (assuming that both Jane and Joe spent their time online on Friday,
June 17, 2016).
```
-> python -m bin.online_sessions --output-format json --group-by date db.csv
+> vk-sessions --output-format json --group-by date db.csv
[
{
"date": "2016-06-17",
@@ -73,7 +70,7 @@ June 17, 2016).
```
```
-> python -m bin.online_sessions --output-format csv --group-by weekday db.csv
+> vk-sessions --output-format csv --group-by weekday db.csv
Monday,0:00:00
Tuesday,0:00:00
Wednesday,0:00:00
@@ -84,7 +81,7 @@ Sunday,0:00:00
```
```
-> python -m bin.online_sessions --group-by hour db.csv
+> vk-sessions --group-by hour db.csv
0:00:00,0:00:00
1:00:00,0:00:00
2:00:00,0:00:00
@@ -117,25 +114,25 @@ To produce a plot, pass `plot` as the `--output-format` parameter value and add
a file path to write the image to.
```
-> python -m bin.online_sessions --output-format plot db.csv user.png
+> vk-sessions --output-format plot db.csv user.png
```
![user.png]
```
-> python -m bin.online_sessions --output-format plot --group-by date db.csv date.png
+> vk-sessions --output-format plot --group-by date db.csv date.png
```
![date.png]
```
-> python -m bin.online_sessions --output-format plot --group-by weekday db.csv weekday.png
+> vk-sessions --output-format plot --group-by weekday db.csv weekday.png
```
![weekday.png]
```
-> python -m bin.online_sessions --output-format plot --group-by hour db.csv hour.png
+> vk-sessions --output-format plot --group-by hour db.csv hour.png
```
![hour.png]
@@ -148,7 +145,7 @@ The values must be in the `%Y-%m-%dT%H:%M:%SZ` format (a subset of ISO 8601).
All dates and times are in UTC.
[matplotlib]: http://matplotlib.org/
-[track_status.py]: track_status.md
+[vk-status]: status.md
[user.png]: images/user.png
[date.png]: images/date.png
diff --git a/docs/status.md b/docs/status.md
index 8fe0746..b4c197d 100644
--- a/docs/status.md
+++ b/docs/status.md
@@ -1,22 +1,20 @@
-track_status.py
-===============
+vk-status
+=========
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 ...]
+ > vk-status -h
+ usage: vk-status [-h] [-t SECONDS] [-O] [-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
+ > vk-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.
@@ -30,11 +28,9 @@ For example (using made up user IDs/"screen names"),
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!
+[vk-sessions], specify the path to a database using the `--output` parameter.
-[online_sessions.py]: online_sessions.md
+[vk-sessions]: sessions.md
See also
--------