refactor: move script to scripts duh

This commit is contained in:
Daylin Morgan 2023-02-24 15:15:56 -06:00
parent fe1cc239a4
commit a7826fba58
Signed by: daylin
GPG key ID: 3CD66E04B8072F3E
2 changed files with 6 additions and 5 deletions

View file

@ -28,7 +28,7 @@ docs/png/%.png: docs/svg/%.svg
@inkscape --export-filename=$@ $<
svgs: $(SRC) ## generate all of the logo svgs
./generate-all.py $(REV)
./scripts/generate-all.py $(REV)
lint: ## apply isort/black/flake8
@isort logo

View file

@ -5,14 +5,15 @@ from pathlib import Path
from logo import generate
PROJECT_ROOT = Path(__file__).parent.parent
def main():
rev = sys.argv[1]
comment = f"© 2022 Daylin Morgan | rev. {rev}"
if not (Path.cwd() / "docs" / "svg").is_dir():
if not ( PROJECT_ROOT / "docs" / "svg").is_dir():
print("making docs directory")
(Path.cwd() / "docs" / "svg").mkdir(exist_ok=True)
(PROJECT_ROOT / "docs" / "svg").mkdir(exist_ok=True)
for theme in ["dark", "light"]:
for background in ["rect", "circle", None]:
@ -24,7 +25,7 @@ def main():
name.append("b")
name.append(theme)
name = f"docs/svg/{'-'.join(name)}.svg"
name = f"{PROJECT_ROOT}/docs/svg/{'-'.join(name)}.svg"
generate(
name=name,
background=background,
@ -34,7 +35,7 @@ def main():
)
generate(
name=f"docs/{theme}.svg",
name=f"{PROJECT_ROOT}/docs/{theme}.svg",
background="circle",
border=True,
theme=theme,