From 9f4df08ba0b8790709263785d1a421ed57323944 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 17 Jan 2023 20:32:44 +0200 Subject: [PATCH] Updated for vertical print --- slpkg/tracking.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/slpkg/tracking.py b/slpkg/tracking.py index 95ec443e..a9285231 100644 --- a/slpkg/tracking.py +++ b/slpkg/tracking.py @@ -14,6 +14,7 @@ class Tracking(Configs): self.ascii = Ascii() self.llc = self.ascii.lower_left_corner self.hl = self.ascii.horizontal_line + self.vl = self.ascii.vertical_line self.color = self.colour() self.cyan = self.color['cyan'] self.grey = self.color['grey'] @@ -25,6 +26,7 @@ class Tracking(Configs): print(f"The list below shows the packages with dependencies:\n") char = f' {self.llc}{self.hl}' + sp = ' ' * 4 for package in packages: requires = Requires(package).resolve() how_many = len(requires) @@ -33,5 +35,10 @@ class Tracking(Configs): requires = ['No dependencies'] print(f'{self.yellow}{package}{self.endc}') - print(f'{char} {self.cyan}{" ".join([req for req in requires])}{self.endc}') + print(char, end='') + for i, req in enumerate(requires, start=1): + if i == 1: + print(f' {self.cyan}{req}{self.endc}') + else: + print(f'{sp}{self.cyan}{req}{self.endc}') print(f'\n{self.grey}{how_many} dependencies for {package}{self.endc}\n')