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.
@@ -1,3 +1,3 @@
1
1
  """Claude Code Wrapped - Your year with Claude Code, Spotify Wrapped style."""
2
2
 
3
- __version__ = "0.1.2"
3
+ __version__ = "0.1.3"
@@ -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
- dates = sorted(daily_stats.keys())
103
- start_date = datetime.strptime(dates[0], "%Y-%m-%d")
104
- end_date = datetime.strptime(dates[-1], "%Y-%m-%d")
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 · {len([d for d in daily_stats.values() if d.message_count > 0])} active days",
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(" First message ", style=Style(color=COLORS["white"], bold=True))
381
- timeline.append(f"{stats.first_message_date.strftime('%B %d, %Y')}\n", style=Style(color=COLORS["gray"]))
382
- if stats.last_message_date:
383
- timeline.append(" Last message ", style=Style(color=COLORS["white"], bold=True))
384
- timeline.append(f"{stats.last_message_date.strftime('%B %d, %Y')}\n", style=Style(color=COLORS["gray"]))
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}\n", style=Style(color=COLORS["orange"], bold=True))
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-wrapped",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Your year with Claude Code - Spotify Wrapped style terminal experience",
5
5
  "bin": {
6
6
  "claude-code-wrapped": "./bin/cli.js"
package/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "claude-code-wrapped"
3
- version = "0.1.2"
3
+ version = "0.1.3"
4
4
  description = "Your year with Claude Code - Spotify Wrapped style terminal experience"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
package/uv.lock CHANGED
@@ -4,7 +4,7 @@ requires-python = ">=3.12"
4
4
 
5
5
  [[package]]
6
6
  name = "claude-code-wrapped"
7
- version = "0.1.0"
7
+ version = "0.1.2"
8
8
  source = { editable = "." }
9
9
  dependencies = [
10
10
  { name = "rich" },