From ab3fd1c96f5f4551485670979b06875d8f57a8ac Mon Sep 17 00:00:00 2001 From: Demmie <2e3s19@gmail.com> Date: Sun, 14 May 2023 22:02:35 -0400 Subject: [PATCH] Pin AW dependencies to a specific revision --- Cargo.lock | 34 +++++++++++++++++++++++----------- Cargo.toml | 4 ++-- README.md | 12 +++++++++--- 3 files changed, 34 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 45c8dd4..11baad8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -346,9 +346,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "aw-client-rust" version = "0.1.0" -source = "git+https://github.com/ActivityWatch/aw-server-rust.git#49b2026b2b61f8d8d017e93dca1d3754dcfef0d5" +source = "git+https://github.com/ActivityWatch/aw-server-rust#49b2026b2b61f8d8d017e93dca1d3754dcfef0d5" dependencies = [ - "aw-models", + "aw-models 0.1.0 (git+https://github.com/ActivityWatch/aw-server-rust)", "chrono", "gethostname 0.4.1", "reqwest", @@ -359,10 +359,10 @@ dependencies = [ [[package]] name = "aw-datastore" version = "0.1.0" -source = "git+https://github.com/ActivityWatch/aw-server-rust.git#49b2026b2b61f8d8d017e93dca1d3754dcfef0d5" +source = "git+https://github.com/ActivityWatch/aw-server-rust.git?rev=49b2026#49b2026b2b61f8d8d017e93dca1d3754dcfef0d5" dependencies = [ "appdirs", - "aw-models", + "aw-models 0.1.0 (git+https://github.com/ActivityWatch/aw-server-rust.git?rev=49b2026)", "aw-transform", "chrono", "log", @@ -375,7 +375,19 @@ dependencies = [ [[package]] name = "aw-models" version = "0.1.0" -source = "git+https://github.com/ActivityWatch/aw-server-rust.git#49b2026b2b61f8d8d017e93dca1d3754dcfef0d5" +source = "git+https://github.com/ActivityWatch/aw-server-rust.git?rev=49b2026#49b2026b2b61f8d8d017e93dca1d3754dcfef0d5" +dependencies = [ + "chrono", + "log", + "schemars", + "serde", + "serde_json", +] + +[[package]] +name = "aw-models" +version = "0.1.0" +source = "git+https://github.com/ActivityWatch/aw-server-rust#49b2026b2b61f8d8d017e93dca1d3754dcfef0d5" dependencies = [ "chrono", "log", @@ -387,10 +399,10 @@ dependencies = [ [[package]] name = "aw-query" version = "0.1.0" -source = "git+https://github.com/ActivityWatch/aw-server-rust.git#49b2026b2b61f8d8d017e93dca1d3754dcfef0d5" +source = "git+https://github.com/ActivityWatch/aw-server-rust.git?rev=49b2026#49b2026b2b61f8d8d017e93dca1d3754dcfef0d5" dependencies = [ "aw-datastore", - "aw-models", + "aw-models 0.1.0 (git+https://github.com/ActivityWatch/aw-server-rust.git?rev=49b2026)", "aw-transform", "chrono", "fancy-regex", @@ -403,12 +415,12 @@ dependencies = [ [[package]] name = "aw-server" version = "0.12.1" -source = "git+https://github.com/ActivityWatch/aw-server-rust.git#49b2026b2b61f8d8d017e93dca1d3754dcfef0d5" +source = "git+https://github.com/ActivityWatch/aw-server-rust.git?rev=49b2026#49b2026b2b61f8d8d017e93dca1d3754dcfef0d5" dependencies = [ "android_logger", "appdirs", "aw-datastore", - "aw-models", + "aw-models 0.1.0 (git+https://github.com/ActivityWatch/aw-server-rust.git?rev=49b2026)", "aw-query", "aw-transform", "chrono", @@ -434,9 +446,9 @@ dependencies = [ [[package]] name = "aw-transform" version = "0.1.0" -source = "git+https://github.com/ActivityWatch/aw-server-rust.git#49b2026b2b61f8d8d017e93dca1d3754dcfef0d5" +source = "git+https://github.com/ActivityWatch/aw-server-rust.git?rev=49b2026#49b2026b2b61f8d8d017e93dca1d3754dcfef0d5" dependencies = [ - "aw-models", + "aw-models 0.1.0 (git+https://github.com/ActivityWatch/aw-server-rust.git?rev=49b2026)", "chrono", "fancy-regex", "log", diff --git a/Cargo.toml b/Cargo.toml index 53c39e8..56946fb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,8 +26,8 @@ anyhow = { workspace = true } signal-hook = "0.3.15" ksni = {version = "0.2.0", optional = true} -aw-server = { git = "https://github.com/ActivityWatch/aw-server-rust.git", optional = true } -aw-datastore = { git = "https://github.com/ActivityWatch/aw-server-rust.git", optional = true } +aw-server = { git = "https://github.com/ActivityWatch/aw-server-rust.git", optional = true, rev = "49b2026" } +aw-datastore = { git = "https://github.com/ActivityWatch/aw-server-rust.git", optional = true, rev = "49b2026" } smol = {version = "1.3.0", optional = true } async-compat = { version = "0.2.1", optional = true } webbrowser = { version = "0.8.9", optional = true } diff --git a/README.md b/README.md index 03916b3..d2099be 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ To track your activities in browsers install the plugin for your browser from The executable can be bundled with a tray icon, ActivityWatch server and, optionally, Web UI (if steps 1-2 are done): -1. Clone and follow the instruction in [ActivityWatch/aw-webui](https://github.com/ActivityWatch/aw-webui) +1. Clone and follow the instruction in [ActivityWatch/aw-webui@839366e](https://github.com/ActivityWatch/aw-webui/commit/839366e66f859faadd7f9128de3bea14b25ce4ae) to build the "dist" folder, 1. Then zip it with `zip -r dist.zip aw-webui/dist`. 2. Build the executable with `--features=bundle`. @@ -112,9 +112,13 @@ Matches are case sensitive regular expressions between implici ^ and $: - `word` is an exact match. - Use escapes `\` to match special characters, e.g. `org\.kde\.Dolpin` +#### Captures + The replacements in filters also support regexp captures. -A captures takes a string in parentheses from the match and replaces `$N` in the replacement, where `N` is the number of parentheses. -Example filter to remove the changed file indicator in Visual Studio Code: +A capture takes a string in parentheses from the match and replaces `$N` in the replacement. +Example to remove the changed file indicator in Visual Studio Code: +- Before: "● file_config.rs - awatcher - Visual Studio Code" +- After: "file_config.rs - awatcher - Visual Studio Code" ```toml [[awatcher.filters]] match-app-id = "code" @@ -123,6 +127,8 @@ match-title = "● (.*)" replace-title = "$1" ``` +#### Debugging app-id and title + Run the command with "debug" or "trace" verbosity and without reporting to server in the terminal to see what application names and titles are reported to the server. ```