git-to-doc 0.2.2__tar.gz → 0.2.3__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: git-to-doc
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Conventional Commit messages, changelogs & PRs from git diffs using Gemma (local or cloud)
5
5
  Requires-Python: >=3.9
6
6
  Description-Content-Type: text/markdown
@@ -31,10 +31,11 @@ Developers write terrible commit messages and skip doc updates. `git-to-doc` is
31
31
  ## Commands
32
32
 
33
33
  ```bash
34
- # diff → commit message + changelog + plain-English summary
34
+ # diff → commit message + changelog + plain-English summary (saves to markdown by default)
35
35
  git-to-doc sample.diff
36
36
  git-to-doc https://github.com/pallets/flask/pull/5000 --output both
37
37
  git-to-doc ./diffs/ --output md # batch a folder
38
+ git-to-doc https://github.com/google/jax/pull/123 --output stdout # print to terminal
38
39
 
39
40
  # generate (and open) a pull request from the current branch
40
41
  git-to-doc pull-request # preview
@@ -20,10 +20,11 @@ Developers write terrible commit messages and skip doc updates. `git-to-doc` is
20
20
  ## Commands
21
21
 
22
22
  ```bash
23
- # diff → commit message + changelog + plain-English summary
23
+ # diff → commit message + changelog + plain-English summary (saves to markdown by default)
24
24
  git-to-doc sample.diff
25
25
  git-to-doc https://github.com/pallets/flask/pull/5000 --output both
26
26
  git-to-doc ./diffs/ --output md # batch a folder
27
+ git-to-doc https://github.com/google/jax/pull/123 --output stdout # print to terminal
27
28
 
28
29
  # generate (and open) a pull request from the current branch
29
30
  git-to-doc pull-request # preview
@@ -130,7 +130,7 @@ def process_diff(diff_text: str, stem: str, model: str,
130
130
  elapsed = time.time() - t0
131
131
  print(_c(f" ⚡ Inference done in {elapsed:.1f}s", DIM))
132
132
 
133
- if fmt is None:
133
+ if fmt == "stdout":
134
134
  print(render_full_output(result))
135
135
 
136
136
  if fmt in ("md", "both"):
@@ -153,9 +153,9 @@ def cmd_doc(argv):
153
153
  formatter_class=argparse.RawDescriptionHelpFormatter, epilog=__doc__)
154
154
  parser.add_argument("input",
155
155
  help="GitHub PR URL, '-' for stdin, a local .diff file, or a folder of .diff files")
156
- parser.add_argument("--output", nargs="?", const="md", default=None,
157
- metavar="{md,json,both}",
158
- help="Save output: 'md' (default when flag used), 'json', or 'both'.")
156
+ parser.add_argument("--output", nargs="?", const="md", default="md",
157
+ metavar="{md,json,both,stdout}",
158
+ help="Save output: 'md' (default), 'json', 'both', or 'stdout' (print to terminal).")
159
159
  parser.add_argument("--model", default="gemma4", help="Ollama model name (default: gemma4)")
160
160
  parser.add_argument("--commit-msg", action="store_true", help=argparse.SUPPRESS)
161
161
  args = parser.parse_args(argv)
@@ -167,8 +167,8 @@ def cmd_doc(argv):
167
167
  print(render_commit_message(analyze_diff(diff_text, model=args.model)))
168
168
  return
169
169
 
170
- if args.output not in {"md", "json", "both", None}:
171
- print(_c(f" ✗ --output must be md, json, or both (got '{args.output}')", RED)); sys.exit(1)
170
+ if args.output not in {"md", "json", "both", "stdout"}:
171
+ print(_c(f" ✗ --output must be md, json, both, or stdout (got '{args.output}')", RED)); sys.exit(1)
172
172
  fmt = args.output
173
173
 
174
174
  print(_c("\n 🔍 git-to-doc", BOLD, CYAN) + _c(f" {args.model} · {backend()}", DIM))
@@ -309,7 +309,7 @@ def _top_help():
309
309
  {_c(" git-to-doc", BOLD, CYAN)} {_c("— Conventional Commits, changelogs & PRs from git diffs, via Gemma", DIM)}
310
310
 
311
311
  {_c(" COMMANDS", BOLD)}
312
- {_c("git-to-doc <input>", BOLD)} [--output md|json|both] [--model M]
312
+ {_c("git-to-doc <input>", BOLD)} [--output md|json|both|stdout] [--model M]
313
313
  Generate a Conventional Commit message + changelog + plain-English summary.
314
314
  <input> = a GitHub PR URL, '-' for stdin, a .diff/.txt file, or a folder of .diff files.
315
315
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git-to-doc
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Conventional Commit messages, changelogs & PRs from git diffs using Gemma (local or cloud)
5
5
  Requires-Python: >=3.9
6
6
  Description-Content-Type: text/markdown
@@ -31,10 +31,11 @@ Developers write terrible commit messages and skip doc updates. `git-to-doc` is
31
31
  ## Commands
32
32
 
33
33
  ```bash
34
- # diff → commit message + changelog + plain-English summary
34
+ # diff → commit message + changelog + plain-English summary (saves to markdown by default)
35
35
  git-to-doc sample.diff
36
36
  git-to-doc https://github.com/pallets/flask/pull/5000 --output both
37
37
  git-to-doc ./diffs/ --output md # batch a folder
38
+ git-to-doc https://github.com/google/jax/pull/123 --output stdout # print to terminal
38
39
 
39
40
  # generate (and open) a pull request from the current branch
40
41
  git-to-doc pull-request # preview
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "git-to-doc"
7
- version = "0.2.2"
7
+ version = "0.2.3"
8
8
  description = "Conventional Commit messages, changelogs & PRs from git diffs using Gemma (local or cloud)"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
File without changes