worklog-for-claude-code 0.3.2__tar.gz → 0.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. {worklog_for_claude_code-0.3.2/worklog_for_claude_code.egg-info → worklog_for_claude_code-0.4.1}/PKG-INFO +9 -3
  2. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/README.md +8 -2
  3. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/pyproject.toml +1 -1
  4. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/tests/test_accounts.py +1 -1
  5. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/tests/test_platforms.py +35 -1
  6. worklog_for_claude_code-0.4.1/tests/test_smart.py +634 -0
  7. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog/__init__.py +1 -1
  8. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog/cli.py +62 -0
  9. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog/collector.py +62 -1
  10. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog/config.py +4 -1
  11. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog/demo.py +33 -3
  12. worklog_for_claude_code-0.4.1/worklog/overrides.py +115 -0
  13. worklog_for_claude_code-0.4.1/worklog/parser.py +346 -0
  14. worklog_for_claude_code-0.4.1/worklog/report.py +579 -0
  15. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog/services.py +42 -0
  16. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog/store.py +3 -2
  17. worklog_for_claude_code-0.4.1/worklog/tags.py +58 -0
  18. worklog_for_claude_code-0.4.1/worklog/timesheet.py +246 -0
  19. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog/web.py +472 -26
  20. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1/worklog_for_claude_code.egg-info}/PKG-INFO +9 -3
  21. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog_for_claude_code.egg-info/SOURCES.txt +4 -0
  22. worklog_for_claude_code-0.3.2/worklog/parser.py +0 -191
  23. worklog_for_claude_code-0.3.2/worklog/report.py +0 -324
  24. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/LICENSE +0 -0
  25. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/setup.cfg +0 -0
  26. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/tests/test_chats.py +0 -0
  27. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/tests/test_checks.py +0 -0
  28. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/tests/test_demo.py +0 -0
  29. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/tests/test_forget.py +0 -0
  30. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/tests/test_syncstatus.py +0 -0
  31. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/tests/test_updates.py +0 -0
  32. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/tests/test_viz.py +0 -0
  33. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/tests/test_watcher.py +0 -0
  34. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/tests/test_worklog.py +0 -0
  35. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog/chats.py +0 -0
  36. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog/checks.py +0 -0
  37. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog/forget.py +0 -0
  38. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog/hooks.py +0 -0
  39. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog/identity.py +0 -0
  40. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog/locks.py +0 -0
  41. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog/redact.py +0 -0
  42. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog/syncstatus.py +0 -0
  43. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog/updates.py +0 -0
  44. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog/viz.py +0 -0
  45. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog/watcher.py +0 -0
  46. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog_for_claude_code.egg-info/dependency_links.txt +0 -0
  47. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog_for_claude_code.egg-info/entry_points.txt +0 -0
  48. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog_for_claude_code.egg-info/requires.txt +0 -0
  49. {worklog_for_claude_code-0.3.2 → worklog_for_claude_code-0.4.1}/worklog_for_claude_code.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: worklog-for-claude-code
3
- Version: 0.3.2
3
+ Version: 0.4.1
4
4
  Summary: See what you did with Claude Code each day and how many tokens it used: an automatic daily work log across accounts and devices, private by default
5
5
  Author: Urvin
6
6
  License-Expression: MIT
@@ -53,7 +53,8 @@ Dynamic: license-file
53
53
 
54
54
  ## What it does
55
55
 
56
- - ✅ **Writes down what you worked on**, project by project, every day. Claude writes the summary.
56
+ - ✅ **Writes down what you worked on**, project by project, every day, in plain words. Claude writes the summary.
57
+ - 🧾 **Makes your timesheet**: hours per project with a plain-language line, to Excel or CSV in one click.
57
58
  - 📊 **Shows how many tokens you used**, per day, account and model.
58
59
  - 👥 **Handles several Claude accounts and computers**, even if you switch accounts with a one-click app.
59
60
  - 🔒 **Stays private**: everything lives on your computer (and your own private git repo, if you want).
@@ -91,6 +92,9 @@ A checklist then shows anything still missing, with the exact command for your c
91
92
  ## A closer look
92
93
 
93
94
  <table><tr>
95
+ <td width="50%"><img src="https://raw.githubusercontent.com/us-urvin/worklog-for-claude-code/main/docs/images/timesheet.png" alt="Timesheet: hours, kind of work and a one-line summary per day and project"><br>A timesheet, ready for Excel.</td>
96
+ <td width="50%"><img src="https://raw.githubusercontent.com/us-urvin/worklog-for-claude-code/main/docs/images/card.png" alt="A project card with a plain-language summary, tag and Claude's task list"><br>Plain-language summaries, tags and Claude's tasks.</td>
97
+ </tr><tr>
94
98
  <td width="50%"><img src="https://raw.githubusercontent.com/us-urvin/worklog-for-claude-code/main/docs/images/insights.png" alt="When you worked, the last 5 weeks and today's projects"><br>When you worked, your streak, and where the time went.</td>
