git-ember 1.3.0__tar.gz → 1.3.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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Luka Vrataric
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,207 @@
1
+ Metadata-Version: 2.4
2
+ Name: git-ember
3
+ Version: 1.3.2
4
+ Summary: A GitHub-style heatmap of commits for your terminal
5
+ Requires-Python: >=3.11
6
+ Description-Content-Type: text/markdown
7
+ License-File: LICENSE
8
+ Requires-Dist: ruff>=0.15.9
9
+ Dynamic: license-file
10
+
11
+ # git-ember
12
+
13
+ A GitHub-style heatmap of commit activity for your terminal.
14
+
15
+ ## Overview
16
+
17
+ `git-ember` displays a colored grid representing commit activity over time, similar to the contribution graph shown on GitHub profiles. It reads directly from your local Git history—no external APIs or network requests required.
18
+
19
+ The tool supports multiple color schemes, branch filtering, custom date ranges, and can display repository statistics, recent commits, and branch tree visualizations.
20
+
21
+ ## Prerequisites
22
+
23
+ - Python 3.11 or higher
24
+ - Git installed and available in PATH
25
+
26
+ ## Installation
27
+
28
+ 1. Clone the repository:
29
+
30
+ ```bash
31
+ git clone https://codeberg.org/lukavr05/git-ember.git
32
+ cd git-ember
33
+ ```
34
+
35
+ 2. Install the package:
36
+
37
+ ```bash
38
+ pip install -e .
39
+ ```
40
+
41
+ 3. Verify the installation:
42
+
43
+ ```bash
44
+ git-ember --version
45
+ ```
46
+
47
+ ### Running without installation
48
+
49
+ If you prefer not to install the package, run directly:
50
+
51
+ ```bash
52
+ PYTHONPATH=src python3 main.py /path/to/repo
53
+ ```
54
+
55
+ ### Uninstall
56
+
57
+ ```bash
58
+ pip uninstall git-ember
59
+ ```
60
+
61
+ ## Configuration
62
+
63
+ git-ember reads configuration from `~/.config/git-ember/config.toml` (or platform-specific config directory). CLI arguments take precedence over config values.
64
+
65
+ | Variable | Required | Default | Description |
66
+ |-------------|----------|----------|--------------------------------|
67
+ | `color` | No | `green` | Color scheme name |
68
+ | `border` | No | `=` | Border character |
69
+ | `week_start`| No | `Sunday` | Week start day (Sunday/Monday) |
70
+
71
+ ### Example config file
72
+
73
+ ```toml
74
+ color = "blue"
75
+ border = "-"
76
+ week_start = "Monday"
77
+ ```
78
+
79
+ ## Usage
80
+
81
+ Show commit heatmap for the current year:
82
+
83
+ ```bash
84
+ git-ember
85
+ ```
86
+
87
+ Show heatmap for a specific repository:
88
+
89
+ ```bash
90
+ git-ember /path/to/repo
91
+ ```
92
+
93
+ Show multiple years:
94
+
95
+ ```bash
96
+ git-ember --years 2
97
+ git-ember -y 3
98
+ ```
99
+
100
+ Use different color schemes:
101
+
102
+ ```bash
103
+ git-ember --color green # default
104
+ git-ember --color blue
105
+ git-ember --color orange
106
+ git-ember --color purple
107
+ git-ember --color mono
108
+ ```
109
+
110
+ Show heatmap for a specific branch:
111
+
112
+ ```bash
113
+ git-ember --branch feature-x
114
+ ```
115
+
116
+ Display branch tree visualization:
117
+
118
+ ```bash
119
+ git-ember --tree
120
+ git-ember --branch feature-x --tree
121
+ ```
122
+
123
+ Show custom date range:
124
+
125
+ ```bash
126
+ git-ember --after 2025-01-01 --before 2025-06-30
127
+ git-ember --after 2025-01-01
128
+ ```
129
+
130
+ Show extended report with recent commits and top contributors:
131
+
132
+ ```bash
133
+ git-ember --extended
134
+ git-ember -e
135
+ ```
136
+
137
+ Show repository statistics:
138
+
139
+ ```bash
140
+ git-ember --stats
141
+ git-ember -S
142
+ ```
143
+
144
+ ### Command-line options
145
+
146
+ | Flag | Alias | Description | Default |
147
+ |---------------|----------|----------------------------------------------|-------------|
148
+ | `--color` | `-c` | Color scheme | `green` |
149
+ | `--years` | `-y` | Number of years to show | `1` |
150
+ | `--border` | `-b` | Border character | `=` |
151
+ | `--extended` | `-e` | Show recent commits and top contributors | `false` |
152
+ | `--stats` | `-S` | Show repository statistics | `false` |
153
+ | `--ascii` | `-a` | Use ASCII characters instead of Unicode | `false` |
154
+ | `--compact` | - | Show last 4 months only | `false` |
155
+ | `--branch` | - | Show heatmap for specific branch | all branches|
156
+ | `--tree` | `-t` | Show branch tree under heatmap | `false` |
157
+ | `--scale` | - | Intensity scaling: auto or adaptive | `auto` |
158
+ | `--after` | - | Show commits after date (YYYY-MM-DD) | - |
159
+ | `--before` | - | Show commits before date (YYYY-MM-DD) | - |
160
+ | `--version` | `-V` | Show version | - |
161
+ | `--help` | `-h` | Show help | - |
162
+
163
+ ## Project Structure
164
+
165
+ ```
166
+ git-ember/
167
+ ├── main.py # Entry point
168
+ ├── pyproject.toml # Package configuration
169
+ ├── Makefile # Build targets
170
+ ├── .python-version # Python version (3.11)
171
+ ├── README.md # This file
172
+ ├── docs/
173
+ │ ├── CHANGELOG.md # Version history
174
+ │ └── PLAN.md # Feature planning
175
+ ├── src/
176
+ │ └── gitember/
177
+ │ ├── __init__.py # Package version
178
+ │ ├── cli.py # CLI argument parsing and config
179
+ │ ├── git.py # Git command execution and parsing
180
+ │ ├── render.py # Grid and branch tree rendering
181
+ │ └── colors.py # ANSI color scheme definitions
182
+ └── tests/
183
+ ├── conftest.py # Pytest fixtures
184
+ ├── test_config.py # Config tests
185
+ ├── test_git.py # Git operations tests
186
+ └── test_render.py # Rendering tests
187
+ ```
188
+
189
+ ## Development
190
+
191
+ Run the linter:
192
+
193
+ ```bash
194
+ make lint
195
+ ```
196
+
197
+ Run tests:
198
+
199
+ ```bash
200
+ pytest
201
+ ```
202
+
203
+ > ⚠️ Note: Code coverage is not configured.
204
+
205
+ ## License
206
+
207
+ MIT License — see [LICENSE](LICENSE) for details.
@@ -0,0 +1,197 @@
1
+ # git-ember
2
+
3
+ A GitHub-style heatmap of commit activity for your terminal.
4
+
5
+ ## Overview
6
+
7
+ `git-ember` displays a colored grid representing commit activity over time, similar to the contribution graph shown on GitHub profiles. It reads directly from your local Git history—no external APIs or network requests required.
8
+
9
+ The tool supports multiple color schemes, branch filtering, custom date ranges, and can display repository statistics, recent commits, and branch tree visualizations.
10
+
11
+ ## Prerequisites
12
+
13
+ - Python 3.11 or higher
14
+ - Git installed and available in PATH
15
+
16
+ ## Installation
17
+
18
+ 1. Clone the repository:
19
+
20
+ ```bash
21
+ git clone https://codeberg.org/lukavr05/git-ember.git
22
+ cd git-ember
23
+ ```
24
+
25
+ 2. Install the package:
26
+
27
+ ```bash
28
+ pip install -e .
29
+ ```
30
+
31
+ 3. Verify the installation:
32
+
33
+ ```bash
34
+ git-ember --version
35
+ ```
36
+
37
+ ### Running without installation
38
+
39
+ If you prefer not to install the package, run directly:
40
+
41
+ ```bash
42
+ PYTHONPATH=src python3 main.py /path/to/repo
43
+ ```
44
+
45
+ ### Uninstall
46
+
47
+ ```bash
48
+ pip uninstall git-ember
49
+ ```
50
+
51
+ ## Configuration
52
+
53
+ git-ember reads configuration from `~/.config/git-ember/config.toml` (or platform-specific config directory). CLI arguments take precedence over config values.
54
+
55
+ | Variable | Required | Default | Description |
56
+ |-------------|----------|----------|--------------------------------|
57
+ | `color` | No | `green` | Color scheme name |
58
+ | `border` | No | `=` | Border character |
59
+ | `week_start`| No | `Sunday` | Week start day (Sunday/Monday) |
60
+
61
+ ### Example config file
62
+
63
+ ```toml
64
+ color = "blue"
65
+ border = "-"
66
+ week_start = "Monday"
67
+ ```
68
+
69
+ ## Usage
70
+
71
+ Show commit heatmap for the current year:
72
+
73
+ ```bash
74
+ git-ember
75
+ ```
76
+
77
+ Show heatmap for a specific repository:
78
+
79
+ ```bash
80
+ git-ember /path/to/repo
81
+ ```
82
+
83
+ Show multiple years:
84
+
85
+ ```bash
86
+ git-ember --years 2
87
+ git-ember -y 3
88
+ ```
89
+
90
+ Use different color schemes:
91
+
92
+ ```bash
93
+ git-ember --color green # default
94
+ git-ember --color blue
95
+ git-ember --color orange
96
+ git-ember --color purple
97
+ git-ember --color mono
98
+ ```
99
+
100
+ Show heatmap for a specific branch:
101
+
102
+ ```bash
103
+ git-ember --branch feature-x
104
+ ```
105
+
106
+ Display branch tree visualization:
107
+
108
+ ```bash
109
+ git-ember --tree
110
+ git-ember --branch feature-x --tree
111
+ ```
112
+
113
+ Show custom date range:
114
+
115
+ ```bash
116
+ git-ember --after 2025-01-01 --before 2025-06-30
117
+ git-ember --after 2025-01-01
118
+ ```
119
+
120
+ Show extended report with recent commits and top contributors:
121
+
122
+ ```bash
123
+ git-ember --extended
124
+ git-ember -e
125
+ ```
126
+
127
+ Show repository statistics:
128
+
129
+ ```bash
130
+ git-ember --stats
131
+ git-ember -S
132
+ ```
133
+
134
+ ### Command-line options
135
+
136
+ | Flag | Alias | Description | Default |
137
+ |---------------|----------|----------------------------------------------|-------------|
138
+ | `--color` | `-c` | Color scheme | `green` |
139
+ | `--years` | `-y` | Number of years to show | `1` |
140
+ | `--border` | `-b` | Border character | `=` |
141
+ | `--extended` | `-e` | Show recent commits and top contributors | `false` |
142
+ | `--stats` | `-S` | Show repository statistics | `false` |
143
+ | `--ascii` | `-a` | Use ASCII characters instead of Unicode | `false` |
144
+ | `--compact` | - | Show last 4 months only | `false` |
145
+ | `--branch` | - | Show heatmap for specific branch | all branches|
146
+ | `--tree` | `-t` | Show branch tree under heatmap | `false` |
147
+ | `--scale` | - | Intensity scaling: auto or adaptive | `auto` |
148
+ | `--after` | - | Show commits after date (YYYY-MM-DD) | - |
149
+ | `--before` | - | Show commits before date (YYYY-MM-DD) | - |
150
+ | `--version` | `-V` | Show version | - |
151
+ | `--help` | `-h` | Show help | - |
152
+
153
+ ## Project Structure
154
+
155
+ ```
156
+ git-ember/
157
+ ├── main.py # Entry point
158
+ ├── pyproject.toml # Package configuration
159
+ ├── Makefile # Build targets
160
+ ├── .python-version # Python version (3.11)
161
+ ├── README.md # This file
162
+ ├── docs/
163
+ │ ├── CHANGELOG.md # Version history
164
+ │ └── PLAN.md # Feature planning
165
+ ├── src/
166
+ │ └── gitember/
167
+ │ ├── __init__.py # Package version
168
+ │ ├── cli.py # CLI argument parsing and config
169
+ │ ├── git.py # Git command execution and parsing
170
+ │ ├── render.py # Grid and branch tree rendering
171
+ │ └── colors.py # ANSI color scheme definitions
172
+ └── tests/
173
+ ├── conftest.py # Pytest fixtures
174
+ ├── test_config.py # Config tests
175
+ ├── test_git.py # Git operations tests
176
+ └── test_render.py # Rendering tests
177
+ ```
178
+
179
+ ## Development
180
+
181
+ Run the linter:
182
+
183
+ ```bash
184
+ make lint
185
+ ```
186
+
187
+ Run tests:
188
+
189
+ ```bash
190
+ pytest
191
+ ```
192
+
193
+ > ⚠️ Note: Code coverage is not configured.
194
+
195
+ ## License
196
+
197
+ MIT License — see [LICENSE](LICENSE) for details.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "git-ember"
3
- version = "1.3.0"
3
+ version = "1.3.2"
4
4
  description = "A GitHub-style heatmap of commits for your terminal"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -0,0 +1,207 @@
