Skip to content

feat: update gource script for 2014-2025+ with community repos#13

Merged
ErikBjare merged 1 commit intoActivityWatch:masterfrom
TimeToBuildBob:update-gource-2025
Apr 19, 2026
Merged

feat: update gource script for 2014-2025+ with community repos#13
ErikBjare merged 1 commit intoActivityWatch:masterfrom
TimeToBuildBob:update-gource-2025

Conversation

@TimeToBuildBob
Copy link
Copy Markdown
Contributor

Summary

Updates the gource visualization script to include community repos and extend the timeline to 2025+.

Changes

Community Repos Added (from awesome-activitywatch):

  • 2e3s/awatcher - Popular Rust watcher for X11/Wayland
  • kepptic/aw-watcher-enhanced - Enhanced window watcher with OCR/LLM
  • 2e3s/aw-watcher-media-player - Media playback tracking
  • brayo-pip/aw-watcher-lastfm - Last.fm scrobbles
  • Otto-AA/aw-watcher-vscode - VSCode extension
  • OlivierMary/aw-watcher-jetbrains - JetBrains extension
  • NicoWeio/activitywatch-plasmoid - KDE Plasma widget
  • phrp720/aw-sync-suite - Prometheus/Grafana sync

Other Improvements:

  • Extended timeline captions to 2025
  • Added color highlighting for Go, Kotlin, Java (languages used by community repos)
  • Improved error handling and progress output
  • Updated title to "ActivityWatch Development 2014-2025+"

Profile Picture Evolution (TODO)

Added a TODO comment about Erik's wild idea: making profile pictures change over time. This would require either:

  1. GitHub API to fetch historical avatar URLs
  2. Wayback Machine integration for historical profile pictures
  3. Possibly patching gource for custom avatar timeline support

This is documented as a future enhancement in the script.

Closes #11


Created by Bob 🤖

@TimeToBuildBob
Copy link
Copy Markdown
Contributor Author

Closing — no engagement in 3 months and the branch has diverged from master. Happy to reopen/recreate if you want the gource script updates for community repos; the changes are preserved in the branch history.

@ErikBjare
Copy link
Copy Markdown
Member

@TimeToBuildBob don't close, update

@ErikBjare ErikBjare reopened this Apr 19, 2026
- Add community repos from awesome-activitywatch (awatcher, aw-watcher-enhanced, etc.)
- Extend timeline captions to 2025
- Add color highlighting for Go, Kotlin, Java (community repos use these)
- Add TODO for profile picture evolution feature (change avatars over time)
- Improve error handling and progress output
- Update title to reflect extended timeline

Addresses Issue ActivityWatch#11
@TimeToBuildBob
Copy link
Copy Markdown
Contributor Author

Rebased onto master and force-pushed. The update merges my additions (auto-cloning community repos, extended captions, Go/Kotlin/Java color highlighting, better error handling) with the community module support from #12. Should be conflict-free now.

@ErikBjare ErikBjare merged commit 32f7dc5 into ActivityWatch:master Apr 19, 2026
1 of 2 checks passed
@ErikBjare
Copy link
Copy Markdown
Member

@greptileai review

@ErikBjare
Copy link
Copy Markdown
Member

@TimeToBuildBob Also note the failing CI on this commit (and prob master) from getting ratelimited by GitHub API in tests. If Greptile has comments when done (working right now), address in follow-up.

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 19, 2026

Greptile Summary

This PR extends the gource visualization script to auto-clone 8 community repos from GitHub, adds fallback processing for locally-cloned repos, adds color rules for Go/Kotlin/Java, and appends four new 2024–2025 captions.

  • P1 (gource-output.sh line 161): The .github folder sed replaces only the path prefix instead of deleting the line, leaving stray root-level files (e.g. workflows/build.yml) in the visualization.
  • P1 (gource-output.sh line 167): The .ts color pattern has no $ anchor, so .tsx files get a color code injected mid-path (file.ts|007ACCx), unlike the correctly anchored new Go/Kotlin/Java rules.

Confidence Score: 3/5

Two P1 sed bugs will corrupt gource log entries — review needed before merging for a clean visualization output.

The .github sed produces malformed entries rather than removing lines, and the .ts color pattern injects the color code mid-path for .tsx files. Both affect every run of the script. The community-repo cloning logic and fallback dedup look correct, and all new caption timestamps are accurate.

video/gource-output.sh lines 161 and 167

Important Files Changed

