Skip to content

Commit 113e8e6

Browse files
committed
chore(readme): updated the readme usage section
Co-authored-by:
1 parent 1ab0639 commit 113e8e6

File tree

1 file changed

+38
-19
lines changed

1 file changed

+38
-19
lines changed

README.md

Lines changed: 38 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ Just follow the commands below:
2020
# have git ready to use
2121
$ sudo apt install python3-pip git
2222

23-
$ pip3 install -r requirements.txt
24-
2523
# clone the repo into your home
2624
$ git clone https://github.com/andre-filho/commit-helper.git ~/.commit-helper
2725

26+
$ pip3 install -r ~/.commit-helper/requirements.txt
27+
2828
# create a function in your .bashrc
2929
$ echo "commit(){ python3 ~/.commit-helper/generator.py; }" >> ~/.bashrc
3030

@@ -34,7 +34,41 @@ Just follow the commands below:
3434

3535
## Usage and configuration
3636

37-
For this project to work smoothly, you must have in your working directory a file named **commiter.yml**. In this file you must pass the commit convention that you want to use, following the example:
37+
This program has a cli that you can take advantage of. Running `commit --help`
38+
will show you the usage and options for your commit. All of them are optional
39+
for the sake of not losing your precious time.
40+
41+
```bash
42+
$ commit -h
43+
usage: generator.py [-h] [--co-author CO_AUTHOR] [--no-generate NO_FILE]
44+
[--convention {angular,changelog,symphony,message}]
45+
46+
A commit formatter tool to help you follow commit conventions.
47+
48+
optional arguments:
49+
-h, --help show this help message and exit
50+
--co-author CO_AUTHOR
51+
make your friend an co-author to the commit
52+
--no-generate NO_FILE
53+
disables the creation of a commiter.yml file
54+
--convention {angular,changelog,symphony,message}
55+
Selects a convention to be used for the commit.
56+
Required if there is no commiter.yml file.
57+
```
58+
59+
So, if you want to write a co-authored commit, you should use:
60+
61+
```bash
62+
$ commit --co-author "foo bar doritous <foobar@douritos.com>"
63+
```
64+
65+
Or if you are using this for the first time in your project:
66+
67+
```bash
68+
$ commit --convention changelog
69+
```
70+
71+
To work even more smoothly, have in your working directory a file named **commiter.yml**. In this file you must pass the commit convention that you want to use, following the example:
3872
3973
```yaml
4074
convention: angular # tag(context): commit message
@@ -53,27 +87,11 @@ convention: none # Commit message
5387
```
5488
5589
Supported conventions available:
56-
<!-- list here all tags that are used in configuration file -->
5790
5891
- angular/karma
5992
- changelog
6093
- symphony
6194
62-
In the event of no commiter.yml file presence, you will be prompted with the following option menu:
63-
64-
```bash
65-
No config files found!
66-
Running default script...
67-
what type of commit convention are you using?
68-
69-
(default): No convention
70-
1: Karma/Angular
71-
2: Conventional changelog
72-
3: Symfony CMF
73-
74-
```
75-
76-
7795
7896
## Project's maintainers
7997
| **Name** | **Username** |
@@ -84,3 +102,4 @@ Running default script...
84102
| **Name** | **Username** |
85103
| :------: | :----------: |
86104
| Arthur José Benedito de Oliveira Assis | @arthur120496 |
105+

0 commit comments

Comments
 (0)