style: add formatting to generate-all

This commit is contained in:
Daylin Morgan 2023-02-12 16:17:22 -06:00
parent ce312ce05c
commit fe1cc239a4

View file

@ -1,8 +1,10 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
from logo import generate
from pathlib import Path
import sys import sys
from pathlib import Path
from logo import generate
def main(): def main():
rev = sys.argv[1] rev = sys.argv[1]
@ -12,20 +14,33 @@ def main():
print("making docs directory") print("making docs directory")
(Path.cwd() / "docs" / "svg").mkdir(exist_ok=True) (Path.cwd() / "docs" / "svg").mkdir(exist_ok=True)
for theme in ['dark','light']: for theme in ["dark", "light"]:
for background in ['rect','circle',None]: for background in ["rect", "circle", None]:
for border in [True, False]: for border in [True, False]:
name = ['logo'] name = ["logo"]
if background: if background:
name.append(f"bg-{background}") name.append(f"bg-{background}")
if border: if border:
name.append(f"b") name.append("b")
name.append(theme) name.append(theme)
name = f"docs/svg/{'-'.join(name)}.svg" name = f"docs/svg/{'-'.join(name)}.svg"
generate(name=name,background=background,border=border,theme=theme,comment=comment) generate(
name=name,
background=background,
border=border,
theme=theme,
comment=comment,
)
generate(
name=f"docs/{theme}.svg",
background="circle",
border=True,
theme=theme,
comment=comment,
)
generate(name=f"docs/{theme}.svg",background="circle",border=True,theme=theme,comment=comment)
if __name__ == "__main__": if __name__ == "__main__":
main() main()