1
+ Metadata-Version: 2.4
2
+ Name: git-ember
3
+ Version: 1.3.2
4
+ Summary: A GitHub-style heatmap of commits for your terminal
5
+ Requires-Python: >=3.11
6
+ Description-Content-Type: text/markdown
7
+ License-File: LICENSE
8
+ Requires-Dist: ruff>=0.15.9
9
+ Dynamic: license-file
10
+
11
+ # git-ember
12
+
13
+ A GitHub-style heatmap of commit activity for your terminal.
14
+
15
+ ## Overview
16
+
17
+ `git-ember` displays a colored grid representing commit activity over time, similar to the contribution graph shown on GitHub profiles. It reads directly from your local Git history—no external APIs or network requests required.
18
+
19
+ The tool supports multiple color schemes, branch filtering, custom date ranges, and can display repository statistics, recent commits, and branch tree visualizations.
20
+
21
+ ## Prerequisites
22
+
23
+ - Python 3.11 or higher
24
+ - Git installed and available in PATH
25
+
26
+ ## Installation
27
+
28
+ 1. Clone the repository:
29
+
30
+ ```bash
31
+ git clone https://codeberg.org/lukavr05/git-ember.git
32
+ cd git-ember
33
+ ```
34
+
35
+ 2. Install the package:
36
+
37
+ ```bash
38
+ pip install -e .
39
+ ```
40
+
41
+ 3. Verify the installation:
42
+
43
+ ```bash
44
+ git-ember --version
45
+ ```
46
+
47
+ ### Running without installation
48
+
49
+ If you prefer not to install the package, run directly:
50
+
51
+ ```bash
52
+ PYTHONPATH=src python3 main.py /path/to/repo
53
+ ```
54
+
55
+ ### Uninstall
56
+
57
+ ```bash
58
+ pip uninstall git-ember
59
+ ```
60
+
61
+ ## Configuration
62
+
63
+ git-ember reads configuration from `~/.config/git-ember/config.toml` (or platform-specific config directory). CLI arguments take precedence over config values.
64
+
65
+ | Variable | Required | Default | Description |
66
+ |-------------|----------|----------|--------------------------------|
67
+ | `color` | No | `green` | Color scheme name |
68
+ | `border` | No | `=` | Border character |
69
+ | `week_start`| No | `Sunday` | Week start day (Sunday/Monday) |
70
+
71
+ ### Example config file
72
+
73
+ ```toml
74
+ color = "blue"
75
+ border = "-"
76
+ week_start = "Monday"
77
+ ```
78
+
79
+ ## Usage
80
+
81
+ Show commit heatmap for the current year:
82
+
83
+ ```bash
84
+ git-ember
85
+ ```
86
+
87
+ Show heatmap for a specific repository:
88
+
89
+ ```bash
90
+ git-ember /path/to/repo
91
+ ```
92
+
93
+ Show multiple years:
94
+
95
+ ```bash
96
+ git-ember --years 2
97
+ git-ember -y 3
98
+ ```
99
+
100
+ Use different color schemes:
101
+
102
+ ```bash
103
+ git-ember --color green # default
104
+ git-ember --color blue
105
+ git-ember --color orange
106
+ git-ember --color purple
107
+ git-ember --color mono
108
+ ```
109
+
110
+ Show heatmap for a specific branch:
111
+
112
+ ```bash
113
+ git-ember --branch feature-x
114
+ ```
115
+
116
+ Display branch tree visualization:
117
+
118
+ ```bash
119
+ git-ember --tree
120
+ git-ember --branch feature-x --tree
121
+ ```
122
+
123
+ Show custom date range:
124
+
125
+ ```bash
126
+ git-ember --after 2025-01-01 --before 2025-06-30
127
+ git-ember --after 2025-01-01
128
+ ```
129
+
130
+ Show extended report with recent commits and top contributors:
131
+
132
+ ```bash
133
+ git-ember --extended
134
+ git-ember -e
135
+ ```
136
+
137
+ Show repository statistics:
138
+
139
+ ```bash
140
+ git-ember --stats
141
+ git-ember -S
142
+ ```
143
+
144
+ ### Command-line options
145
+
146
+ | Flag | Alias | Description | Default |
147
+ |---------------|----------|----------------------------------------------|-------------|
148
+ | `--color` | `-c` | Color scheme | `green` |
149
+ | `--years` | `-y` | Number of years to show | `1` |
150
+ | `--border` | `-b` | Border character | `=` |
151
+ | `--extended` | `-e` | Show recent commits and top contributors | `false` |
152
+ | `--stats` | `-S` | Show repository statistics | `false` |
153
+ | `--ascii` | `-a` | Use ASCII characters instead of Unicode | `false` |
154
+ | `--compact` | - | Show last 4 months only | `false` |
155
+ | `--branch` | - | Show heatmap for specific branch | all branches|
156
+ | `--tree` | `-t` | Show branch tree under heatmap | `false` |
157
+ | `--scale` | - | Intensity scaling: auto or adaptive | `auto` |
158
+ | `--after` | - | Show commits after date (YYYY-MM-DD) | - |
159
+ | `--before` | - | Show commits before date (YYYY-MM-DD) | - |
160
+ | `--version` | `-V` | Show version | - |
161
+ | `--help` | `-h` | Show help | - |
162
+
163
+ ## Project Structure
164
+
165
+ ```
166
+ git-ember/
167
+ ├── main.py # Entry point
168
+ ├── pyproject.toml # Package configuration
169
+ ├── Makefile # Build targets
170
+ ├── .python-version # Python version (3.11)
171
+ ├── README.md # This file
172
+ ├── docs/
173
+ │ ├── CHANGELOG.md # Version history
174
+ │ └── PLAN.md # Feature planning
175
+ ├── src/
176
+ │ └── gitember/
177
+ │ ├── __init__.py # Package version
178
+ │ ├── cli.py # CLI argument parsing and config
179
+ │ ├── git.py # Git command execution and parsing
180
+ │ ├── render.py # Grid and branch tree rendering
181
+ │ └── colors.py # ANSI color scheme definitions
182
+ └── tests/
183
+ ├── conftest.py # Pytest fixtures
184
+ ├── test_config.py # Config tests
185
+ ├── test_git.py # Git operations tests
186
+ └── test_render.py # Rendering tests
187
+ ```
188
+
189
+ ## Development
190
+
191
+ Run the linter:
192
+
193
+ ```bash
194
+ make lint
195
+ ```
196
+
197
+ Run tests:
198
+
199
+ ```bash
200
+ pytest
201
+ ```
202
+
203
+ > ⚠️ Note: Code coverage is not configured.
204
+
205
+ ## License
206
+
207
+ MIT License — see [LICENSE](LICENSE) for details.
@@ -1,3 +1,4 @@
1
+ LICENSE
1
2
  README.md
