Moved ddrescue-tui settings to separate file
This commit is contained in:
parent
974e20df05
commit
d03772666d
2 changed files with 41 additions and 30 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
# Wizard Kit: Functions - ddrescue
|
# Wizard Kit: Functions - ddrescue-tui
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import pathlib
|
import pathlib
|
||||||
|
|
@ -13,35 +13,7 @@ from functions.data import *
|
||||||
from functions.hw_diags import *
|
from functions.hw_diags import *
|
||||||
from functions.tmux import *
|
from functions.tmux import *
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
|
from settings.ddrescue import *
|
||||||
|
|
||||||
# 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)
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
# Clases
|
# Clases
|
||||||
|
|
|
||||||
39
.bin/Scripts/settings/ddrescue.py
Normal file
39
.bin/Scripts/settings/ddrescue.py
Normal 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
|
||||||
Loading…
Reference in a new issue