Added homepage

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2022-11-24 11:11:14 +02:00
parent b91963ed9f
commit 6d9a1290d4
2 changed files with 5 additions and 1 deletions

View file

@ -1,6 +1,7 @@
4.3.0 - 23/11/2022
Added:
- Message for blacklisted packages
- Homepage in the view command
Updated:
- The cli menu

View file

@ -46,8 +46,10 @@ class ViewPackage:
info_file = http.request(
'GET', f'{self.sbo_repo_url}/{info[9]}/{info[0]}/{info[0]}.info')
maintainer, email = '', ''
maintainer, email, homepage = '', '', ''
for line in info_file.data.decode().splitlines():
if line.startswith('HOMEPAGE'):
homepage = line[10:-1].strip()
if line.startswith('MAINTAINER'):
maintainer = line[12:-1].strip()
if line.startswith('EMAIL'):
@ -56,6 +58,7 @@ class ViewPackage:
print(f'Name: {GREEN}{info[0]}{ENDC}\n'
f'Version: {GREEN}{info[1]}{ENDC}\n'
f'Requires: {GREEN}{info[2]}{ENDC}\n'
f'Homepage: {BLUE}{homepage}{ENDC}\n'
f'Download SlackBuild: {BLUE}{self.sbo_repo_url}/{info[9]}/{info[0]}{self.sbo_tar_suffix}{ENDC}\n'
f'Download sources: {BLUE}{info[3]}{ENDC}\n'
f'Download_x86_64 sources: {BLUE}{info[4]}{ENDC}\n'