-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: more progress on sync, added basic README
- Loading branch information
Showing
5 changed files
with
241 additions
and
29 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
aw-sync-rust | ||
============ | ||
|
||
Synchronization for ActivityWatch. | ||
|
||
Works by syncing local buckets with a special folder, which in turn should be synchronized by rsync/Syncthing/Dropbox/whatever. | ||
|
||
|
||
## Usage | ||
|
||
**Note:** this documents usage for testing, it is not yet ready for production usage. | ||
|
||
### Pushing to the sync directory | ||
|
||
First start your aw-server instance. | ||
|
||
For example: | ||
|
||
```sh | ||
PORT=5667 | ||
cargo run --bin aw-server -- --testing --port $PORT --dbpath test-$PORT.sqlite --device-id $PORT --no-legacy-import | ||
``` | ||
|
||
You can create some test data by opening `http://localhost:5667/#/stopwatch` and creating a few events. | ||
|
||
Then run `cargo run --bin aw-sync-rust` to sync your instance's buckets with the target directory. | ||
|
||
### Pulling from the sync directory | ||
|
||
Now to sync things back from the sync directory onto another instance. First, lets start another instance: | ||
|
||
``` | ||
PORT=5668 | ||
cargo run --bin aw-server -- --testing --port $PORT --dbpath test-$PORT.sqlite --device-id $PORT --no-legacy-import | ||
``` | ||
|
||
Now run `aw-sync-rust` again. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.