Skip to content

Commit 034d89c

Browse files
committed
chore(bash client): initiates the bash interface
1 parent 4abf818 commit 034d89c

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ charset = utf-8
33
indent_style = space
44
end_of_line = lf
55
trim_trailing_whitespace = false
6+
indent_size = 2
67

78
[*.py]
89
indent_size = 4

generator.py

100644100755
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#! /usr/bin/env python3
2+
13
from pathlib import Path
24
from yaml import safe_load
35
from yaml import YAMLError
@@ -9,6 +11,20 @@
911
from conventions.no_convention import just_message
1012

1113
from utils import create_file
14+
from utils import supported_conventions as convention_list
15+
16+
import argparse
17+
18+
parser = argparse.ArgumentParser()
19+
parser.add_argument("--co-author",
20+
help="make your friend an co-author to the commit",
21+
dest="co_author", default=None)
22+
parser.add_argument("--no-generate",
23+
help="disables the creation of a commiter.yml file",
24+
default=True, type=bool)
25+
parser.add_argument('--convention', choices=convention_list,
26+
help="selects a convention to be used for the commit")
27+
parser.parse_args()
1228

1329
file_path = Path('commiter.yml')
1430
if file_path.is_file():

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
pyyaml==3.13
22
pytest==3.8.1
33
pycodestyle==2.4.0
4+
argparse==1.4.0

utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
from yaml import dump
22

3+
supported_conventions = [
4+
"angular",
5+
"changelog",
6+
"symphony",
7+
"message_only",
8+
]
39

410
def get_text(context=False):
511
if context:

0 commit comments

Comments
 (0)