Skip to content

Commit a29af2c

Browse files
committed
Continue packaging (pawamoy#6)
1 parent 1219eaf commit a29af2c

4 files changed

Lines changed: 90 additions & 2 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ example2/
55
example3/
66
output.md
77
__pycache__/
8+
src/dist/
9+
src/README.md

README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# gitolog
2+
Automatic changelog generator. From git logs to change logs.
3+
4+
- Installation: `sudo pip3 install gitolog`
5+
- Features:
6+
- [Jinja2][jinja2] templates!
7+
You get full control over the rendering.
8+
Built-in [Keep a Changelog][keep-a-changelog] and [Angular][angular] templates
9+
(also see [Conventional Changelog][conventional-changelog]).
10+
- Commit styles/conventions parsing.
11+
Built-in [Angular][angular-style], [Atom][atom-style] and basic styles.
12+
- Git service/provider agnostic,
13+
plus references parsing (issues, commits, etc.).
14+
Built-in [GitHub][github-refs] and [Gitlab][gitlab-refs] support.
15+
- Understands [Semantic Versioning][semantic-versioning]:
16+
major/minor/patch for versions and commits.
17+
Guesses next version based on last commits.
18+
- Todo:
19+
- [Plugin architecture][issue-7],
20+
to support more commit styles and git services.
21+
- [Template context injection][issue-4],
22+
to furthermore customize how your changelog will be rendered.
23+
- [Easy access to "Breaking Changes"][issue-1] in the templates.
24+
- [Update changelog in-place][issue-2], paired with
25+
[commits/dates/versions range limitation ability][issue-3].
26+
27+
## Command-line
28+
29+
```console
30+
$ gitolog --help
31+
usage: gitolog [-h] [-o OUTPUT] [-s {angular,atom,basic}]
32+
[-t {angular,keepachangelog}] [-v]
33+
REPOSITORY
34+
35+
Command line tool for gitolog Python package.
36+
37+
positional arguments:
38+
REPOSITORY The repository path, relative or absolute.
39+
40+
optional arguments:
41+
-h, --help Show this help message and exit.
42+
-o OUTPUT, --output OUTPUT
43+
Output to given file. Default: stdout.
44+
-s {angular,atom,basic}, --style {angular,atom,basic}
45+
The commit style to match against.
46+
-t {angular,keepachangelog}, --template {angular,keepachangelog}
47+
The Jinja2 template to use. Prefix with "path:" to
48+
specify the path to a directory containing a file
49+
named "changelog.md".
50+
-v, --version Show the current version of the program and exit.
51+
```
52+
53+
[jinja2]: http://jinja.pocoo.org/
54+
[keep-a-changelog]: http://keepachangelog.com/en/1.0.0/
55+
[angular]: https://github.com/angular/angular/blob/master/CHANGELOG.md
56+
[conventional-changelog]: https://github.com/conventional-changelog/conventional-changelog
57+
[semantic-versioning]: http://semver.org/spec/v2.0.0.html
58+
[atom-style]: https://github.com/atom/atom/blob/master/CONTRIBUTING.md#git-commit-messages
59+
[angular-style]: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit
60+
[github-refs]: https://help.github.com/articles/autolinked-references-and-urls/
61+
[gitlab-refs]: https://docs.gitlab.com/ce/user/markdown.html#special-gitlab-references
62+
63+
[issue-1]: https://gitlab.com/pawamoy/gitolog/issues/1
64+
[issue-2]: https://gitlab.com/pawamoy/gitolog/issues/2
65+
[issue-3]: https://gitlab.com/pawamoy/gitolog/issues/3
66+
[issue-4]: https://gitlab.com/pawamoy/gitolog/issues/4
67+
[issue-5]: https://gitlab.com/pawamoy/gitolog/issues/5
68+
[issue-6]: https://gitlab.com/pawamoy/gitolog/issues/6
69+
[issue-7]: https://gitlab.com/pawamoy/gitolog/issues/7

src/gitolog/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
from .build import Gitolog
2323

2424

25-
STYLES = ('basic', 'angular', 'atom')
25+
STYLES = ('angular', 'atom', 'basic')
2626

2727

28-
class Templates(set):
28+
class Templates(tuple):
2929
def __contains__(self, item):
3030
return item.startswith('path:') or super(Templates, self).__contains__(item)
3131

src/pyproject.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[build-system]
2+
requires = ["flit"]
3+
build-backend = "flit.buildapi"
4+
5+
[tool.flit.metadata]
6+
module = "gitolog"
7+
author = "Timothée Mazzucotelli"
8+
author-email = "timothee.mazzucotelli@protonmail.com"
9+
home-page = "https://gitlab.com/pawamoy/gitolog"
10+
requires = ["jinja2"]
11+
description-file = "README.md"
12+
classifiers = [
13+
"Intended Audience :: Developers",
14+
"License :: OSI Approved :: ISC License (ISCL)",
15+
"Programming Language :: Python :: 3",
16+
"Topic :: Software Development"
17+
]

0 commit comments

Comments
 (0)