Skip to content

Commit 671ed94

Browse files
committed
Add pg: print and gte function
1 parent 254281c commit 671ed94

File tree

4 files changed

+20
-15
lines changed

4 files changed

+20
-15
lines changed

eggdriver/app.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Imports
2-
from eggdriver.resources.console import get, clearConsole
2+
from eggdriver.resources.console import get, clearConsole, pg
33
from eggdriver.resources.constants import *
44
from eggdriver.resources.modules import installFromRequests, upgrade, Repo
55
from eggdriver.resources.help import help
@@ -43,21 +43,16 @@ def eggConsole(condition: bool = True):
4343
elif i == "$register":
4444
register()
4545
elif i == "$install":
46-
print(white + "Package:")
47-
name = get("egg")
46+
name = pg("Package:")
4847
installFromRequests([name], False)
4948
elif i == "$upgrade":
50-
print(white + "Package:")
51-
name = get("egg")
49+
name = pg("Package:")
5250
upgrade(name)
5351
elif i == "$pull":
54-
print(white + "Repo:")
55-
name = get("egg")
56-
repo = Repo(name)
57-
print(white + "Package:")
58-
package = get("egg")
59-
last = repo.pull(package)
60-
# *comming soon*
52+
org = pg("User or Organization:")
53+
name = pg("Repository:")
54+
repo = Repo(org, name)
55+
repo.pull()
6156
elif i == "$help":
6257
help()
6358
elif i == "$clear":

eggdriver/driver.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
>>> Requirement already satisfied: pip in <root> (21.2.4)
1515
"""
1616
def init():
17+
"""Upgrade pip and install all the packages in requests file"""
1718
install_option_1("$upgrade") # Upgrade pip
1819
sleep(10) # Waits 10 ms
1920
installFromRequests() # Install all the packages in requests file

eggdriver/pypi.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22

33
"""
44
FUNCTION build()
5+
Build and upload a pypi package release
56
7+
In Windows is equal to type in the console the following lines:
68
py -m build --sdist
79
py -m build --wheel
810
py -m twine check dist/*
911
py -m twine upload dist/*
1012
"""
1113
def build():
14+
"""Build and upload a pypi package release"""
1215
installFromRequests(["setuptools", "twine", "build"], False)
1316
sysCommand("-m build --sdist")
1417
sysCommand("-m build --wheel")

eggdriver/resources/console/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@
22
from eggdriver.resources.console.progress import *
33

44
def get(tag: str):
5-
i=input(blue+"$"+tag+"> "+green)
5+
i = input(blue + "$" + tag + "> " + green)
66
return i
77

8-
def put(content, colour = white):
9-
print(colour + content, end = "")
8+
def put(content, colour = white, ending = ""):
9+
print(colour + content, end = ending)
10+
11+
def pg(content: str, tag :str = "egg"):
12+
"""Print content and get an input"""
13+
print(white + content)
14+
g = get(tag)
15+
return g

0 commit comments

Comments
 (0)