make icon paths relative

pull/624/head
Chris Withers 4 years ago
parent 24494204b9
commit 70f4ce89f7

@ -6,8 +6,9 @@ from diagrams import Diagram, Cluster, Edge
def main():
root = Path(diagrams.__file__).parent
with Diagram("All Node Types", show=False, outformat='svg'):
root = Path(diagrams.__file__).parent
for package_path in sorted(root.iterdir(), reverse=True):
if package_path.is_dir() and not package_path.name.startswith('__'):
package_import = f'{root.name}.{package_path.name}'
@ -37,5 +38,11 @@ def main():
node - Edge(style='invis') - prev_node
prev_node = node
# make the icon paths in the svg relative to the root of the repo:
svg_path = Path('all_node_types.svg')
content = svg_path.read_text()
svg_path.write_text(content.replace(str(root.parent.absolute()), '.'))
if __name__ == '__main__':
main()

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 904 KiB

After

Width:  |  Height:  |  Size: 860 KiB

Loading…
Cancel
Save