ccburn 0.2.1__tar.gz → 0.2.2__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 (32) hide show
  1. {ccburn-0.2.1/src/ccburn.egg-info → ccburn-0.2.2}/PKG-INFO +4 -1
  2. {ccburn-0.2.1 → ccburn-0.2.2}/README.md +3 -0
  3. {ccburn-0.2.1 → ccburn-0.2.2}/pyproject.toml +1 -1
  4. {ccburn-0.2.1 → ccburn-0.2.2}/src/ccburn/display/gauges.py +29 -5
  5. {ccburn-0.2.1 → ccburn-0.2.2/src/ccburn.egg-info}/PKG-INFO +4 -1
  6. {ccburn-0.2.1 → ccburn-0.2.2}/LICENSE +0 -0
  7. {ccburn-0.2.1 → ccburn-0.2.2}/setup.cfg +0 -0
  8. {ccburn-0.2.1 → ccburn-0.2.2}/src/ccburn/__init__.py +0 -0
  9. {ccburn-0.2.1 → ccburn-0.2.2}/src/ccburn/app.py +0 -0
  10. {ccburn-0.2.1 → ccburn-0.2.2}/src/ccburn/cli.py +0 -0
  11. {ccburn-0.2.1 → ccburn-0.2.2}/src/ccburn/data/__init__.py +0 -0
  12. {ccburn-0.2.1 → ccburn-0.2.2}/src/ccburn/data/credentials.py +0 -0
  13. {ccburn-0.2.1 → ccburn-0.2.2}/src/ccburn/data/history.py +0 -0
  14. {ccburn-0.2.1 → ccburn-0.2.2}/src/ccburn/data/models.py +0 -0
  15. {ccburn-0.2.1 → ccburn-0.2.2}/src/ccburn/data/usage_client.py +0 -0
  16. {ccburn-0.2.1 → ccburn-0.2.2}/src/ccburn/display/__init__.py +0 -0
  17. {ccburn-0.2.1 → ccburn-0.2.2}/src/ccburn/display/chart.py +0 -0
  18. {ccburn-0.2.1 → ccburn-0.2.2}/src/ccburn/display/layout.py +0 -0
  19. {ccburn-0.2.1 → ccburn-0.2.2}/src/ccburn/main.py +0 -0
  20. {ccburn-0.2.1 → ccburn-0.2.2}/src/ccburn/utils/__init__.py +0 -0
  21. {ccburn-0.2.1 → ccburn-0.2.2}/src/ccburn/utils/calculator.py +0 -0
  22. {ccburn-0.2.1 → ccburn-0.2.2}/src/ccburn/utils/formatting.py +0 -0
  23. {ccburn-0.2.1 → ccburn-0.2.2}/src/ccburn.egg-info/SOURCES.txt +0 -0
  24. {ccburn-0.2.1 → ccburn-0.2.2}/src/ccburn.egg-info/dependency_links.txt +0 -0
  25. {ccburn-0.2.1 → ccburn-0.2.2}/src/ccburn.egg-info/entry_points.txt +0 -0
  26. {ccburn-0.2.1 → ccburn-0.2.2}/src/ccburn.egg-info/requires.txt +0 -0
  27. {ccburn-0.2.1 → ccburn-0.2.2}/src/ccburn.egg-info/top_level.txt +0 -0
  28. {ccburn-0.2.1 → ccburn-0.2.2}/tests/test_calculator.py +0 -0
  29. {ccburn-0.2.1 → ccburn-0.2.2}/tests/test_cli.py +0 -0
  30. {ccburn-0.2.1 → ccburn-0.2.2}/tests/test_formatting.py +0 -0
  31. {ccburn-0.2.1 → ccburn-0.2.2}/tests/test_history.py +0 -0
  32. {ccburn-0.2.1 → ccburn-0.2.2}/tests/test_models.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ccburn
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Terminal-based Claude Code usage limit visualizer with real-time burn-up charts
5
5
  Author: JuanjoFuchs
6
6
  License-Expression: MIT