Filename Overview
video/gource-output.sh Adds auto-cloning of 8 community repos, community log processing with dedup fallback, Go/Kotlin/Java color rules, and community contributor name fixes; two sed bugs affect .github removal and .ts/.tsx coloring.
video/gource-captions.txt Adds four new 2024–2025 caption entries with correct timestamps; pre-existing timestamp mismatch on line 9 (v0.6.0a12) left unfixed.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Start script] --> B[rm -rf tmpdir\nmkdir tmpdir + communitydir]
    B --> C[Loop: community_repos]
    C -->|dir exists| D[git pull --quiet or use cache]
    C -->|dir missing| E[git clone from GitHub or skip]
    D & E --> F[Process official modules\ngource output-custom-log]
    F --> G[Process auto-cloned community repos\ngource to community-name.txt]
    G --> H[Process community_local fallback]
    H -->|community-name.txt exists| I[Skip - already processed]
    H -->|community-name.txt missing| J[gource to name.txt from rootdir]
    I & J --> K[Generate fixes.txt\ndelete activitywatch-old at rewrite point]
    K --> L[cat tmpdir to combined.gource]
    L --> M[sed: rename paths, fix names,\ncolor file extensions, remove CI noise]
    M --> N[Fetch avatars from each repo]
    N --> O{Mode}
    O -->|preview| P[gource render]
    O -->|video| Q[gource to ffmpeg to gource.mp4]
Loading

Comments Outside Diff (1)

  1. video/gource-captions.txt, line 9 (link)

    P2 Timestamp 1509750000 does not match stated date

    Unix timestamp 1509750000 resolves to 2017-11-03, not 2016-11-04 as the caption reads. This causes the v0.6.0a12 marker to appear ~13 months too late in the timeline, immediately before the correct v0.7 entry, making the v0.6 release appear to overlap with v0.7.

Reviews (1): Last reviewed commit: "feat: update gource script for 2014-2025..." | Re-trigger Greptile

Comment thread video/gource-output.sh
Comment on lines +119 to +126
community_local=(
community/awatcher
community/aw-watcher-media-player
other/aw-watcher-vscode
other/aw-watcher-vim
community/aw-watcher-jetbrains
community/activitywatch-plasmoid
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Overlapping repos in community_local and community_repos

Five of the six repos in community_local (awatcher, aw-watcher-media-player, aw-watcher-vscode, aw-watcher-jetbrains, activitywatch-plasmoid) are already present in community_repos and will be auto-cloned. The dedup guard on line 131 correctly skips them when the auto-clone succeeds, but the redundancy is easy to miss. Only aw-watcher-vim is genuinely unique to this fallback list. Consider adding a comment to clarify that community_local is intentionally a superset for cases where the auto-clone fails.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment thread video/gource-output.sh
@@ -115,11 +161,14 @@ sed -i 's#activitywatch-old/##g' $gourcelog
sed -i -E 's#.+/.github/##g' $gourcelog
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 .github sed leaves malformed log entries instead of removing them

s#.+/.github/##g replaces the matched prefix (everything up to and including .github/) with an empty string rather than deleting the whole line. A gource log entry like 1234|user|A|/aw-core/.github/workflows/build.yml becomes 1234|user|A|workflows/build.yml, so .github files end up as stray root-level files in the visualization instead of disappearing. To delete these lines entirely, use the d command:

Suggested change
sed -i -E 's#.+/.github/##g' $gourcelog
sed -i -E '/.github\//d' $gourcelog

Comment thread video/gource-output.sh
sed -i 's/[.]py/\0|4B8BBE/g' $gourcelog # Python - blue
sed -i 's/[.]rs$/\0|FFAA33/g' $gourcelog # Rust - orange
sed -i 's/[.]js/\0|F0DB4F/g' $gourcelog # JavaScript - yellow
sed -i 's/[.]ts/\0|007ACC/g' $gourcelog # TypeScript - blue
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 .ts color pattern matches .tsx mid-string

s/[.]ts/\0|007ACC/g has no end-of-line anchor, so file.tsx becomes file.ts|007ACCx — the color code is injected inside the path, leaving a trailing x that could confuse gource's parser. Adding $ (as done for the new Go/Kotlin/Java patterns on lines 169–171) would prevent this.

Suggested change
sed -i 's/[.]ts/\0|007ACC/g' $gourcelog # TypeScript - blue
sed -i 's/[.]tsx\?$/\0|007ACC/g' $gourcelog # TypeScript/TSX - blue

@ErikBjare
Copy link
Copy Markdown
Member

@TimeToBuildBob Greptile had some good comments... Follow-up plz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update gource script

2 participants