Skip to content

Commit e3a5bc0

Browse files
authored
v08.01
1 parent a5ebc13 commit e3a5bc0

File tree

7 files changed

+41
-11
lines changed

7 files changed

+41
-11
lines changed

choco/ReadMe.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# createstructure
2-
[![GitHub license](https://img.shields.io/badge/license-GNU-green?style=flat)](https://github.com/createstructure/createstructure/blob/master/LICENSE) ![Author](https://img.shields.io/badge/author-Castellani%20Davide-green?style=flat) ![Version](https://img.shields.io/badge/version-v7.9-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/createstructure/createstructure) ![PyPI](https://img.shields.io/pypi/v/createstructure)
2+
[![GitHub license](https://img.shields.io/badge/license-GNU-green?style=flat)](https://github.com/createstructure/createstructure/blob/master/LICENSE) ![Author](https://img.shields.io/badge/author-Castellani%20Davide-green?style=flat) ![Version](https://img.shields.io/badge/version-v08.01-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/createstructure/createstructure) ![PyPI](https://img.shields.io/pypi/v/createstructure)
33

44
![](https://github.com/CastellaniDavide/createstructure/raw/master/docs/createstructure.png)
55

@@ -182,6 +182,8 @@ With this program, you can easily create a repository on GitHub :octocat: with a
182182

183183
### Changelog
184184
![](https://www.ashoka.org/sites/default/files/styles/medium_1600x1000/public/old_way_new_way.jpg?itok=3JnbJz4O)
185+
- [08.01_2021-04-15](#0801_2021-04-15)
186+
- [7.9_2021-04-04](#79_2021-04-04)
185187
- [7.8_2021-03-14](#78_2021-03-14)
186188
- [7.7_2021-03-14](#77_2021-03-14)
187189
- [7.6_2021-03-13](#76_2021-03-13)
@@ -206,6 +208,10 @@ With this program, you can easily create a repository on GitHub :octocat: with a
206208
- [2.0_2020-03-24](#20_2020-03-24)
207209
- [1.0_2020-03-24](#10_2020-03-24)
208210

211+
#### 08.01_2021-04-15
212+
- Added the download option
213+
- Minor changes
214+
209215
#### 7.9_2021-04-04
210216
- Fixed a bug in the python code
211217
- Optimized choco package

choco/createstructure.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
33
<metadata>
44
<id>createstructure</id>
5-
<version>7.9</version>
5+
<version>08.01</version>
66
<title>createstructure</title>
77
<authors>Castellani Davide</authors>
88
<projectUrl>https://github.com/createstructure/createstructure</projectUrl>

createstructure/__init__.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@
1212
from time import sleep
1313
from threading import Thread, active_count, Lock
1414
from sys import argv
15+
from os import system
1516

1617
__author__ = "help@castellanidavide.it"
17-
__version__ = "7.9 2021-04-04"
18+
__version__ = "08.01 2021-04-15"
1819

1920
class createstructure:
20-
def __init__ (self, token=None, souces=['CastellaniDavide'], organization_name="", IGNORE=[], verbose=False, template=False, answers=None):
21+
def __init__ (self, token=None, organization_name="", IGNORE=[], verbose=False, template=False, answers=None):
2122
"""Main function
2223
"""
2324
# Set main variabiles
@@ -51,6 +52,9 @@ def __init__ (self, token=None, souces=['CastellaniDavide'], organization_name="
5152
# Make all
5253
self.scan_and_elaborate()
5354

55+
# Eventually download
56+
self.download()
57+
5458
def initial_inputs(self):
5559
"""Initial input read
5660
"""
@@ -88,15 +92,13 @@ def initial_inputs(self):
8892
documentation = ["usage createstructure",
8993
"\t[--ignore= | -i=]",
9094
"\t[--organization= | -o=]",
91-
"\t[--sources= | -s=]",
9295
"\t[--template | -temp]"
9396
"\t[--token= | -t=]",
9497
"\t[--verbose | -v]",
9598
"",
9699
"These are the createstructure arguments:",
97100
"\t--ignore= or -i= (optional) The folders to be ignored",
98101
"\t--organization= or -o= (optional) The organization name, leave empty if you want to create repos in your personal account",
99-
"\t--sources= or -s= (optional) The array with your favourite sources, for eg. ['CastellaniDavide']",
100102
"\t--token= or -t= The GitHub tocken with repo and organization permission",
101103
"\t--template= or -temp= Create a template",
102104
"\t--verbose or -v Verbose option, you will see the main variabiles and lots more"
@@ -125,6 +127,7 @@ def asks(self):
125127
["prefix", "Insert a prefix for the repository (or don't insert anything): "],
126128
["team", "Do you want insert this repo into a team? [y/N]: "],
127129
["private", "Is that private? [y/N]: "],
130+
["download", "Want you download the repo? [Y/n]: "],
128131
]
129132
self.ANSWERS = {}
130133

@@ -296,10 +299,18 @@ def create_file(self, path, file):
296299
except:
297300
print(f"There was an error to this file: {path}")
298301

299-
def is_positive(answer):
302+
def download(self):
303+
"""If requested download repo
304+
"""
305+
if createstructure.is_positive(self.ANSWERS["download"], empty=True):
306+
while active_count() != 1: pass # Wait creation is ultimated
307+
_ = system(f"git clone {self.repo.clone_url} --quiet")
308+
print(f"{self.get_emoji('ok')}Downloaded repo")
309+
310+
def is_positive(answer, empty=False):
300311
"""Returns true is the answer is affermative
301312
"""
302-
return answer in ["y", "Y", "yes", "Yes"]
313+
return answer in ["y", "Y", "yes", "Yes"] or empty and answer == ""
303314

304315
def get_emoji(self, emoji):
305316
"""Returns the selected emoji

debian/createstructure.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.\" This man page for createstructure
2-
.TH createstructure "1" "2021-01-06" "createstructure 7.0" "User Commands"
2+
.TH createstructure "1" "2021-04-15" "createstructure 08.01" "User Commands"
33
.SH NAME
44
createstructure
55
.SH SYNOPSIS

debian/debian/changelog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
createstructure (08.01) focal; urgency=medium
2+
3+
* Added the download option
4+
* Minor changes
5+
6+
-- Castellani Davide <help@castellanidavide.it> Thu, 15 Apr 2021 18:45:00 +1000
7+
18
createstructure (7.9) focal; urgency=medium
29

310
* Fixed a bug in the python code

docs/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# createstructure
2-
[![GitHub license](https://img.shields.io/badge/license-GNU-green?style=flat)](https://github.com/createstructure/createstructure/blob/master/LICENSE) ![Author](https://img.shields.io/badge/author-Castellani%20Davide-green?style=flat) ![Version](https://img.shields.io/badge/version-v7.9-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/createstructure/createstructure) ![PyPI](https://img.shields.io/pypi/v/createstructure)
2+
[![GitHub license](https://img.shields.io/badge/license-GNU-green?style=flat)](https://github.com/createstructure/createstructure/blob/master/LICENSE) ![Author](https://img.shields.io/badge/author-Castellani%20Davide-green?style=flat) ![Version](https://img.shields.io/badge/version-v08.01-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/createstructure/createstructure) ![PyPI](https://img.shields.io/pypi/v/createstructure)
33

44
![](https://github.com/CastellaniDavide/createstructure/raw/master/docs/createstructure.png)
55

@@ -182,6 +182,8 @@ With this program, you can easily create a repository on GitHub :octocat: with a
182182

183183
### Changelog
184184
![](https://www.ashoka.org/sites/default/files/styles/medium_1600x1000/public/old_way_new_way.jpg?itok=3JnbJz4O)
185+
- [08.01_2021-04-15](#0801_2021-04-15)
186+
- [7.9_2021-04-04](#79_2021-04-04)
185187
- [7.8_2021-03-14](#78_2021-03-14)
186188
- [7.7_2021-03-14](#77_2021-03-14)
187189
- [7.6_2021-03-13](#76_2021-03-13)
@@ -206,6 +208,10 @@ With this program, you can easily create a repository on GitHub :octocat: with a
206208
- [2.0_2020-03-24](#20_2020-03-24)
207209
- [1.0_2020-03-24](#10_2020-03-24)
208210

211+
#### 08.01_2021-04-15
212+
- Added the download option
213+
- Minor changes
214+
209215
#### 7.9_2021-04-04
210216
- Fixed a bug in the python code
211217
- Optimized choco package

snap/snapcraft.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: createstructure
2-
version: '7.9'
2+
version: '08.01'
33
summary: With this program, you can easily create a repository on GitHub.
44
description: |
55
With this program, you can easily create a repository on GitHub with a basic template, personalized for your use.

0 commit comments

Comments
 (0)