parent
0d4c6460e7
commit
033898ccc0
3 changed files with 17 additions and 0 deletions
|
@ -12,7 +12,9 @@ from cd.projects import Projects
|
||||||
COMMANDS_PREFIX = "cd-"
|
COMMANDS_PREFIX = "cd-"
|
||||||
|
|
||||||
projects = Projects()
|
projects = Projects()
|
||||||
|
print(projects)
|
||||||
project = Project(projects)
|
project = Project(projects)
|
||||||
|
print(project)
|
||||||
|
|
||||||
|
|
||||||
def cd_browse_workspace() -> None:
|
def cd_browse_workspace() -> None:
|
||||||
|
|
|
@ -40,3 +40,11 @@ class Project:
|
||||||
self.root = value
|
self.root = value
|
||||||
# url
|
# url
|
||||||
self.url = urljoin(projects.url, self.name)
|
self.url = urljoin(projects.url, self.name)
|
||||||
|
|
||||||
|
def __str__(self: Project) -> str:
|
||||||
|
return """\
|
||||||
|
branch = {self.branch}
|
||||||
|
name = {self.name}
|
||||||
|
root = {self.root}
|
||||||
|
url = {self.url}
|
||||||
|
"""
|
||||||
|
|
|
@ -29,3 +29,10 @@ class Projects:
|
||||||
for variable in SERVER_URL:
|
for variable in SERVER_URL:
|
||||||
if value := self.environment.get(variable, None):
|
if value := self.environment.get(variable, None):
|
||||||
self.url = urljoin(value, self.group)
|
self.url = urljoin(value, self.group)
|
||||||
|
|
||||||
|
def __str__(self: Projects) -> str:
|
||||||
|
return """\
|
||||||
|
group = {self.group}
|
||||||
|
name = {self.name}
|
||||||
|
url = {self.url}
|
||||||
|
"""
|
||||||
|
|
Loading…
Reference in a new issue