Skip to content

Commit 34d2add

Browse files
authored
v6.2
1 parent fe90c42 commit 34d2add

2 files changed

Lines changed: 15 additions & 11 deletions

File tree

create_structure/__init__.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def initial_inputs(self):
8080
# Check all data
8181
assert(self.TOKEN != "TODO" and self.TOKEN != None and self.TOKEN != "***")
8282

83-
if self.VERBOSE : print(f"self.CONTINUE\t\t\t{self.CONTINUE}\nself.TOKEN\t\t\t{self.TOKEN}\nself.SOURCES_OF_TEMPLATES\t{self.SOURCES_OF_TEMPLATES}\nself.ORGANIZATION_NAME\t\t{self.ORGANIZATION_NAME}\nself.IGNORE\t\t{self.IGNORE}\nself.VERBOSE\t\t\t{self.VERBOSE}")
83+
if self.VERBOSE : print(f"\u2139 self.CONTINUE\t\t\t{self.CONTINUE}\n\u2139 self.TOKEN\t\t\t{self.TOKEN}\n\u2139 self.SOURCES_OF_TEMPLATES\t{self.SOURCES_OF_TEMPLATES}\n\u2139 self.ORGANIZATION_NAME\t{self.ORGANIZATION_NAME}\n\u2139 self.IGNORE\t\t\t{self.IGNORE}\n\u2139 self.VERBOSE\t\t\t{self.VERBOSE}")
8484

8585
except:
8686
self.CONTINUE = False
@@ -121,7 +121,7 @@ def asks(self):
121121
["descr", "Description of the project: "],
122122
["prefix", "Insert a prefix for the repository (or don't insert anything): "],
123123
["team", "Do you want insert this repo into a team? [y/N]: "],
124-
["private", "Is that private? [y/N]: "],
124+
["private", "Is that private? [y/N]: "],
125125
]
126126
self.ANSWERS = {}
127127

@@ -130,10 +130,10 @@ def asks(self):
130130
if question_tag == "team":
131131
self.ANSWERS["team"] = "" # default value
132132
if self.ORGANIZATION_NAME != "": # If there is an organization
133-
if create_structure.is_positive(input(current_quest)):
133+
if create_structure.is_positive(input(f"\u2753 {current_quest}")):
134134
self.choose_team()
135135
else:
136-
self.ANSWERS[question_tag] = input(current_quest)
136+
self.ANSWERS[question_tag] = input(f"\u2753 {current_quest}")
137137

138138
print()
139139

@@ -148,13 +148,13 @@ def choose_team(self):
148148
# Give the option to the user
149149
for i, team in enumerate(teams):
150150
nteams += 1
151-
print(f"{i})\t{team.name}")
151+
print(f"\t{i})\t{team.name}")
152152

153153
assert (nteams != 0)
154154

155155
# Save the team choosen
156156
try:
157-
self.ANSWERS["team"] = teams[int(input("Insert your team number: "))].id
157+
self.ANSWERS["team"] = teams[int(input("\u2753 Insert your team number: "))].id
158158
except:
159159
print("This team didn't exist, try again")
160160
self.choose_team()
@@ -172,7 +172,7 @@ def create_repo(self):
172172
else:
173173
self.repo = self.g.get_organization(self.ORGANIZATION_NAME).create_repo(self.ANSWERS['name'] if(self.ANSWERS['prefix'] == "") else f"{self.ANSWERS['prefix']}-{self.ANSWERS['name']}", description=self.ANSWERS['descr'], private=create_structure.is_positive(self.ANSWERS['private']), has_issues=True, has_wiki=False, has_downloads=True, has_projects=False, team_id=self.ANSWERS["team"])
174174

175-
print(f"Repo built")
175+
print(f"\u2714 Repo built")
176176

177177
def choose_template(self):
178178
"""This helps to find the correct template
@@ -201,7 +201,7 @@ def choose_template(self):
201201
pass
202202

203203
self.template = self.g.get_repo(self.template_name)
204-
print(f"Template founded ({self.template_name})")
204+
print(f"\u2714 Template founded ({self.template_name})")
205205

206206
def scan_and_elaborate(self, loc=""):
207207
"""Scan all files in the repository and push it in the new directory (cahanging the necessary)
@@ -255,7 +255,7 @@ def create_file (self, path, file):
255255
"""
256256
try:
257257
self.repo.create_file(path, f"Created {path}", file)
258-
print(f"Created {path}")
258+
print(f"\u2714 Created {path}")
259259
except:
260260
# If it's an error, possible with multitreading, try again
261261
sleep(0.5)

docs/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# create_structure
2-
[![GitHub license](https://img.shields.io/badge/license-GNU-green?style=flat)](https://github.com/CastellaniDavide/cpp-create_structure/blob/master/LICENSE) ![Author](https://img.shields.io/badge/author-Castellani%20Davide-green?style=flat) ![Version](https://img.shields.io/badge/version-v6.1-blue?style=flat) ![Language Python](https://img.shields.io/badge/language-Python-yellowgreen?style=flat) ![sys.platform supported](https://img.shields.io/badge/OS%20platform%20supported-Linux,%20Windows%20&%20Mac%20OS-blue?style=flat) [![On GitHub](https://img.shields.io/badge/on%20GitHub-True-green?style=flat&logo=github)](https://github.com/CastellaniDavide/create_structure) ![PyPI](https://img.shields.io/pypi/v/createstructure)
2+
[![GitHub license](https://img.shields.io/badge/license-GNU-green?style=flat)](https://github.com/CastellaniDavide/cpp-create_structure/blob/master/LICENSE) ![Author](https://img.shields.io/badge/author-Castellani%20Davide-green?style=flat) ![Version](https://img.shields.io/badge/version-v6.2-blue?style=flat) ![Language Python](https://img.shields.io/badge/language-Python-yellowgreen?style=flat) ![sys.platform supported](https://img.shields.io/badge/OS%20platform%20supported-Linux,%20Windows%20&%20Mac%20OS-blue?style=flat) [![On GitHub](https://img.shields.io/badge/on%20GitHub-True-green?style=flat&logo=github)](https://github.com/CastellaniDavide/create_structure) ![PyPI](https://img.shields.io/pypi/v/createstructure)
33

44
## Contents
55
- [Description](#description)
@@ -90,7 +90,8 @@ With this programm you can easily create a repository on GitHub :octocat: with a
9090
- Try to execute this programm and check correct use
9191

9292
### Changelog
93-
- [6.1_2021-01-03](#60_2021-01-03)
93+
- [6.2_2021-01-04](#62_2021-01-04)
94+
- [6.1_2021-01-03](#61_2021-01-03)
9495
- [6.0_2020-12-16](#60_2020-12-16)
9596
- [5.5_2020-12-13](#55_2020-12-13)
9697
- [5.4_2020-12-12](#54_2020-12-12)
@@ -104,6 +105,9 @@ With this programm you can easily create a repository on GitHub :octocat: with a
104105
- [2.0_2020-03-24](#20_2020-03-24)
105106
- [1.0_2020-03-24](#10_2020-03-24)
106107

108+
#### 6.2_2021-01-04
109+
- Added emoji :smile: to the output
110+
107111
#### 6.1_2021-01-03
108112
- Fixed a bug
109113
- Adjusted variable names

0 commit comments

Comments
 (0)