-
Notifications
You must be signed in to change notification settings - Fork 8
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
Allow to supply a URL of a Fortran file to use #81
Comments
Fetching files using a static webpage seems tricky. I usually face CORS Cross Origin errors when trying to accomplish such tasks. |
I am hoping there would be a solution to this. Probably some API service which offers accessing files on other websites from a static page. |
How do things like this work: https://star-history.com/#lfortran/lfortran&Date, it seems to access GitHub API, is it accessing it locally, or from a server? You are right that it might not be possible. |
Some sites/APIs allow Cross Origin Resource Sharing, while many (in my experience) do not allow. In the above case, it seems that the GitHub API is CORS Enabled (thus allowing data to be fetched from client browser, probably using some authorization token) Also, on the same website https://star-history.com/#lfortran/lfortran&Date, I see an "Add Access Token" button which upon clicking shows: |
Will this problem persist if we use the GitHub Gist API to retrieve the content of a gist in raw format, and then pass the raw content to the editor for rendering? |
I guess GitHub Gist API allows across domain requests (we may/might require to provide some authorization token). |
It would work similarly to nbviewer: https://nbviewer.org/ where you can give it any GitHub Gist or GitHub URL of a notebook and it would render it. Here is an example of such a url: https://nbviewer.org/github/jrjohansson/qutip-lectures/blob/master/Lecture-1-Jaynes-Cumming-model.ipynb.
So we could allow something similar, say: https://dev.lfortran.org/github/jrjohansson/qutip-lectures/blob/master/Lecture-1-Jaynes-Cumming-model.f90.
It would load the file into the editor and allow you to compile it and run it.
Even later we can imagine just giving it a url of some github repository that contains
fpm.toml
file and it would be able to build the project.The text was updated successfully, but these errors were encountered: