Github API examples & templates
Use these vals as a playground to view and fork Github API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
paulhoule
hackerNewsRAG
HTTP
Find comments on HN (powered by Algolia ), extract content and return a streaming markdown summary (powered by Substrate ). The RAG portion of this is 34 lines of Substrate code. Twitter thread walkthrough: https://x.com/vprtwn/status/1812844236401762513 🪩 To fork, sign up for Substrate to get your own API key and $50 free credits.
1

saolsen
git_sync
Script
Sync vals to a git repo This will not run on val town! You need to run it locally with deno. Install Deno: https://docs.deno.com/runtime/manual/getting_started/installation Set your val.town api key as an environment variable. https://www.val.town/settings/api export valtown="abcdefgh-ijkl-mnop-qrst-uvwxyz123456" Create a git repo to sync to. mkdir ./valtown && pushd ./valtown && git init && popd Copy down this script and run it, passing the path to your git directory. deno run -A ./git_sync.ts ./valtown There is currently no incremental syncing or recovering. You can only use
this script against a fresh git repo. If you want to sync to an existing repo, you
should create a new repo, run the script and then force push to your existing repo. This will sync all your vals, including private ones so be careful where you
push your git repo if you want those to remain private.
0