Skip to content

Commit 9d93857

Browse files
committed
docs(sync): improved README for aw-sync with basic MVP usage instructions
1 parent d53155b commit 9d93857

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

aw-sync/README.md

+23-2
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,35 @@ Works by syncing local buckets with a special folder, which in turn should be sy
88

99
## Usage
1010

11-
TODO: Write usage instructions for how to use with a normal testing/staging (5666) instance, to actually sync between devices.
11+
NOTE: Basic usage not quite ready yet, see the below testing sections for MVP usage.
1212

1313
```
1414
cargo run --bin aw-sync-rust -- --port 5666 --help
1515
```
1616

17+
## Testing with real data on a testing instance
1718

18-
## Testing
19+
To test syncing real events to a sync folder which can then be pulled from, we will use some helper scripts to do the following:
20+
21+
1. `./test-sync.sh`
22+
- Creates a sync directory which we will sync with Syncthing/Dropbox/rclone/whatever
23+
- By default `~/ActivityWatchSync`
24+
- Creates a datastore for the current host in the sync folder
25+
- Sync all local buckets of interest (window & afk buckets, by default) to the sync dir
26+
27+
2. `./test-server.sh`
28+
- Starts a testing server **on port 5667** using a temporary directory as datastore (`/tmp/...`)
29+
30+
3. `./test-import-sync.sh`
31+
- Imports all the events from sync folder into the testing server on port 5667
32+
33+
4. You should now have all events synced to a local testing instance!
34+
- You can now set up syncing for `~/ActivityWatchSync` on more devices, and on each one use the script `./test-sync.sh` to push their events into the sync folder, then run `./test-import-sync.sh` on the device where you have the testing instance to update the data there.
35+
36+
In the end, You should get something like this: https://twitter.com/ErikBjare/status/1519399784234246147
37+
38+
39+
## Testing with fake data
1940

2041
**Note:** this documents usage for testing, it is not yet ready for production usage.
2142

0 commit comments

Comments
 (0)