mirror of
https://github.com/daylinmorgan/swydd.git
synced 2024-11-06 17:23:16 -06:00
swydd will yield desired deliverables
.github/workflows | ||
docs | ||
src/swydd | ||
.gitignore | ||
.pre-commit-config.yaml | ||
LICENSE | ||
pdm.lock | ||
pyproject.toml | ||
README.md | ||
tasks.py |
sywdd
sywdd will yield desired deliverables
Automagic Snippet
# https://github.com/daylinmorgan/swydd?tab=readme-ov-file#automagic-snippet
# fmt: off
if not (src := __import__("pathlib").Path(__file__).parent / "swydd/__init__.py").is_file(): # noqa
try: __import__("swydd") # noqa
except ImportError:
import sys; from urllib.request import urlopen; from urllib.error import URLError # noqa
try: r = urlopen("https://raw.githubusercontent.com/daylinmorgan/swydd/main/src/swydd/__init__.py") # noqa
except URLError as e: sys.exit(f"{e}\n") # noqa
src.parent.mkdir(exist_ok=True); src.write_text(r.read().decode("utf-8")); # noqa
# fmt: on