claude-code-wrapped 0.1.2 → 0.1.3
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.
- package/claude_code_wrapped/__init__.py +1 -1
- package/claude_code_wrapped/ui.py +30 -12
- package/package.json +1 -1
- package/pyproject.toml +1 -1
- package/uv.lock +1 -1
|
@@ -95,13 +95,17 @@ def create_big_stat(value: str, label: str, color: str = COLORS["orange"]) -> Te
|
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
def create_contribution_graph(daily_stats: dict, year: int) -> Panel:
|
|
98
|
-
"""Create a GitHub-style contribution graph."""
|
|
98
|
+
"""Create a GitHub-style contribution graph for the full year."""
|
|
99
99
|
if not daily_stats:
|
|
100
100
|
return Panel("No activity data", title="Activity", border_style=COLORS["gray"])
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
start_date = datetime
|
|
104
|
-
|
|
102
|
+
# Always show full year: Jan 1 to Dec 31 (or today if current year)
|
|
103
|
+
start_date = datetime(year, 1, 1)
|
|
104
|
+
today = datetime.now()
|
|
105
|
+
if year == today.year:
|
|
106
|
+
end_date = today
|
|
107
|
+
else:
|
|
108
|
+
end_date = datetime(year, 12, 31)
|
|
105
109
|
|
|
106
110
|
max_count = max(s.message_count for s in daily_stats.values()) if daily_stats else 1
|
|
107
111
|
|
|
@@ -140,9 +144,17 @@ def create_contribution_graph(daily_stats: dict, year: int) -> Panel:
|
|
|
140
144
|
|
|
141
145
|
content = Group(graph, Align.center(legend))
|
|
142
146
|
|
|
147
|
+
# Calculate total days for context
|
|
148
|
+
today = datetime.now()
|
|
149
|
+
if year == today.year:
|
|
150
|
+
total_days = (today - datetime(year, 1, 1)).days + 1
|
|
151
|
+
else:
|
|
152
|
+
total_days = 366 if year % 4 == 0 else 365
|
|
153
|
+
active_count = len([d for d in daily_stats.values() if d.message_count > 0])
|
|
154
|
+
|
|
143
155
|
return Panel(
|
|
144
156
|
Align.center(content),
|
|
145
|
-
title=f"Activity · {
|
|
157
|
+
title=f"Activity · {active_count} of {total_days} days",
|
|
146
158
|
border_style=Style(color=COLORS["green"]),
|
|
147
159
|
padding=(0, 2),
|
|
148
160
|
)
|
|
@@ -372,18 +384,24 @@ def create_credits_roll(stats: WrappedStats) -> list[Text]:
|
|
|
372
384
|
numbers.append(" [ENTER]", style=Style(color=COLORS["dark"]))
|
|
373
385
|
frames.append(numbers)
|
|
374
386
|
|
|
375
|
-
# Frame 2: Timeline
|
|
387
|
+
# Frame 2: Timeline (full year context)
|
|
376
388
|
timeline = Text()
|
|
377
389
|
timeline.append("\n\n\n")
|
|
378
390
|
timeline.append(" T I M E L I N E\n\n", style=Style(color=COLORS["orange"], bold=True))
|
|
391
|
+
timeline.append(" Year ", style=Style(color=COLORS["white"], bold=True))
|
|
392
|
+
timeline.append(f"{stats.year}\n", style=Style(color=COLORS["orange"], bold=True))
|
|
379
393
|
if stats.first_message_date:
|
|
380
|
-
timeline.append("
|
|
381
|
-
timeline.append(f"{stats.first_message_date.strftime('%B %d
|
|
382
|
-
if
|
|
383
|
-
|
|
384
|
-
|
|
394
|
+
timeline.append(" Journey started ", style=Style(color=COLORS["white"], bold=True))
|
|
395
|
+
timeline.append(f"{stats.first_message_date.strftime('%B %d')}\n", style=Style(color=COLORS["gray"]))
|
|
396
|
+
# Calculate total days in year (up to today if current year)
|
|
397
|
+
today = datetime.now()
|
|
398
|
+
if stats.year == today.year:
|
|
399
|
+
total_days = (today - datetime(stats.year, 1, 1)).days + 1
|
|
400
|
+
else:
|
|
401
|
+
total_days = 366 if stats.year % 4 == 0 else 365
|
|
385
402
|
timeline.append(f"\n Active days ", style=Style(color=COLORS["white"], bold=True))
|
|
386
|
-
timeline.append(f"{stats.active_days}
|
|
403
|
+
timeline.append(f"{stats.active_days}", style=Style(color=COLORS["orange"], bold=True))
|
|
404
|
+
timeline.append(f" of {total_days}\n", style=Style(color=COLORS["gray"]))
|
|
387
405
|
if stats.most_active_hour is not None:
|
|
388
406
|
hour_label = "AM" if stats.most_active_hour < 12 else "PM"
|
|
389
407
|
hour_12 = stats.most_active_hour % 12 or 12
|
package/package.json
CHANGED
package/pyproject.toml
CHANGED