Code Monkey home page Code Monkey logo

Comments (4)

Zalastax avatar Zalastax commented on August 16, 2024 1

If we want to use an iframe, we need to check that's allowed by Github CDN Cross-Origin Resource Sharing (CORS) or use a CORS bypass proxy. Also applies to fetch() toward the CDN. It seems like the Github REST API allows CORS but unauthenticated access is rate-limited to 60 calls per hour and is associated with the IP.

If I were to implement this, I would write a small script that looks at a cloned Tidal repo and updates this repo through a commit which I can send a PR for. Such method could also be used for generating other documentation, e.g. index of all functions. The snipsync approach is cleaner for the use case in this issue but if we want to expand to more things then perhaps we need more flexibility? Or should we do something similar as snipsync for the other use-cases too?

from tidal-doc.

mindofmatthew avatar mindofmatthew commented on August 16, 2024 1

I think an automatic action to generate PRs against this repo is the way. I didn't ever finish it, but my prototype Haddock-to-Docusaurus conversion would need to run custom server-side code anyway.

I'm not the best at GitHub actions, but I think that /Tidal would need an action that runs on every new release, calling a web hook that runs an action in /tidal-doc that actually pulls the Tidal release and generates docs and so on.

from tidal-doc.

Zalastax avatar Zalastax commented on August 16, 2024 1

Good idea @mindofmatthew!

Unfortunately it seems a bit tricky:
Trigger across repositories requires Personal Access Tokens (PATs): https://stackoverflow.com/a/58468828
And PATs have some issues that are described here: https://shopify.engineering/automatically-rotate-github-tokens

But since the Tidalcycles repo is openly available we can clone without a PAT. And with a periodic trigger we don't need to trigger from a release. We could trigger daily + store & check the hash of the Tidalcycles repo used last time to avoid a rebuild.

Here's how to use a schedule: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule

Here's how to do the checkout: https://github.com/actions/checkout#Checkout-multiple-repos-side-by-side

Here's how to conditionally skip the job: https://docs.github.com/en/actions/using-jobs/using-conditions-to-control-job-execution

This seems to be how to get file content into a variable: https://stackoverflow.com/a/60679655

To debug actions locally, I have read that https://github.com/nektos/act can be used.

from tidal-doc.

cleary avatar cleary commented on August 16, 2024

I ran into the react component that @mindofmatthew created for the youtube embedding. This is likely the type of container we'd need to solve this problem

https://github.com/tidalcycles/tidal-doc/tree/main/src/components/youtube

from tidal-doc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.