2
3
  pyproject.toml
3
4
  src/git_ember.egg-info/PKG-INFO
@@ -0,0 +1 @@
1
+ __version__ = "1.3.2"
@@ -7,7 +7,12 @@ from pathlib import Path
7
7
 
8
8
  from gitember import __version__
9
9
  from gitember.colors import get_color_scheme, RESET, LIGHT_GRAY
10
- from gitember.config import config_file_path, ALLOWED_CONFIG_KEYS, load_config, save_config
10
+ from gitember.config import (
11
+ config_file_path,
12
+ ALLOWED_CONFIG_KEYS,
13
+ load_config,
14
+ save_config,
15
+ )
11
16
  from gitember.git import (
12
17
  run_git_log,
13
18
  get_recent_commits,
@@ -18,7 +23,12 @@ from gitember.git import (
18
23
  get_default_branch,
19
24
  get_streaks,
20
25
  )
21
- from gitember.render import render_grid, render_branch_tree, calculate_thresholds, render_legend
26
+ from gitember.render import (
27
+ render_grid,
28
+ render_branch_tree,
29
+ calculate_thresholds,
30
+ render_legend,
31
+ )
22
32
 
23
33
 
24
34
  __all__ = ["main"]
@@ -125,7 +135,7 @@ def parse_args() -> argparse.Namespace:
125
135
  "--week-start",
126
136
  type=str,
127
137
  choices=["sunday", "monday"],
128
- default="sunday",
138
+ default=None,
129
139
  help="First day of week: sunday or monday (default: sunday)",
130
140
  )