95
99
  <td width="50%"><img src="https://raw.githubusercontent.com/us-urvin/worklog-for-claude-code/main/docs/images/checklist.png" alt="Setup checklist"><br>A setup checklist with steps for your system.</td>
96
100
  </tr><tr>
@@ -117,7 +121,9 @@ A checklist then shows anything still missing, with the exact command for your c
117
121
 
118
122
  **Uploads to my data repo fail?** Click **Test connection** in Settings: it says what's wrong in plain words. See [Troubleshooting](https://github.com/us-urvin/worklog-for-claude-code/blob/main/docs/TROUBLESHOOTING.md#uploads-fail-or-the-wrong-github-account-is-used).
119
123
 
120
- **How do I update?** Click **Update now** when the dashboard says a new version is out, or run `pipx upgrade --pip-args=--no-cache-dir worklog-for-claude-code`.
124
+ **Wrong project on a card?** Click **✏️ Edit** to rename it or move the sessions. Worklog can remember the folder you always start in.
125
+
126
+ **How do I update?** Click **Update now** when the dashboard says a new version is out, or run `pipx upgrade --pip-args=--no-cache-dir worklog-for-claude-code` and click **Restart now** on the page. Still the old version? [Restart it once](https://github.com/us-urvin/worklog-for-claude-code/blob/main/docs/TROUBLESHOOTING.md#i-updated-but-the-page-still-shows-the-old-version).
121
127
 
122
128
  **Something isn't working?** Run `claude-worklog doctor`, or see [Troubleshooting](https://github.com/us-urvin/worklog-for-claude-code/blob/main/docs/TROUBLESHOOTING.md).
123
129
 
@@ -14,7 +14,8 @@
14
14
 
15
15
  ## What it does
16
16
 
17
- - ✅ **Writes down what you worked on**, project by project, every day. Claude writes the summary.
17
+ - ✅ **Writes down what you worked on**, project by project, every day, in plain words. Claude writes the summary.
18
+ - 🧾 **Makes your timesheet**: hours per project with a plain-language line, to Excel or CSV in one click.
18
19
  - 📊 **Shows how many tokens you used**, per day, account and model.
19
20
  - 👥 **Handles several Claude accounts and computers**, even if you switch accounts with a one-click app.
20
21
  - 🔒 **Stays private**: everything lives on your computer (and your own private git repo, if you want).
@@ -52,6 +53,9 @@ A checklist then shows anything still missing, with the exact command for your c
52
53
  ## A closer look
53
54
 
54
55
  <table><tr>
56
+ <td width="50%"><img src="https://raw.githubusercontent.com/us-urvin/worklog-for-claude-code/main/docs/images/timesheet.png" alt="Timesheet: hours, kind of work and a one-line summary per day and project"><br>A timesheet, ready for Excel.</td>
57
+ <td width="50%"><img src="https://raw.githubusercontent.com/us-urvin/worklog-for-claude-code/main/docs/images/card.png" alt="A project card with a plain-language summary, tag and Claude's task list"><br>Plain-language summaries, tags and Claude's tasks.</td>
58
+ </tr><tr>
55
59
  <td width="50%"><img src="https://raw.githubusercontent.com/us-urvin/worklog-for-claude-code/main/docs/images/insights.png" alt="When you worked, the last 5 weeks and today's projects"><br>When you worked, your streak, and where the time went.</td>
56
60
  <td width="50%"><img src="https://raw.githubusercontent.com/us-urvin/worklog-for-claude-code/main/docs/images/checklist.png" alt="Setup checklist"><br>A setup checklist with steps for your system.</td>
57
61
  </tr><tr>
@@ -78,7 +82,9 @@ A checklist then shows anything still missing, with the exact command for your c
78
82
 
79
83
  **Uploads to my data repo fail?** Click **Test connection** in Settings: it says what's wrong in plain words. See [Troubleshooting](https://github.com/us-urvin/worklog-for-claude-code/blob/main/docs/TROUBLESHOOTING.md#uploads-fail-or-the-wrong-github-account-is-used).
80
84
 
81
- **How do I update?** Click **Update now** when the dashboard says a new version is out, or run `pipx upgrade --pip-args=--no-cache-dir worklog-for-claude-code`.
85
+ **Wrong project on a card?** Click **✏️ Edit** to rename it or move the sessions. Worklog can remember the folder you always start in.
86
+
87
+ **How do I update?** Click **Update now** when the dashboard says a new version is out, or run `pipx upgrade --pip-args=--no-cache-dir worklog-for-claude-code` and click **Restart now** on the page. Still the old version? [Restart it once](https://github.com/us-urvin/worklog-for-claude-code/blob/main/docs/TROUBLESHOOTING.md#i-updated-but-the-page-still-shows-the-old-version).
82
88
 
83
89
  **Something isn't working?** Run `claude-worklog doctor`, or see [Troubleshooting](https://github.com/us-urvin/worklog-for-claude-code/blob/main/docs/TROUBLESHOOTING.md).
84
90
 
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
  [project]
6
6
  # Distribution name on PyPI. The command stays `claude-worklog` and the package stays `worklog`.
7
7
  name = "worklog-for-claude-code"
8
- version = "0.3.2"
8
+ version = "0.4.1"
9
9
  description = "See what you did with Claude Code each day and how many tokens it used: an automatic daily work log across accounts and devices, private by default"
10
10
  readme = "README.md"
11
11
  requires-python = ">=3.10"
@@ -324,7 +324,7 @@ def test_summary_uses_the_configured_model(home, repo, monkeypatch):
324
324
  p = report.ProjectDay("k", "proj", "git", None)
325
325
  p.prompts.append(("09:00", "fix the bug"))
326
326
 
327
- assert report.ai_summary(p, datetime.now().date(), cfg) == ["- did a thing"]
327
+ assert report.ai_summary(p, datetime.now().date(), cfg)["bullets"] == ["- did a thing"] # old-style answer
328
328
  assert "--model" not in calls[-1] # default: the account's own default model
329
329
 
330
330
  cfg.summary_model = "opus"
@@ -201,7 +201,8 @@ def test_data_repo_gets_line_ending_rules(repo):
201
201
  s = GitStore(repo)
202
202
  s.write_json("records/2026-10-01/dev/personal/a.json", {"a": 1})
203
203
  s.commit_and_push("test")
204
- assert (repo / ".gitattributes").read_text() == "records/** text eol=lf\nreports/** text eol=lf\n"
204
+ assert (repo / ".gitattributes").read_text() == ("records/** text eol=lf\nreports/** text eol=lf\n"
205
+ "overrides/** text eol=lf\n")
205
206
  assert b"\r\n" not in (repo / "records/2026-10-01/dev/personal/a.json").read_bytes()
206
207
 
207
208
 
@@ -282,3 +283,36 @@ def test_our_hook_is_recognised_in_every_form():
282
283
  assert _is_ours(cmd), cmd
283
284
  for cmd in ("some-other-tool", "claude-worklog-helper hook", "claude-worklog hooked", None):
284
285
  assert not _is_ours(cmd), cmd
286
+
287
+
288
+ # ------------------------------------------------------------------ "still running the old version" (doctor)
289
+ def test_port_and_restart_command_per_os(monkeypatch, fake, home):
290
+ monkeypatch.setattr(services.sys, "platform", "linux")
291
+ monkeypatch.setattr(services, "UNIT_DIR", home / ".config/systemd/user")
292
+ assert services.configured_port() == 8765 # not installed yet: the default
293
+ services.install(9100, report=False)
294
+ assert services.configured_port() == 9100
295
+ assert services.restart_hint() == "systemctl --user restart claude-worklog-web"
296
+ monkeypatch.setattr(services.sys, "platform", "darwin")
297
+ monkeypatch.setattr(services, "AGENT_DIR", home / "Library" / "LaunchAgents")
298
+ monkeypatch.setattr(services.os, "getuid", lambda: 501, raising=False)
299
+ services.install(9200, report=False)
300
+ assert services.configured_port() == 9200
301
+ assert services.restart_hint() == "launchctl kickstart -k gui/$(id -u)/dev.worklog.web"
302
+ monkeypatch.setattr(services.sys, "platform", "win32")
303
+ assert "sign out" in services.restart_hint()
304
+
305
+
306
+ def test_running_version_asks_the_page(monkeypatch):
307
+ import io
308
+
309
+ def page(req, timeout):
310
+ assert req.full_url == "http://127.0.0.1:8765/api/status"
311
+ return io.BytesIO(b'{"running": null, "version": "0.2.0"}')
312
+ monkeypatch.setattr("urllib.request.urlopen", page)
313
+ assert services.running_version(8765) == "0.2.0"
314
+
315
+ def down(req, timeout):
316
+ raise OSError("connection refused")
317
+ monkeypatch.setattr("urllib.request.urlopen", down)
318
+ assert services.running_version(8765) is None