@@ -46,6 +46,9 @@ Dynamic: license-file
46
46
  [![Python](https://img.shields.io/pypi/pyversions/ccburn)](https://pypi.org/project/ccburn/)
47
47
  [![GitHub Release](https://img.shields.io/github/v/release/JuanjoFuchs/ccburn)](https://github.com/JuanjoFuchs/ccburn/releases)
48
48
  [![WinGet](https://img.shields.io/badge/WinGet-pending-yellow)](https://github.com/microsoft/winget-pkgs/pulls?q=is%3Apr+ccburn)
49
+ [![npm downloads](https://img.shields.io/npm/dt/ccburn?label=npm%20downloads)](https://www.npmjs.com/package/ccburn)
50
+ [![PyPI downloads](https://img.shields.io/pepy/dt/ccburn?label=pypi%20downloads)](https://pepy.tech/project/ccburn)
51
+ [![GitHub downloads](https://img.shields.io/github/downloads/JuanjoFuchs/ccburn/total?label=github%20downloads)](https://github.com/JuanjoFuchs/ccburn/releases)
49
52
  [![License](https://img.shields.io/github/license/JuanjoFuchs/ccburn)](LICENSE)
50
53
 
51
54
  <p align="center">
@@ -7,6 +7,9 @@
7
7
  [![Python](https://img.shields.io/pypi/pyversions/ccburn)](https://pypi.org/project/ccburn/)
8
8
  [![GitHub Release](https://img.shields.io/github/v/release/JuanjoFuchs/ccburn)](https://github.com/JuanjoFuchs/ccburn/releases)
9
9
  [![WinGet](https://img.shields.io/badge/WinGet-pending-yellow)](https://github.com/microsoft/winget-pkgs/pulls?q=is%3Apr+ccburn)
10
+ [![npm downloads](https://img.shields.io/npm/dt/ccburn?label=npm%20downloads)](https://www.npmjs.com/package/ccburn)
11
+ [![PyPI downloads](https://img.shields.io/pepy/dt/ccburn?label=pypi%20downloads)](https://pepy.tech/project/ccburn)
12
+ [![GitHub downloads](https://img.shields.io/github/downloads/JuanjoFuchs/ccburn/total?label=github%20downloads)](https://github.com/JuanjoFuchs/ccburn/releases)
10
13
  [![License](https://img.shields.io/github/license/JuanjoFuchs/ccburn)](LICENSE)
11
14
 
12
15
  <p align="center">
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ccburn"
7
- version = "0.2.1"
7
+ version = "0.2.2"
8
8
  description = "Terminal-based Claude Code usage limit visualizer with real-time burn-up charts"
9
9
  authors = [{name = "JuanjoFuchs"}]
10
10
  readme = "README.md"
@@ -1,5 +1,7 @@
1
1
  """Progress bar gauges for ccburn TUI."""
2
2
 
3
+ import sys
4
+
3
5
  from rich.progress import ProgressBar
4
6
  from rich.style import Style
5
7
  from rich.table import Table
@@ -15,26 +17,48 @@ except ImportError:
15
17
  from ccburn.utils.formatting import format_reset_time, get_utilization_color
16
18
 
17
19
 
18
- def get_pace_emoji(utilization: float, budget_pace: float) -> str:
20
+ def _supports_emoji() -> bool:
21
+ """Detect if the console supports emoji characters.
22
+
23
+ Returns:
24
+ True if emoji are likely supported, False otherwise.
25
+ """
26
+ # Check if stdout encoding supports emoji
27
+ try:
28
+ encoding = getattr(sys.stdout, "encoding", None) or ""
29
+ if encoding.lower() in ("utf-8", "utf8"):
30
+ return True
31
+ # Try to encode an emoji to test
32
+ "🔥".encode(encoding)
33
+ return True
34
+ except (UnicodeEncodeError, LookupError):
35
+ return False
36
+
37
+
38
+ def get_pace_emoji(utilization: float, budget_pace: float, ascii_fallback: bool = False) -> str:
19
39
  """Get emoji indicator based on utilization vs budget pace.
20
40
 
21
41
  Args:
22
42
  utilization: Current utilization (0-1)
23
43
  budget_pace: Expected budget pace (0-1)
44
+ ascii_fallback: If True, use ASCII characters instead of emoji
24
45
 
25
46
  Returns:
26
47
  Emoji: 🧊 (behind), 🔥 (on pace), 🚨 (ahead)
48
+ ASCII: [_] (behind), [=] (on pace), [!] (ahead)
27
49
  """
50
+ use_ascii = ascii_fallback or not _supports_emoji()
51
+
28
52
  if budget_pace == 0:
29
- return "🔥"
53
+ return "[=]" if use_ascii else "🔥"
30
54
 
31
55
  ratio = utilization / budget_pace
32
56
  if ratio < 0.85:
33
- return "🧊" # Behind pace - ice cold, under budget
57
+ return "[_]" if use_ascii else "🧊" # Behind pace - ice cold, under budget
34
58
  elif ratio > 1.15:
35
- return "🚨" # Ahead of pace - alarm!
59
+ return "[!]" if use_ascii else "🚨" # Ahead of pace - alarm!
36
60
  else:
37
- return "🔥" # On pace - normal burn
61
+ return "[=]" if use_ascii else "🔥" # On pace - normal burn
38
62
 
39
63
 
40
64
  def create_header(limit_type: LimitType, limit_data: LimitData | None) -> Table:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ccburn
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Terminal-based Claude Code usage limit visualizer with real-time burn-up charts
5
5
  Author: JuanjoFuchs
6
6
  License-Expression: MIT
@@ -46,6 +46,9 @@ Dynamic: license-file
46
46
  [![Python](https://img.shields.io/pypi/pyversions/ccburn)](https://pypi.org/project/ccburn/)
47
47
  [![GitHub Release](https://img.shields.io/github/v/release/JuanjoFuchs/ccburn)](https://github.com/JuanjoFuchs/ccburn/releases)
48
48
  [![WinGet](https://img.shields.io/badge/WinGet-pending-yellow)](https://github.com/microsoft/winget-pkgs/pulls?q=is%3Apr+ccburn)
49
+ [![npm downloads](https://img.shields.io/npm/dt/ccburn?label=npm%20downloads)](https://www.npmjs.com/package/ccburn)
50
+ [![PyPI downloads](https://img.shields.io/pepy/dt/ccburn?label=pypi%20downloads)](https://pepy.tech/project/ccburn)
51
+ [![GitHub downloads](https://img.shields.io/github/downloads/JuanjoFuchs/ccburn/total?label=github%20downloads)](https://github.com/JuanjoFuchs/ccburn/releases)
49
52
  [![License](https://img.shields.io/github/license/JuanjoFuchs/ccburn)](LICENSE)
50
53
 
51
54
  <p align="center">
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes