mirror of
https://github.com/daylinmorgan/logo.git
synced 2024-12-22 06:20:44 -06:00
refactor: move script to scripts duh
This commit is contained in:
parent
fe1cc239a4
commit
a7826fba58
2 changed files with 6 additions and 5 deletions
2
Makefile
2
Makefile
|
@ -28,7 +28,7 @@ docs/png/%.png: docs/svg/%.svg
|
||||||
@inkscape --export-filename=$@ $<
|
@inkscape --export-filename=$@ $<
|
||||||
|
|
||||||
svgs: $(SRC) ## generate all of the logo svgs
|
svgs: $(SRC) ## generate all of the logo svgs
|
||||||
./generate-all.py $(REV)
|
./scripts/generate-all.py $(REV)
|
||||||
|
|
||||||
lint: ## apply isort/black/flake8
|
lint: ## apply isort/black/flake8
|
||||||
@isort logo
|
@isort logo
|
||||||
|
|
|
@ -5,14 +5,15 @@ from pathlib import Path
|
||||||
|
|
||||||
from logo import generate
|
from logo import generate
|
||||||
|
|
||||||
|
PROJECT_ROOT = Path(__file__).parent.parent
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
rev = sys.argv[1]
|
rev = sys.argv[1]
|
||||||
comment = f"© 2022 Daylin Morgan | rev. {rev}"
|
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")
|
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 theme in ["dark", "light"]:
|
||||||
for background in ["rect", "circle", None]:
|
for background in ["rect", "circle", None]:
|
||||||
|
@ -24,7 +25,7 @@ def main():
|
||||||
name.append("b")
|
name.append("b")
|
||||||
|
|
||||||
name.append(theme)
|
name.append(theme)
|
||||||
name = f"docs/svg/{'-'.join(name)}.svg"
|
name = f"{PROJECT_ROOT}/docs/svg/{'-'.join(name)}.svg"
|
||||||
generate(
|
generate(
|
||||||
name=name,
|
name=name,
|
||||||
background=background,
|
background=background,
|
||||||
|
@ -34,7 +35,7 @@ def main():
|
||||||
)
|
)
|
||||||
|
|
||||||
generate(
|
generate(
|
||||||
name=f"docs/{theme}.svg",
|
name=f"{PROJECT_ROOT}/docs/{theme}.svg",
|
||||||
background="circle",
|
background="circle",
|
||||||
border=True,
|
border=True,
|
||||||
theme=theme,
|
theme=theme,
|
Loading…
Reference in a new issue