|
1 | 1 | <div align="center"> |
2 | 2 |
|
3 | | -## Unity - WakaTime |
| 3 | +## Creative - WakaTime |
4 | 4 |
|
5 | 5 | [](LICENSE) |
6 | | - |
| 6 | + |
7 | 7 |
|
8 | | -🎯 Automatic Unity project detection and time tracking for WakaTime |
| 8 | +🎯 Automatic time tracking for **Unity** and **Aseprite** via WakaTime |
9 | 9 |
|
10 | 10 | --- |
11 | 11 |
|
12 | 12 | </div> |
13 | 13 |
|
14 | 14 | ### 🚀 Features |
15 | 15 |
|
16 | | -- **Automatic Detection**: Finds Unity projects automatically |
17 | | -- **Real-time Monitoring**: Tracks file changes as you code |
| 16 | +- **Unity**: Automatic project detection + real-time file change tracking |
| 17 | +- **Aseprite**: Editing & saving activity tracking via a lightweight Lua extension |
18 | 18 | - **Version Support**: Detects Unity editor versions (e.g., "Unity 2022.3") |
19 | 19 | - **System Tray**: Runs quietly in background with right-click menu |
20 | 20 | - **Smart Notifications**: Shows project start/stop alerts |
| 21 | +- **Separate dashboards**: Unity and Aseprite are reported as distinct editors on WakaTime |
21 | 22 |
|
22 | 23 | ### 🔧 System Requirements |
23 | 24 |
|
24 | 25 | - **OS**: Windows |
25 | 26 | - **API key**: WakaTime API KEY (free at wakatime.com) |
| 27 | +- **Aseprite** (optional): for sprite/pixel-art tracking |
26 | 28 |
|
27 | 29 | ### 📦 Installation |
28 | 30 |
|
29 | | -1. Go to [Releases](https://github.com/Snow0406/Unity-Wakatime/releases) |
30 | | -2. Download the latest `Unity-Wakatime_vX.X.X.zip` |
| 31 | +1. Go to [Releases](https://github.com/Snow0406/creative-wakatime/releases) |
| 32 | +2. Download the latest `Creative-Wakatime_vX.X.X.zip` |
31 | 33 | 3. Extract to your preferred location |
32 | | -4. Run `unity_wakatime.exe` |
| 34 | +4. Run `creative_wakatime.exe` |
33 | 35 |
|
34 | 36 | ### ⚙️ Setup |
35 | 37 |
|
36 | 38 | 1. **Get WakaTime API Key**: |
37 | 39 | - Visit https://wakatime.com/api-key |
38 | 40 | - Copy your API key |
39 | 41 |
|
40 | | -2. **Configure Unity WakaTime**: |
| 42 | +2. **Configure Creative WakaTime**: |
41 | 43 | - Right-click the system tray icon |
42 | 44 | - Click "🔑 Setup API Key" |
43 | 45 | - The WakaTime website will open automatically |
44 | 46 | - Copy your API key and click OK |
45 | 47 | - Wait for validation ✅ |
| 48 | + - The API key is stored at `%APPDATA%/creative-wakatime/wakatime_config.txt` |
46 | 49 |
|
47 | | -3. **Start Unity and Code!** |
| 50 | +3. **Unity** — Start and Code! |
48 | 51 | - Open any Unity project |
49 | | - - The app will automatically detect and start tracking |
| 52 | + - The app automatically detects and starts tracking |
| 53 | + |
| 54 | +4. **Aseprite** — Install the extension (optional): |
| 55 | + - Download `creative-wakatime.aseprite-extension` from the same release. |
| 56 | + - Double-click it, or install it from Aseprite via |
| 57 | + **Edit > Preferences > Extensions > Add Extension**. |
| 58 | + - Restart Aseprite. |
| 59 | + - The extension writes local event files to `%APPDATA%/creative-wakatime/events/`. |
| 60 | + - Creative WakaTime watches that folder and forwards heartbeats. |
| 61 | + |
| 62 | +### 🧩 How Aseprite tracking works |
| 63 | + |
| 64 | +Aseprite cannot be hooked directly from C++, so a small Aseprite **Lua extension** |
| 65 | +emits local JSON event files on edit/save. The tray app watches |
| 66 | +`%APPDATA%/creative-wakatime/events/` (event-driven, no polling) and converts each |
| 67 | +event into a WakaTime heartbeat, then deletes the file. |
| 68 | + |
| 69 | +``` |
| 70 | +Unity -> ProcessMonitor / FileWatcher -> WakaTimeClient -> WakaTime API |
| 71 | +Aseprite -> Lua extension -> events/*.json -> Inbox bridge -> WakaTimeClient -> WakaTime API |
| 72 | +``` |
| 73 | + |
| 74 | +Aseprite events are intentionally optional. If the extension is not installed, |
| 75 | +Creative WakaTime only watches an empty local inbox and no Aseprite heartbeat is |
| 76 | +created. |
| 77 | + |
| 78 | +#### Aseprite extension behavior |
| 79 | + |
| 80 | +- **Edit activity** (`sitechange`): active sprite/layer/frame changes are reported |
| 81 | + as `is_write=false` with a 2-minute per-file debounce. |
| 82 | +- **Save activity** (`aftercommand` → `SaveFile`/`SaveFileAs`/`SaveFileCopyAs`): |
| 83 | + reported immediately as `is_write=true`. |
| 84 | +- Unsaved sprites without a file path are ignored. |
| 85 | +- `project` is the parent folder name of the sprite file. |
| 86 | +- The extension does not call the WakaTime API directly; it only writes local |
| 87 | + `.json` event files for the tray app to consume. |
| 88 | + |
| 89 | +#### Manual Aseprite extension install |
| 90 | + |
| 91 | +If you are building from source instead of using the release asset, zip the |
| 92 | +contents of `aseprite-extension/` so that `package.json` and `wakatime.lua` are at |
| 93 | +the root of the archive, then rename the archive to |
| 94 | +`creative-wakatime.aseprite-extension`. |
| 95 | + |
| 96 | +You can also copy the folder manually: |
| 97 | + |
| 98 | +```text |
| 99 | +%APPDATA%/Aseprite/extensions/creative-wakatime/ |
| 100 | +``` |
| 101 | + |
| 102 | +The folder must contain both `package.json` and `wakatime.lua`. |
50 | 103 |
|
51 | 104 | ## License |
52 | 105 |
|
53 | 106 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
54 | 107 |
|
55 | 108 | --- |
56 | 109 |
|
57 | | -Made with ♥ by hy |
| 110 | +Made with ♥ by hy |
0 commit comments