leopard-js / sb-edit

Javascript library for manipulating Scratch project files
MIT License
50 stars 13 forks source link

Command line tool #128

Closed PullJosh closed 1 month ago

PullJosh commented 2 months ago

The Leopard website is a nice way to convert projects, but it's clearly valuable to give people the power to use sb-edit locally. And they shouldn't have to write JavaScript code in order to do it. (Here's an example of someone trying to convert from sb3 to Leopard locally who is struggling.)

It feels sort of obvious to have a command-line utility that allows people to run npx sb-edit [command] and get all kinds of useful outputs.

I'm not a big CLI user so I don't have a good intuition for what the commands/options should be. But the obvious main feature is to let users choose an input project and an output format/destination and then convert the input to output automatically.

Input options:

Output options:

If anybody is interested in taking this project on, that would be fantastic!

towerofnix commented 2 months ago

We've already written sb-edit-playground which largely covers what this issue suggests (not downloading right from Scratch, though!). With a bit of tidying up it could probably be made into a CLI front for sb-edit without too much difficulty!

I won't be able to take this on for a while though (pretty busy until mid-April at least). But yeah, just sharing that there's already some work done on possible internals for this.

PullJosh commented 2 months ago

Oh, so true! I didn't think about that. I still think a CLI interface would be ideal but sb-edit-playground is a nice tool in the meantime. I will link people to that when they have questions.