sugarlabs / musicblocks

Music Blocks -- A musical microworld
https://musicblocks.sugarlabs.org/
GNU Affero General Public License v3.0
540 stars 728 forks source link

Easier way to open files from saved files? #993

Closed pikurasa closed 6 years ago

pikurasa commented 6 years ago

The goal of this thread is to explore ways to save files that could be opened across various OS' in the easiest way possible. I have seen at least three dozen people click on the downloaded .tb file in order to open it, which sends them to their OS' "app store", which just leads them down a completely unrelated path.

I had an idea...

What if, instead of the JSON (.tb file), the file were a .html file and it had the JSON info embedded inside. The .html would have some simple information, but mainly it would have a link to walterbender.github.io/musicblocks

This would allow someone to just click on the file, open it and then click a link to go to their file.

On a technical level, I suppose the JSON info would be input as a flag for the URL -- is there a limit to the length of a URL?

Of course, if a user were to just open the file from MB, they would open the file from whatever repo they are running MB from (not necessarily github.io)

...a little bit of a radical idea, but I thought I would through it out.

Please discuss as necessary. :)

pikurasa commented 6 years ago

From https://github.com/walterbender/musicblocks/pull/1053#issuecomment-358414227

If it is impossible to put the file info in the link--which seems to be the case--perhaps the best solution is:

1) include .tb info in the generated .html file 2) link to MB in such a way that it prompts for the .html file to be opened

The downside to this method is the user must locate their file via the prompt.

euanong commented 6 years ago

TODO: After this save-as-HTML function has landed, it might be nice to allow users to open lilypond files (with TB code appended to them) in MB as well. Note that this is a different issue to allowing users to import the music encoded in a lilypond file into MB (transcription of the lilypond file).

walterbender commented 6 years ago

And for the truly ambitious, how about reading in a score encoded as PDF into MB? :)

euanong commented 6 years ago

it may actually be doable (but still extremely difficult) - https://github.com/Audiveris/audiveris appears to be FOSS...