mirror of
https://github.com/master-of-zen/Av1an.git
synced 2024-11-25 02:29:40 +00:00
remove configs code
This commit is contained in:
parent
4c314b96de
commit
5b43d333e0
1 changed files with 0 additions and 24 deletions
|
@ -28,17 +28,8 @@ class Args:
|
|||
|
||||
self.project = Project(self.parsed)
|
||||
|
||||
if self.project.config:
|
||||
self.save_load_project_file()
|
||||
|
||||
return self.project
|
||||
|
||||
def get_difference(self) -> dict:
|
||||
"""
|
||||
Return difference of defaults and new
|
||||
"""
|
||||
return dict([x for x in self.parsed.items() if x not in self.defaults.items()])
|
||||
|
||||
def parse(self):
|
||||
"""
|
||||
Parse command line parameters provided by user
|
||||
|
@ -49,18 +40,3 @@ class Args:
|
|||
if not self.parsed["input"]:
|
||||
print("No input")
|
||||
sys.exit()
|
||||
|
||||
def save_load_project_file(self):
|
||||
"""
|
||||
Saves current/Loads given project file, loads saved project first and when overwrites only unique values from current parse
|
||||
"""
|
||||
cfg_path = Path(self.project.config)
|
||||
|
||||
if cfg_path.exists():
|
||||
|
||||
new = self.get_difference()
|
||||
self.project.load_project_from_file(self.project.config)
|
||||
self.project.load_project(new)
|
||||
|
||||
else:
|
||||
self.project.save_project_to_file(self.project.config)
|
||||
|
|
Loading…
Reference in a new issue