scripts: Renamed *d3.py -> *svg.py

- codemapd3.py -> codemapsvg.py
- dbgbmapd3.py -> dbgbmapsvg.py
- treemapd3.py -> treemapsvg.py

Originally these were named this way to match plotmpl.py, but these
names were misleading. These scripts don't actually use the d3 library,
they're just piles of Python, SVG, and Javascript, modelled after the
excellent d3 treemap examples.

Keeping the *d3.py names around also felt a bit unfair to brendangregg's
flamegraph SVGs, which were the inspiration for the interactive
component. With d3 you would normally expect a rich HTML page, which is
how you even include the d3 library.

plotmpl.py is also an outlier in that it supports both .svg and .png
output. So having a different naming convention in this case makes
sense to me.

So, renaming *d3.py -> *svg.py. The inspiration from d3 is still
mentioned in the top-level comments in the relevant files.
This commit is contained in:
Christopher Haster
2025-05-15 19:09:09 -05:00
parent 651c3e1eb4
commit c44c43ac74
4 changed files with 5 additions and 5 deletions
@@ -2119,7 +2119,7 @@ if __name__ == "__main__":
import argparse
import sys
parser = argparse.ArgumentParser(
description="Render code info as an interactive d3-esque treemap.",
description="Render code info as an interactive SVG treemap.",
allow_abbrev=False)
class AppendPath(argparse.Action):
def __call__(self, parser, namespace, value, option):
@@ -5248,7 +5248,7 @@ if __name__ == "__main__":
import sys
parser = argparse.ArgumentParser(
description="Render currently used blocks in a littlefs image "
"as an interactive d3-esque map.",
"as an interactive SVG block map.",
allow_abbrev=False)
parser.add_argument(
'disk',
@@ -1015,7 +1015,7 @@ if __name__ == "__main__":
import argparse
import sys
parser = argparse.ArgumentParser(
description="Render CSV files as a d3-esque treemap.",
description="Render CSV files as an SVG treemap.",
allow_abbrev=False)
parser.add_argument(
'csv_paths',