leopard-js / sb-edit

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

Create CLI that can convert sb3 to leopard or leopard-zip #129

Closed PullJosh closed 1 month ago

PullJosh commented 1 month ago

Closes #128. Allows importing a .sb3 file and generating a leopard folder or zip directly from the CLI. I haven't implemented .sb3 output yet for the sake of time/effort. (And because .sb3 is currently the only allowed input method so it would be mostly useless.)

Example output: Screenshot of sb-edit CLI output

I also did my best to make the errors look nice: Screenshot of sb-edit CLI error

PullJosh commented 1 month ago

@towerofnix Fixed the issue you mentioned. I also noticed that the wcwidth package was not actually counting chalk string widths correctly, so I replaced it with a "stripAnsi" function that does the job. With your approval, I think this is ready to ship.