Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API functionality #25

Merged
merged 13 commits into from
Mar 7, 2024
Merged

Add API functionality #25

merged 13 commits into from
Mar 7, 2024

Conversation

Vipitis
Copy link
Collaborator

@Vipitis Vipitis commented Feb 25, 2024

Part of #8

Adds functionality to directly interact with the shadertoy website via the api they offer (avoids copy and paste).
Also includes a basic CLI with entry point to test this easier. (requires force-reinstall via pip to show up)

> wgpu-shadertoy XcS3zK

Had snippets like this laying around from all the debugging anyway, it's really useful so polishing this up!
todos:

  • add tests
  • add dependencies numpy/Pillow
  • [ ] consider locally caching shaders (at least media) -> maybelater PR
  • setup an api key for github actions (?)
  • add more examples
  • update readme with CLI usage example
  • clean up
  • [ ] potentionally web scrape when shadertoy isn't officially available via the API? -> maybe there is a hash to predict this from the shaderID?

pyproject.toml Outdated Show resolved Hide resolved
wgpu_shadertoy/api.py Outdated Show resolved Hide resolved
wgpu_shadertoy/api.py Outdated Show resolved Hide resolved
wgpu_shadertoy/api.py Outdated Show resolved Hide resolved
wgpu_shadertoy/api.py Outdated Show resolved Hide resolved
wgpu_shadertoy/api.py Outdated Show resolved Hide resolved
wgpu_shadertoy/api.py Outdated Show resolved Hide resolved
@Vipitis Vipitis changed the title [WIP] Add API functionality Add API functionality Mar 7, 2024
@Vipitis Vipitis marked this pull request as ready for review March 7, 2024 10:28
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
tests/test_api.py Outdated Show resolved Hide resolved
wgpu_shadertoy/api.py Outdated Show resolved Hide resolved
wgpu_shadertoy/api.py Outdated Show resolved Hide resolved
@Vipitis Vipitis merged commit 684c28a into main Mar 7, 2024
11 checks passed
@Vipitis Vipitis deleted the wip-api branch March 7, 2024 21:30
This was referenced Mar 7, 2024
@Vipitis Vipitis mentioned this pull request Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants