mirror of
https://github.com/littlefs-project/littlefs.git
synced 2025-12-26 09:08:30 +00:00
scripts: Dropped --padding from ascii art scripts
No one is realistically ever going to use this. Ascii art is just too low resolution, trying to pad anything just wastes terminal space. So we might as well not support --padding and save on the additional corner cases. Worst case, in the future we can always find this commit and revert things.
This commit is contained in:
@@ -912,7 +912,6 @@ def main_(ring, paths, *,
|
||||
to_ratio=1/1,
|
||||
tiny=False,
|
||||
title=None,
|
||||
padding=0,
|
||||
label=False,
|
||||
no_label=False,
|
||||
**args):
|
||||
@@ -1220,28 +1219,6 @@ def main_(ring, paths, *,
|
||||
|
||||
# our general purpose partition function
|
||||
def partition(tile, **args):
|
||||
if tile.depth == 0:
|
||||
# apply top padding
|
||||
tile.x += padding
|
||||
tile.y += padding
|
||||
tile.width -= min(padding, tile.width)
|
||||
tile.height -= min(padding, tile.height)
|
||||
# apply bottom padding
|
||||
if not tile.children:
|
||||
tile.width -= min(padding, tile.width)
|
||||
tile.height -= min(padding, tile.height)
|
||||
|
||||
x__ = tile.x
|
||||
y__ = tile.y
|
||||
width__ = tile.width
|
||||
height__ = tile.height
|
||||
|
||||
else:
|
||||
# apply bottom padding
|
||||
if not tile.children:
|
||||
tile.width -= min(padding, tile.width)
|
||||
tile.height -= min(padding, tile.height)
|
||||
|
||||
x__ = tile.x
|
||||
y__ = tile.y
|
||||
width__ = tile.width
|
||||
@@ -1622,10 +1599,6 @@ if __name__ == "__main__":
|
||||
parser.add_argument(
|
||||
'--title',
|
||||
help="Add a title. Accepts %% modifiers.")
|
||||
parser.add_argument(
|
||||
'--padding',
|
||||
type=float,
|
||||
help="Padding to add to each level of the treemap. Defaults to 0.")
|
||||
parser.add_argument(
|
||||
'-l', '--label',
|
||||
action='store_true',
|
||||
|
||||
@@ -4354,7 +4354,6 @@ def main_(ring, disk, mroots=None, *,
|
||||
title=None,
|
||||
title_littlefs=False,
|
||||
title_usage=False,
|
||||
padding=0,
|
||||
**args):
|
||||
# give ring an writeln function
|
||||
def writeln(s=''):
|
||||
@@ -4677,17 +4676,6 @@ def main_(ring, disk, mroots=None, *,
|
||||
b.width = block_width_
|
||||
b.height = block_height_
|
||||
|
||||
# apply top padding
|
||||
if x == 0:
|
||||
b.x += padding
|
||||
b.width -= min(padding, b.width)
|
||||
if y == 0:
|
||||
b.y += padding
|
||||
b.height -= min(padding, b.height)
|
||||
# apply bottom padding
|
||||
b.width -= min(padding, b.width)
|
||||
b.height -= min(padding, b.height)
|
||||
|
||||
# align to pixel boundaries
|
||||
b.align()
|
||||
|
||||
@@ -5075,11 +5063,6 @@ if __name__ == "__main__":
|
||||
action='store_true',
|
||||
help="Use the mdir/btree/data usage as the title. This is the "
|
||||
"default.")
|
||||
# TODO drop padding in ascii scripts, no one is ever going to use this
|
||||
parser.add_argument(
|
||||
'--padding',
|
||||
type=float,
|
||||
help="Padding to add to each block. Defaults to 0.")
|
||||
parser.add_argument(
|
||||
'-e', '--error-on-corrupt',
|
||||
action='store_true',
|
||||
|
||||
@@ -941,7 +941,6 @@ def main(path='-', *,
|
||||
to_ratio=1/1,
|
||||
tiny=False,
|
||||
title=None,
|
||||
padding=0,
|
||||
lines=None,
|
||||
head=False,
|
||||
cat=False,
|
||||
@@ -1356,17 +1355,6 @@ def main(path='-', *,
|
||||
b.width = block_width_
|
||||
b.height = block_height_
|
||||
|
||||
# apply top padding
|
||||
if x == 0:
|
||||
b.x += padding
|
||||
b.width -= min(padding, b.width)
|
||||
if y == 0:
|
||||
b.y += padding
|
||||
b.height -= min(padding, b.height)
|
||||
# apply bottom padding
|
||||
b.width -= min(padding, b.width)
|
||||
b.height -= min(padding, b.height)
|
||||
|
||||
# align to pixel boundaries
|
||||
b.align()
|
||||
|
||||
@@ -1816,11 +1804,6 @@ if __name__ == "__main__":
|
||||
parser.add_argument(
|
||||
'--title',
|
||||
help="Add a title. Accepts %% modifiers.")
|
||||
# TODO drop padding in ascii scripts, no one is ever going to use this
|
||||
parser.add_argument(
|
||||
'--padding',
|
||||
type=float,
|
||||
help="Padding to add to each block. Defaults to 0.")
|
||||
parser.add_argument(
|
||||
'-n', '--lines',
|
||||
nargs='?',
|
||||
|
||||
@@ -926,7 +926,6 @@ def main_(ring, csv_paths, *,
|
||||
to_ratio=1/1,
|
||||
tiny=False,
|
||||
title=None,
|
||||
padding=0,
|
||||
label=False,
|
||||
no_label=False,
|
||||
**args):
|
||||
@@ -1102,28 +1101,6 @@ def main_(ring, csv_paths, *,
|
||||
tile.width = canvas.width
|
||||
tile.height = canvas.height
|
||||
def partition(tile):
|
||||
if tile.depth == 0:
|
||||
# apply top padding
|
||||
tile.x += padding
|
||||
tile.y += padding
|
||||
tile.width -= min(padding, tile.width)
|
||||
tile.height -= min(padding, tile.height)
|
||||
# apply bottom padding
|
||||
if not tile.children:
|
||||
tile.width -= min(padding, tile.width)
|
||||
tile.height -= min(padding, tile.height)
|
||||
|
||||
x__ = tile.x
|
||||
y__ = tile.y
|
||||
width__ = tile.width
|
||||
height__ = tile.height
|
||||
|
||||
else:
|
||||
# apply bottom padding
|
||||
if not tile.children:
|
||||
tile.width -= min(padding, tile.width)
|
||||
tile.height -= min(padding, tile.height)
|
||||
|
||||
x__ = tile.x
|
||||
y__ = tile.y
|
||||
width__ = tile.width
|
||||
@@ -1481,10 +1458,6 @@ if __name__ == "__main__":
|
||||
parser.add_argument(
|
||||
'--title',
|
||||
help="Add a title. Accepts %% modifiers.")
|
||||
parser.add_argument(
|
||||
'--padding',
|
||||
type=float,
|
||||
help="Padding to add to each level of the treemap. Defaults to 0.")
|
||||
parser.add_argument(
|
||||
'-l', '--label',
|
||||
action='store_true',
|
||||
|
||||
Reference in New Issue
Block a user