131
141
  parser.add_argument(
@@ -351,9 +361,11 @@ def main() -> None:
351
361
  )
352
362
  print(f" {commit['message']}")
353
363
 
354
- print("\n--- Top Contributors ---")
364
+ print("\n--- Top Contributors ---")
355
365
  contrib_color = color_scheme.get(2)
356
- for contrib, count in get_top_contributors(repo_path, branch=branch, author=author):
366
+ for contrib, count in get_top_contributors(
367
+ repo_path, branch=branch, author=author
368
+ ):
357
369
  print(f" {count:>4} {contrib_color}{contrib}{RESET}")
358
370
 
359
371
 
@@ -33,23 +33,26 @@ def config_file_path() -> Path:
33
33
 
34
34
 
35
35
  ALLOWED_CONFIG_KEYS = {"color", "border", "week_start"}
36
- # NOTE: branch is intentionally excluded from config to avoid user confusion
36
+
37
+
38
+ DEFAULT_CONFIG = {
39
+ "color": "green",
40
+ "border": "=",
41
+ "week_start": "sunday",
42
+ }
37
43
 
38
44
 
39
45
  def load_config() -> dict:
40
46
  """Load config from file, returning defaults if not exists.
41
47
 
42
48
  Returns:
43
- Dict with keys: color, border.
49
+ Dict with keys: color, border, week_start.
44
50
  """
