laminate-cli 0.1.4__tar.gz → 0.1.6__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: laminate-cli
3
- Version: 0.1.4
3
+ Version: 0.1.6
4
4
  Summary: Generate release-ready changelogs from git history using a local LLM
5
5
  Author-email: Apleut <me@apleut.dev>
6
6
  License-Expression: MIT
@@ -109,7 +109,7 @@ Laminate runs a **local GGUF model** using [`llama-cpp-python`](https://github.c
109
109
 
110
110
  Laminate looks for exactly one `.gguf` file in two places, in this order:
111
111
 
112
- 1. **A `models/` folder in your current directory**, which the recommended location if you're running Laminate from a cloned repo:
112
+ 1. **A `models/` folder in your current directory**, which is the recommended location if you're running Laminate from a cloned repo:
113
113
 
114
114
  ```text
115
115
  models/
@@ -138,11 +138,7 @@ From inside a Git repository:
138
138
  laminate
139
139
  ```
140
140
 
141
- Laminate will read the repository's commit history, categorize the changes, and write the result to:
142
-
143
- ```text
144
- CHANGELOG.md
145
- ```
141
+ Laminate will read the repository's commit history, categorize the changes, and write the result to `CHANGELOG.md`
146
142
 
147
143
  For example:
148
144
 
@@ -184,6 +180,9 @@ Only include commits before a specific date.
184
180
  laminate --until 2026-10-01
185
181
  ```
186
182
 
183
+ > [!IMPORTANT]
184
+ > Both `--since` and `--until` use YYYY-MM-DD format for dates.
185
+
187
186
  ### `--range`
188
187
 
189
188
  Process a specific Git commit range.
@@ -192,6 +191,12 @@ Process a specific Git commit range.
192
191
  laminate --range v1.0.0..v1.1.0
193
192
  ```
194
193
 
194
+ You can also use `--range` to read commits from a specific version to the last commit, like this:
195
+
196
+ ```bash
197
+ laminate --range v1.0.0..HEAD
198
+ ```
199
+
195
200
  `--range` overrides `--since` and `--until`.
196
201
 
197
202
  This is particularly useful when generating a changelog for a release.
@@ -240,6 +245,10 @@ Without `--release`, Laminate generates:
240
245
  ## [Unreleased]
241
246
  ```
242
247
 
248
+ ### `--append`
249
+
250
+ Append the new changelog contents to the output file instead of completely overwriting them. Without `--append`, the changelog will only contain the commit range you specified. If you include `--append` though, it will simply add that release to the top of the file.
251
+
243
252
  ## Example
244
253
 
245
254
  Suppose your repository contains commits like:
@@ -319,7 +328,3 @@ If you find a problem with Laminate, please open an issue with:
319
328
  Or email me at [me@apleut.dev](me@apleut.dev).
320
329
 
321
330
  For changes to Laminate itself, pull requests are welcome.
322
-
323
- ## License
324
-
325
- License information will be added before the first stable release.
@@ -84,7 +84,7 @@ Laminate runs a **local GGUF model** using [`llama-cpp-python`](https://github.c
84
84
 
85
85
  Laminate looks for exactly one `.gguf` file in two places, in this order:
86
86
 
87
- 1. **A `models/` folder in your current directory**, which the recommended location if you're running Laminate from a cloned repo:
87
+ 1. **A `models/` folder in your current directory**, which is the recommended location if you're running Laminate from a cloned repo:
88
88
 
89
89
  ```text
90
90
  models/
@@ -113,11 +113,7 @@ From inside a Git repository:
113
113
  laminate
114
114
  ```
115
115
 
116
- Laminate will read the repository's commit history, categorize the changes, and write the result to:
117
-
118
- ```text
119
- CHANGELOG.md
120
- ```
116
+ Laminate will read the repository's commit history, categorize the changes, and write the result to `CHANGELOG.md`
121
117
 
122
118
  For example:
123
119
 
@@ -159,6 +155,9 @@ Only include commits before a specific date.
159
155
  laminate --until 2026-10-01
160
156
  ```
161
157
 
158
+ > [!IMPORTANT]
159
+ > Both `--since` and `--until` use YYYY-MM-DD format for dates.
160
+
162
161
  ### `--range`
163
162
 
164
163
  Process a specific Git commit range.
@@ -167,6 +166,12 @@ Process a specific Git commit range.
167
166
  laminate --range v1.0.0..v1.1.0
168
167
  ```
169
168
 
169
+ You can also use `--range` to read commits from a specific version to the last commit, like this:
170
+
171
+ ```bash
172
+ laminate --range v1.0.0..HEAD
173
+ ```
174
+
170
175
  `--range` overrides `--since` and `--until`.
171
176
 
172
177
  This is particularly useful when generating a changelog for a release.
@@ -215,6 +220,10 @@ Without `--release`, Laminate generates:
215
220
  ## [Unreleased]
216
221
  ```
217
222
 
223
+ ### `--append`
224
+
225
+ Append the new changelog contents to the output file instead of completely overwriting them. Without `--append`, the changelog will only contain the commit range you specified. If you include `--append` though, it will simply add that release to the top of the file.
226
+
218
227
  ## Example
219
228
 
220
229
  Suppose your repository contains commits like:
@@ -293,8 +302,4 @@ If you find a problem with Laminate, please open an issue with:
293
302
 
294
303
  Or email me at [me@apleut.dev](me@apleut.dev).
295
304
 
296
- For changes to Laminate itself, pull requests are welcome.
297
-
298
- ## License
299
-
300
- License information will be added before the first stable release.
305
+ For changes to Laminate itself, pull requests are welcome.
@@ -38,6 +38,7 @@ def generate(
38
38
  output: str = typer.Option("CHANGELOG.md", help="Path to write the generated changelog to."),
39
39
  batch_size: int = typer.Option(15, "--batch-size", help="Number of commits sent to the LLM per batch."),
40
40
  release: str = typer.Option(None, "--release", help="Version number for this release, e.g. 1.1.0. If omitted, the changelog is headed [Unreleased]."),
41
+ append: bool = typer.Option(False, "--append", help="Appends the new changelog contents to the existing file instead of overwriting it."),
41
42
  version: bool = typer.Option(
42
43
  False,
43
44
  "--version",
@@ -100,7 +101,7 @@ def generate(
100
101
  raise typer.Exit(code=1)
101
102
 
102
103
  changelog = render_changelog(entries, version=release)
103
- write_changelog(changelog, output)
104
+ write_changelog(changelog, output, append)
104
105
 
105
106
  typer.echo(f"\nDone. Changelog written to {output}", file=sys.stdout)
106
107
 
@@ -47,7 +47,14 @@ def render_changelog(entries: list[CategorizedEntry], version: str | None = None
47
47
  return "\n".join(lines).rstrip() + "\n"
48
48
 
49
49
 
50
- def write_changelog(content: str, output_path: str = "CHANGELOG.md") -> None:
50
+ def write_changelog(content: str, output_path: str = "CHANGELOG.md", append: bool | None = None) -> None:
51
+ if append is True:
52
+ with open(output_path, "r", encoding="utf-8") as f:
53
+ existing_content = f.read()
54
+ existing_stub = existing_content[existing_content.find('## [') + 1:]
55
+
56
+ content = content + "\n" + existing_stub
57
+
51
58
  with open(output_path, "w", encoding="utf-8") as f:
52
59
  f.write(content)
53
60
 
@@ -67,5 +74,5 @@ if __name__ == "__main__":
67
74
  changelog = render_changelog(entries)
68
75
 
69
76
  print(changelog)
70
- write_changelog(changelog)
77
+ write_changelog(changelog, append=True)
71
78
  print("Wrote changelog.md")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: laminate-cli
3
- Version: 0.1.4
3
+ Version: 0.1.6
4
4
  Summary: Generate release-ready changelogs from git history using a local LLM
5
5
  Author-email: Apleut <me@apleut.dev>
6
6
  License-Expression: MIT
@@ -109,7 +109,7 @@ Laminate runs a **local GGUF model** using [`llama-cpp-python`](https://github.c
109
109
 
110
110
  Laminate looks for exactly one `.gguf` file in two places, in this order:
111
111
 
112
- 1. **A `models/` folder in your current directory**, which the recommended location if you're running Laminate from a cloned repo:
112
+ 1. **A `models/` folder in your current directory**, which is the recommended location if you're running Laminate from a cloned repo:
113
113
 
114
114
  ```text
115
115
  models/
@@ -138,11 +138,7 @@ From inside a Git repository:
138
138
  laminate
139
139
  ```
140
140
 
141
- Laminate will read the repository's commit history, categorize the changes, and write the result to:
142
-
143
- ```text
144
- CHANGELOG.md
145
- ```
141
+ Laminate will read the repository's commit history, categorize the changes, and write the result to `CHANGELOG.md`
146
142
 
147
143
  For example:
148
144
 
@@ -184,6 +180,9 @@ Only include commits before a specific date.
184
180
  laminate --until 2026-10-01
185
181
  ```
186
182
 
183
+ > [!IMPORTANT]
184
+ > Both `--since` and `--until` use YYYY-MM-DD format for dates.
185
+
187
186
  ### `--range`
188
187
 
189
188
  Process a specific Git commit range.
@@ -192,6 +191,12 @@ Process a specific Git commit range.
192
191
  laminate --range v1.0.0..v1.1.0
193
192
  ```
194
193
 
194
+ You can also use `--range` to read commits from a specific version to the last commit, like this:
195
+
196
+ ```bash
197
+ laminate --range v1.0.0..HEAD
198
+ ```
199
+
195
200
  `--range` overrides `--since` and `--until`.
196
201
 
197
202
  This is particularly useful when generating a changelog for a release.
@@ -240,6 +245,10 @@ Without `--release`, Laminate generates:
240
245
  ## [Unreleased]
241
246
  ```
242
247
 
248
+ ### `--append`
249
+
250
+ Append the new changelog contents to the output file instead of completely overwriting them. Without `--append`, the changelog will only contain the commit range you specified. If you include `--append` though, it will simply add that release to the top of the file.
251
+
243
252
  ## Example
244
253
 
245
254
  Suppose your repository contains commits like:
@@ -319,7 +328,3 @@ If you find a problem with Laminate, please open an issue with:
319
328
  Or email me at [me@apleut.dev](me@apleut.dev).
320
329
 
321
330
  For changes to Laminate itself, pull requests are welcome.
322
-
323
- ## License
324
-
325
- License information will be added before the first stable release.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "laminate-cli"
3
- version = "0.1.4"
3
+ version = "0.1.6"
4
4
  authors = [
5
5
  { name="Apleut", email="me@apleut.dev" },
6
6
  ]
File without changes
File without changes