Skip to content

Commit aeb1a7f

Browse files
committed
a bunch of changes to documentation
1 parent 4529ad5 commit aeb1a7f

File tree

5 files changed

+98
-35
lines changed

5 files changed

+98
-35
lines changed

architecture.rst

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
============
2+
Architecture
3+
============
4+
5+
Here we hope to clarify the architecture of ActivityWatch for you. Please file an issue or pull request if you think something is missing.
6+
7+
Modules
8+
=======
9+
10+
Server
11+
------
12+
13+
Known as aw-server, it handles storage and retrieval of all activities/entries in buckets. Usually there exists one bucket per watcher.
14+
15+
Clients
16+
-------
17+
18+
The server doesn't do anything interesting on its own, for that we need clients such as watchers and user interfaces.
19+
Writing these clients is something we've tried to make as easy as possible by creating client libraries with a clear API.
20+
21+
Currently the primary client library is written in Python (known simply as aw-client) but a client library written in JavaScript is on the way and is expected to have the same level of support in the future.
22+
23+
Client libraries:
24+
25+
- aw-client (Python)
26+
- aw-client-js (JavaScript)
27+
28+
Watchers
29+
^^^^^^^^
30+
31+
Since aw-server doesn't do any data collection on it's own, we need watchers that observe the world and sent the data off to aw-server for storage.
32+
33+
Examples of watchers:
34+
35+
- aw-watcher-afk
36+
- aw-watcher-window
37+
38+
User interfaces
39+
^^^^^^^^^^^^^^^
40+
41+
Examples of UIs:
42+
43+
- aw-webui
44+
45+
Libraries
46+
---------
47+
48+
Some of the logic of ActivityWatch is shared across the server and clients, such as the Event model.
49+
Due to this, we've created a common library :code:`aw-core` which includes many of the essentials in ActivityWatch.
50+

extending.rst

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Extending ActivityWatch
2+
=======================
3+
4+
So, you want to do something more with ActivityWatch? Great!
5+
6+
We've tried to make things easy for you (and ourselves) so here's some advice on how to get started.
7+
8+
9+
Collecting more data
10+
--------------------
11+
12+
To do this you'd want to write a so-called watcher. Watchers are small programs that collect data and send it off to the server.
13+
14+
See :doc:`writing-watchers`.
15+
16+
17+
Exporting data programatically
18+
------------------------------
19+
20+
Exporting data is as simple as:
21+
22+
TODO
23+
24+
25+
Writing visualizers
26+
-------------------
27+
28+
Right now, the best way to do this is to simply export the data and transform it yourself to fit the data format you need for your visualization.
29+
In the future however, we will provide a Python library for common transforms to make things easier for you.
30+
31+
32+
33+

features.rst

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Features
2+
========
3+
4+
Here we will document a few features.
5+
6+
.. toctree::
7+
user-interface
8+
pausing-logging
9+
filtering-data

index.rst

+6-14
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,25 @@ Welcome to the ActivityWatch documentation!
88

99
.. _user-docs:
1010
.. toctree::
11-
:maxdepth: 2
11+
:maxdepth: 3
1212
:caption: User documentation
1313

1414
introduction
1515
getting-started
16-
17-
18-
.. _feature-docs:
19-
.. toctree::
20-
:maxdepth: 2
21-
:caption: Feature documentation
22-
23-
user-interface
24-
pausing-logging
25-
filtering-data
16+
features
17+
extending
2618

2719

2820
.. _dev-docs:
2921
.. toctree::
30-
:maxdepth: 2
22+
:maxdepth: 3
3123
:caption: Developer documentation
3224

33-
api-reference
25+
architecture
3426
installing-from-source
27+
api-reference
3528
development
3629
writing-watchers
37-
modules
3830
rest
3931

4032

modules.rst

-21
This file was deleted.

0 commit comments

Comments
 (0)