45
51
  path = config_file_path()
46
52
  if not path.exists():
47
- return {
48
- "color": "green",
49
- "border": "=",
50
- }
53
+ return DEFAULT_CONFIG.copy()
51
54
 
52
- config = {"color": "green", "border": "="}
55
+ config = DEFAULT_CONFIG.copy()
53
56
  try:
54
57
  text = path.read_text(encoding="utf-8")
55
58
  except OSError:
@@ -441,6 +441,10 @@ def get_streaks(counts: Dict[dt.date, int]) -> Dict[str, Any]:
441
441
 
442
442
  Returns:
443
443
  Dict with current_streak, longest_streak, longest_streak_end.
444
+
445
+ Note:
446
+ Current streak is limited to the last 30 days. If no commits in the
447
+ past 30 days, current_streak will be 0 regardless of historical activity.
444
448
  """
445
449
  if not counts:
446
450
  return {"current_streak": 0, "longest_streak": 0, "longest_streak_end": None}
@@ -40,21 +40,20 @@ def render_legend(
40
40
  parts = []
41
41
 
42
42
  t = thresholds
43
- parts.append(f"{color_scheme.get(0)}No commits{RESET}")
44
43
 
45
44
  if t[1] != t[2]:
46
- label = f"{t[1]}-{t[2]}"
45
+ label = f" 1-{t[1]}"
47
46
  parts.append(f"{color_scheme.get(1)}{block_chars[1]}{label}{RESET}")
48
47
 
49
- if t[2] != t[3]:
50
- label = f"{t[3] + 1}-{t[4]}"
48
+ if t[2] != t[3] and t[1] != t[2]:
49
+ label = f" {t[1] + 1}-{t[2]}"
51
50
  parts.append(f"{color_scheme.get(2)}{block_chars[2]}{label}{RESET}")
52
51
 
53
- if t[3] != t[4]:
54
- label = f"{t[4] + 1}+"
52
+ if t[3] != t[4] and t[2] != t[3]:
53
+ label = f" {t[2] + 1}-{t[3]}"
55
54
  parts.append(f"{color_scheme.get(3)}{block_chars[3]}{label}{RESET}")
56
55
 
57
- label = f"{t[4] + 1}+"
56
+ label = f" {t[3] + 1}+"
58
57
  parts.append(f"{color_scheme.get(4)}{block_chars[4]}{label}{RESET}")
59
58
 
60
59
  return " ".join(parts)
git_ember-1.3.0/PKG-INFO DELETED
@@ -1,184 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: git-ember
3
- Version: 1.3.0
4
- Summary: A GitHub-style heatmap of commits for your terminal
5
- Requires-Python: >=3.11
6
- Description-Content-Type: text/markdown
7
- Requires-Dist: ruff>=0.15.9
8
-
9
- # git-ember
10
-
11
- A GitHub-style heatmap of commit activity for your terminal.
12
-
13
- ## Overview
14
-
15
- `git-ember` displays a colored grid representing commit activity over time, similar to the contribution graph shown on GitHub profiles. It reads directly from your local Git history—no external APIs or network requests required.
16
-
17
- The tool supports multiple color schemes, branch filtering, custom date ranges, and can display repository statistics, recent commits, and top contributors.
18
-
19
- ## Prerequisites
20
-
21
- - Python 3.11 or higher
22
- - Git installed and available in PATH
23
-
24
- ## Installation
25
-
26
- 1. Clone the repository:
27
-
28
- ```bash
29
- git clone https://codeberg.org/lukavr05/git-ember.git
30
- cd git-ember
31
- ```
32
-
33
- 2. Install the package:
34
-
35
- ```bash
36
- pip install -e .
37
- ```
38
-
39
- ### Running without installation
40
-
41
- If you prefer not to install the package, run directly:
42
-
43
- ```bash
44
- PYTHONPATH=src python3 main.py .
45
- ```
46
-
47
- To verify the installation:
48
-
49
- ```bash
50
- git-ember --version
51
- ```
52
-
53
- To uninstall:
54
-
55
- ```bash
56
- pip uninstall git-ember
57
- ```
58
-
59
- ## Configuration
60
-
61
- git-ember reads configuration from `~/.config/git-ember/config.toml`. CLI arguments take precedence over config values.
62
-
63
- | Variable | Required | Default | Description |
64
- |----------|----------|---------|-------------|
65
- | `color` | No | `green` | Color scheme name |
66
- | `border` | No | `=` | Border character |
67
-
68
- ## Usage
69
-
70
- Show commit heatmap for the current year:
71
-
72
- ```bash
73
- git-ember
74
- ```
75
-
76
- Show heatmap for a specific repository:
77
-
78
- ```bash
79
- git-ember /path/to/repo
80
- ```
81
-
82
- Show multiple years:
83
-
84
- ```bash
85
- git-ember --years 2
86
- git-ember -y 3
87
- ```
88
-
89
- Use different color schemes:
90
-
91
- ```bash
92
- git-ember --color blue
93
- git-ember --color orange
94
- git-ember --color purple
95
- git-ember --color mono
96
- ```
97
-
98
- Show heatmap for a specific branch:
99
-
100
- ```bash
101
- git-ember --branch feature-x
102
- ```
103
-
104
- Display branch tree visualization:
105
-
106
- ```bash
107
- git-ember --tree
108
- git-ember --branch feature-x --tree
109
- ```
110
-
111
- Show custom date range:
112
-
113
- ```bash
114
- git-ember --after 2025-01-01 --before 2025-06-30
115
- git-ember --after 2025-01-01
116
- ```
117
-
118
- Show extended report with recent commits and top contributors:
119
-
120
- ```bash
121
- git-ember --extended
122
- git-ember -e
123
- ```
124
-
125
- Show repository statistics:
126
-
127
- ```bash
128
- git-ember --stats
129
- git-ember -S
130
- ```
131
-
132
- ### Command-line options
133
-
134
- | Flag | Alias | Description | Default |
135
- |------|-------|-------------|---------|
136
- | `--color` | `-c` | Color scheme | `green` |
137
- | `--years` | `-y` | Number of years to show | `1` |
138
- | `--border` | `-b` | Border character | `=` |
139
- | `--extended` | `-e` | Show recent commits and top contributors | `false` |
140
- | `--stats` | `-S` | Show repository statistics | `false` |
141
- | `--ascii` | `-a` | Use ASCII characters instead of Unicode | `false` |
142
- | `--compact` | - | Show last 4 months only | `false` |
143
- | `--branch` | - | Show heatmap for specific branch | all branches |
144
- | `--tree` | `-t` | Show branch tree under heatmap | `false` |
145
- | `--scale` | - | Intensity scaling: auto or adaptive | `auto` |
146
- | `--after` | - | Show commits after date (YYYY-MM-DD) | - |
147
- | `--before` | - | Show commits before date (YYYY-MM-DD) | - |
148
- | `--version` | `-V` | Show version | - |
149
- | `--help` | `-h` | Show help | - |
150
-
151
- ## Project Structure
152
-
153
- ```
154
- git-ember/
155
- ├── main.py # Entry point
156
- ├── pyproject.toml # Package configuration
157
- ├── Makefile # Build targets
158
- ├── .python-version # Python version (3.11)
159
- ├── README.md # This file
160
- ├── docs/
161
- │ ├── CHANGELOG.md # Version history
162
- │ └── PLAN.md # Feature planning
163
- └── src/
164
- └── gitember/
165
- ├── __init__.py # Package version
166
- ├── cli.py # CLI argument parsing and config
167
- ├── git.py # Git command execution and parsing
168
- ├── render.py # Grid and branch tree rendering
169
- └── colors.py # ANSI color scheme definitions
170
- ```
171
-
172
- ## Development
173
-
174
- Run the linter:
175
-
176
- ```bash
177
- make lint
178
- ```
179
-
180
- > ⚠️ Note: No test suite exists currently.
181
-
182
- ## License
183
-
184
- No LICENSE file exists in this repository.
git_ember-1.3.0/README.md DELETED
@@ -1,176 +0,0 @@
1
- # git-ember
2
-
3
- A GitHub-style heatmap of commit activity for your terminal.
4
-
5
- ## Overview
6
-
7
- `git-ember` displays a colored grid representing commit activity over time, similar to the contribution graph shown on GitHub profiles. It reads directly from your local Git history—no external APIs or network requests required.
8
-
9
- The tool supports multiple color schemes, branch filtering, custom date ranges, and can display repository statistics, recent commits, and top contributors.
10
-
11
- ## Prerequisites
12
-
13
- - Python 3.11 or higher
14
- - Git installed and available in PATH
15
-
16
- ## Installation
17
-
18
- 1. Clone the repository:
19
-
20
- ```bash
21
- git clone https://codeberg.org/lukavr05/git-ember.git
22
- cd git-ember
23
- ```
24
-
25
- 2. Install the package:
26
-
27
- ```bash
28
- pip install -e .
29
- ```
30
-
31
- ### Running without installation
32
-
33
- If you prefer not to install the package, run directly:
34
-
35
- ```bash
36
- PYTHONPATH=src python3 main.py .
37
- ```
38
-
39
- To verify the installation:
40
-
41
- ```bash
42
- git-ember --version
43
- ```
44
-
45
- To uninstall:
46
-
47
- ```bash
48
- pip uninstall git-ember
49
- ```
50
-
51
- ## Configuration
52
-
53
- git-ember reads configuration from `~/.config/git-ember/config.toml`. CLI arguments take precedence over config values.
54
-
55
- | Variable | Required | Default | Description |
56
- |----------|----------|---------|-------------|
57
- | `color` | No | `green` | Color scheme name |
58
- | `border` | No | `=` | Border character |
59
-
60
- ## Usage
61
-
62
- Show commit heatmap for the current year:
63
-
64
- ```bash
65
- git-ember
66
- ```
67
-
68
- Show heatmap for a specific repository:
69
-
70
- ```bash
71
- git-ember /path/to/repo
72
- ```
73
-
74
- Show multiple years:
75
-
76
- ```bash
77
- git-ember --years 2
78
- git-ember -y 3
79
- ```
80
-
81
- Use different color schemes:
82
-
83
- ```bash
84
- git-ember --color blue
85
- git-ember --color orange
86
- git-ember --color purple
87
- git-ember --color mono
88
- ```
89
-
90
- Show heatmap for a specific branch:
91
-
92
- ```bash
93
- git-ember --branch feature-x
94
- ```
95
-
96
- Display branch tree visualization:
97
-
98
- ```bash
99
- git-ember --tree
100
- git-ember --branch feature-x --tree
101
- ```
102
-
103
- Show custom date range:
104
-
105
- ```bash
106
- git-ember --after 2025-01-01 --before 2025-06-30
107
- git-ember --after 2025-01-01
108
- ```
109
-
110
- Show extended report with recent commits and top contributors:
111
-
112
- ```bash
113
- git-ember --extended
114
- git-ember -e
115
- ```
116
-
117
- Show repository statistics:
118
-
119
- ```bash
120
- git-ember --stats
121
- git-ember -S
122
- ```
123
-
124
- ### Command-line options
125
-
126
- | Flag | Alias | Description | Default |
127
- |------|-------|-------------|---------|
128
- | `--color` | `-c` | Color scheme | `green` |
129
- | `--years` | `-y` | Number of years to show | `1` |
130
- | `--border` | `-b` | Border character | `=` |
131
- | `--extended` | `-e` | Show recent commits and top contributors | `false` |
132
- | `--stats` | `-S` | Show repository statistics | `false` |
133
- | `--ascii` | `-a` | Use ASCII characters instead of Unicode | `false` |
134
- | `--compact` | - | Show last 4 months only | `false` |
135
- | `--branch` | - | Show heatmap for specific branch | all branches |
136
- | `--tree` | `-t` | Show branch tree under heatmap | `false` |
137
- | `--scale` | - | Intensity scaling: auto or adaptive | `auto` |
138
- | `--after` | - | Show commits after date (YYYY-MM-DD) | - |
139
- | `--before` | - | Show commits before date (YYYY-MM-DD) | - |
140
- | `--version` | `-V` | Show version | - |
141
- | `--help` | `-h` | Show help | - |
142
-
143
- ## Project Structure
144
-
145
- ```
146
- git-ember/
147
- ├── main.py # Entry point
148
- ├── pyproject.toml # Package configuration
149
- ├── Makefile # Build targets
150
- ├── .python-version # Python version (3.11)
151
- ├── README.md # This file
152
- ├── docs/
153
- │ ├── CHANGELOG.md # Version history
154
- │ └── PLAN.md # Feature planning
155
- └── src/
156
- └── gitember/
157
- ├── __init__.py # Package version
158
- ├── cli.py # CLI argument parsing and config
159
- ├── git.py # Git command execution and parsing
160
- ├── render.py # Grid and branch tree rendering
161
- └── colors.py # ANSI color scheme definitions
162
- ```
163
-
164
- ## Development
165
-
166
- Run the linter:
167
-
168
- ```bash
169
- make lint
170
- ```
171
-
172
- > ⚠️ Note: No test suite exists currently.
173
-
174
- ## License
175
-
176
- No LICENSE file exists in this repository.
@@ -1,184 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: git-ember
3
- Version: 1.3.0
4
- Summary: A GitHub-style heatmap of commits for your terminal
5
- Requires-Python: >=3.11
6
- Description-Content-Type: text/markdown
7
- Requires-Dist: ruff>=0.15.9
8
-
9
- # git-ember
10
-
11
- A GitHub-style heatmap of commit activity for your terminal.
12
-
13
- ## Overview
14
-
15
- `git-ember` displays a colored grid representing commit activity over time, similar to the contribution graph shown on GitHub profiles. It reads directly from your local Git history—no external APIs or network requests required.
16
-
17
- The tool supports multiple color schemes, branch filtering, custom date ranges, and can display repository statistics, recent commits, and top contributors.
18
-
19
- ## Prerequisites
20
-
21
- - Python 3.11 or higher
22
- - Git installed and available in PATH
23
-
24
- ## Installation
25
-
26
- 1. Clone the repository:
27
-
28
- ```bash
29
- git clone https://codeberg.org/lukavr05/git-ember.git
30
- cd git-ember
31
- ```
32
-
33
- 2. Install the package:
34
-
35
- ```bash
36
- pip install -e .
37
- ```
38
-
39
- ### Running without installation
40
-
41
- If you prefer not to install the package, run directly:
42
-
43
- ```bash
44
- PYTHONPATH=src python3 main.py .
45
- ```
46
-
47
- To verify the installation:
48
-
49
- ```bash
50
- git-ember --version
51
- ```
52
-
53
- To uninstall:
54
-
55
- ```bash
56
- pip uninstall git-ember
57
- ```
58
-
59
- ## Configuration
60
-
61
- git-ember reads configuration from `~/.config/git-ember/config.toml`. CLI arguments take precedence over config values.
62
-
63
- | Variable | Required | Default | Description |
64
- |----------|----------|---------|-------------|
65
- | `color` | No | `green` | Color scheme name |
66
- | `border` | No | `=` | Border character |
67
-
68
- ## Usage
69
-
70
- Show commit heatmap for the current year:
71
-
72
- ```bash
73
- git-ember
74
- ```
75
-
76
- Show heatmap for a specific repository:
77
-
78
- ```bash
79
- git-ember /path/to/repo
80
- ```
81
-
82
- Show multiple years:
83
-
84
- ```bash
85
- git-ember --years 2
86
- git-ember -y 3
87
- ```
88
-
89
- Use different color schemes:
90
-
91
- ```bash
92
- git-ember --color blue
93
- git-ember --color orange
94
- git-ember --color purple
95
- git-ember --color mono
96
- ```
97
-
98
- Show heatmap for a specific branch:
99
-
100
- ```bash
101
- git-ember --branch feature-x
102
- ```
103
-
104
- Display branch tree visualization:
105
-
106
- ```bash
107
- git-ember --tree
108
- git-ember --branch feature-x --tree
109
- ```
110
-
111
- Show custom date range:
112
-
113
- ```bash
114
- git-ember --after 2025-01-01 --before 2025-06-30
115
- git-ember --after 2025-01-01
116
- ```
117
-
118
- Show extended report with recent commits and top contributors:
119
-
120
- ```bash
121
- git-ember --extended
122
- git-ember -e
123
- ```
124
-
125
- Show repository statistics:
126
-
127
- ```bash
128
- git-ember --stats
129
- git-ember -S
130
- ```
131
-
132
- ### Command-line options
133
-
134
- | Flag | Alias | Description | Default |
135
- |------|-------|-------------|---------|
136
- | `--color` | `-c` | Color scheme | `green` |
137
- | `--years` | `-y` | Number of years to show | `1` |
138
- | `--border` | `-b` | Border character | `=` |
139
- | `--extended` | `-e` | Show recent commits and top contributors | `false` |
140
- | `--stats` | `-S` | Show repository statistics | `false` |
141
- | `--ascii` | `-a` | Use ASCII characters instead of Unicode | `false` |
142
- | `--compact` | - | Show last 4 months only | `false` |
143
- | `--branch` | - | Show heatmap for specific branch | all branches |
144
- | `--tree` | `-t` | Show branch tree under heatmap | `false` |
145
- | `--scale` | - | Intensity scaling: auto or adaptive | `auto` |
146
- | `--after` | - | Show commits after date (YYYY-MM-DD) | - |
147
- | `--before` | - | Show commits before date (YYYY-MM-DD) | - |
148
- | `--version` | `-V` | Show version | - |
149
- | `--help` | `-h` | Show help | - |
150
-
151
- ## Project Structure
152
-
153
- ```
154
- git-ember/
155
- ├── main.py # Entry point
156
- ├── pyproject.toml # Package configuration
157
- ├── Makefile # Build targets
158
- ├── .python-version # Python version (3.11)
159
- ├── README.md # This file
160
- ├── docs/
161
- │ ├── CHANGELOG.md # Version history
162
- │ └── PLAN.md # Feature planning
163
- └── src/
164
- └── gitember/
165
- ├── __init__.py # Package version
166
- ├── cli.py # CLI argument parsing and config
167
- ├── git.py # Git command execution and parsing
168
- ├── render.py # Grid and branch tree rendering
169
- └── colors.py # ANSI color scheme definitions
170
- ```
171
-
172
- ## Development
173
-
174
- Run the linter:
175
-
176
- ```bash
177
- make lint
178
- ```
179
-
180
- > ⚠️ Note: No test suite exists currently.
181
-
182
- ## License
183
-
184
- No LICENSE file exists in this repository.
@@ -1 +0,0 @@
1
- __version__ = "1.2.0"
File without changes
File without changes