Moved ddrescue-tui settings to separate file

This commit is contained in:
2Shirt 2019-03-05 18:05:25 -07:00
parent 974e20df05
commit d03772666d
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
2 changed files with 41 additions and 30 deletions

View file

@ -1,4 +1,4 @@
# Wizard Kit: Functions - ddrescue
# Wizard Kit: Functions - ddrescue-tui
import json
import pathlib
@ -13,35 +13,7 @@ from functions.data import *
from functions.hw_diags import *
from functions.tmux import *
from operator import itemgetter
# STATIC VARIABLES
AUTO_PASS_1_THRESHOLD = 95
AUTO_PASS_2_THRESHOLD = 98
DDRESCUE_SETTINGS = {
'--binary-prefixes': {'Enabled': True, 'Hidden': True},
'--data-preview': {'Enabled': True, 'Hidden': True, 'Value': '5'},
'--idirect': {'Enabled': True},
'--odirect': {'Enabled': True},
'--max-read-rate': {'Enabled': False, 'Value': '1MiB'},
'--min-read-rate': {'Enabled': True, 'Value': '64KiB'},
'--reopen-on-error': {'Enabled': True},
'--retry-passes': {'Enabled': True, 'Value': '0'},
'--test-mode': {'Enabled': False, 'Value': 'test.map'},
'--timeout': {'Enabled': True, 'Value': '5m'},
'-vvvv': {'Enabled': True, 'Hidden': True},
}
RECOMMENDED_FSTYPES = ['ext3', 'ext4', 'xfs']
SIDE_PANE_WIDTH = 21
TMUX_LAYOUT = OrderedDict({
'Source': {'y': 2, 'Check': True},
'Started': {'x': SIDE_PANE_WIDTH, 'Check': True},
'Progress': {'x': SIDE_PANE_WIDTH, 'Check': True},
})
USAGE = """ {script_name} clone [source [destination]]
{script_name} image [source [destination]]
(e.g. {script_name} clone /dev/sda /dev/sdb)
"""
from settings.ddrescue import *
# Clases

View file

@ -0,0 +1,39 @@
# Wizard Kit: Settings - ddrescue-tui
# General
RECOMMENDED_FSTYPES = ['ext3', 'ext4', 'xfs']
USAGE = """ {script_name} clone [source [destination]]
{script_name} image [source [destination]]
(e.g. {script_name} clone /dev/sda /dev/sdb)
"""
# Layout
SIDE_PANE_WIDTH = 21
TMUX_LAYOUT = OrderedDict({
'Source': {'y': 2, 'Check': True},
'Started': {'x': SIDE_PANE_WIDTH, 'Check': True},
'Progress': {'x': SIDE_PANE_WIDTH, 'Check': True},
})
# ddrescue
AUTO_PASS_1_THRESHOLD = 95
AUTO_PASS_2_THRESHOLD = 98
DDRESCUE_SETTINGS = {
'--binary-prefixes': {'Enabled': True, 'Hidden': True, },
'--data-preview': {'Enabled': True, 'Value': '5', 'Hidden': True, },
'--idirect': {'Enabled': True, },
'--odirect': {'Enabled': True, },
'--max-read-rate': {'Enabled': False, 'Value': '1MiB', },
'--min-read-rate': {'Enabled': True, 'Value': '64KiB', },
'--reopen-on-error': {'Enabled': True, },
'--retry-passes': {'Enabled': True, 'Value': '0', },
'--test-mode': {'Enabled': False, 'Value': 'test.map', },
'--timeout': {'Enabled': True, 'Value': '5m', },
'-vvvv': {'Enabled': True, 'Hidden': True, },
}
if __name__ == '__main__':
print("This file is not meant to be called directly.")
# vim: sts=2 sw=2 ts=2