created formatting style

This commit is contained in:
Xevion
2019-11-09 20:44:44 -06:00
parent ede4004fed
commit 0d51908f77
2 changed files with 36 additions and 6 deletions

View File

@@ -1,4 +1,24 @@
class SpecsWindows(object): class WindowsSpecs(object):
def __init__(self):
pass
@property
def mobo():
pass
@property
def cpu():
pass
@property
def gpu():
pass
@property
def os():
pass
class LinuxSpecs(object):
def __init__(self): def __init__(self):
pass pass

View File

@@ -5,6 +5,7 @@ import platform
import shutil import shutil
from . import log from . import log
from .app import WindowsSpecs, LinuxSpecs
log.info('') log.info('')
@@ -21,11 +22,20 @@ def collect():
if not shutil.which('msinfo32'): if not shutil.which('msinfo32'):
log.critical('msinfo32 not detected in path') log.critical('msinfo32 not detected in path')
raise click.ClickException('msinfo32 not detected in path - override to use linux OS specs detection via --linux') raise click.ClickException('msinfo32 not detected in path - override to use linux OS specs detection via --linux')
print( model = WindowsSpecs()
f'{key} : {value}' for key, value in { output = """::: {} Specs :::
'Motherboard' : 'Motherboard' : {motherboard},
} 'Processor' : {cpu},
'Graphics Card' : {gpu},
'Drives' : {disks}
"""
output = output.format(
motherboard=model.mobo,
cpu=model.cpu,
gpu=model.gpu,
disks=model.disks
) )
print(output)
else: else:
log.critical(f'Unspported Platform \"{systype}\/{sysname}" detected, failing') log.critical(f'Unsupported Platform \"{systype}\/{sysname}" detected, failing')
return return