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

Proposal: canvasz — a zipped canvas file, which packages a the markdown files along with it #38

Open
CheeksTheGeek opened this issue Mar 28, 2024 · 2 comments

Comments

@CheeksTheGeek
Copy link
Contributor

CheeksTheGeek commented Mar 28, 2024

Right now, the main difference between other file formats comparable to JSON Canvas is that JSON Canvas or some other superset/abstraction of JSON Canvas isn't self-sufficient yet, meaning if I have a lot of markdown files referred-to inside my canvas file, and my Obsidian Vault or setup inside one of the other apps enabled with JSON Canvas import/export capability is not managed well, the JSON Canvas file is going to end up mostly unusable due to non-existent or unreachable file links.

Hence, I propose having another layer of abstraction over JSON Canvas, called JSON Canvas Zipped, and the file extension for which would be .canvasz, and when unzipped, would have this directory structure present inside:

unzipped_canvasz_file_dir/
├── index.canvas
├── file1.md
├── file2.md
└── file3.md

If Obsidian or other software with complete Canvas import/export implementations choose to export, the user could be offered the ability to export as either. When importing, the offer would be to choose between a plain text JSON-based canvas file, or the packaged canvasz file. If the user chooses the latter, the import implementation component would track down each file from the internal setup, and package it in the given structure for the user to use it anywhere.

This proposal is an effort towards making the JSON Canvas file or at least an abstraction over it to be self-sufficient in the data it refers to internally.

— chaitanya

@CheeksTheGeek
Copy link
Contributor Author

Also, just to make it easy to read, .canvaz might be a good file extension name too

@jessmartin
Copy link

I love this idea. The ability to include referenced images, PDFs, and other files would be nice as well.

TLDraw handles this by base64-encoding images when exporting, which keeps the image within a single file without the need for a folder or a zipped file. But that serves a different purpose (pass around a single file) than what you have here. Your solution is really nice in that it makes it easy for a human author at the file system to get at the underlying markdown and other files and work with them directly.

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

No branches or pull requests

2 participants