ekzhang / percival

📝 Web-based, reactive Datalog notebooks for data analysis and visualization
https://percival.ink
MIT License
604 stars 25 forks source link

Load and save percival files in git repos #17

Open infogulch opened 2 years ago

infogulch commented 2 years ago

I think it would be neat to be able to load, save, edit, and commit percival files directly against a git repo.

Something like isomorphic-git could be useful here:

https://github.com/isomorphic-git/isomorphic-git

It seems there are some potential complications to supporting a git workflow, especially related to CORS.

Thoughts?

justjake commented 2 years ago

It'd probably be easier to program directly against the Github API, authenticated using one of the OAuth flows rather than emulate a whole file-system in memory and work with Git's data structures.

infogulch commented 2 years ago

What api enables you to traverse the repo and commit to it? That's what git is for.

infogulch commented 2 years ago

To clarify, my goal with this is would be to add a new way to persist changes made to the document other than exporting a brand new gist every time which is awkward to manage.

Potential follow up features could include: 1. opening other percival documents from the main site (point to a git url), 2. multi-document workflows, where a table defined and exported by one document is imported and used in another, etc.