mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-27 09:58:10 +01:00
Updated view version
This commit is contained in:
parent
3e3cb45ea7
commit
4612c98590
2 changed files with 9 additions and 2 deletions
|
@ -6,7 +6,6 @@ import sys
|
|||
from dataclasses import dataclass
|
||||
|
||||
from slpkg.cli_menu import usage
|
||||
from slpkg.configs import Configs
|
||||
from slpkg.slackbuild import Slackbuilds
|
||||
from slpkg.remove_packages import RemovePackages
|
||||
from slpkg.update_repository import UpdateRepository
|
||||
|
@ -50,7 +49,8 @@ class Argparse:
|
|||
usage(0)
|
||||
|
||||
if self.args[0] in ['--version', '-v']:
|
||||
print(f'{Configs.prog_name}: {Version.version}')
|
||||
version = Version()
|
||||
version.view()
|
||||
raise SystemExit()
|
||||
|
||||
if self.args[0] == 'clean-logs':
|
||||
|
|
|
@ -3,11 +3,18 @@
|
|||
|
||||
|
||||
from dataclasses import dataclass
|
||||
from slpkg.configs import Configs
|
||||
|
||||
|
||||
@dataclass
|
||||
class Version:
|
||||
prog_name: str = Configs.prog_name
|
||||
version_info: tuple = (4, 1, 0)
|
||||
version: str = '{0}.{1}.{2}'.format(*version_info)
|
||||
license: str = 'MIT License'
|
||||
author: str = 'dslackw'
|
||||
homepage: str = 'https://dslackw.gitlab.io/slpkg'
|
||||
|
||||
def view(self):
|
||||
print(f'{self.prog_name} version: {self.version}\n'
|
||||
f'Homepage: {self.homepage}')
|
||||
|
|
Loading…
Reference in a new issue