Skip to content

Conversation

technomancy
Copy link
Contributor

I was thinking it might be nice to be able to export to HTML from my makefile. I have two commits here to make that happen; the first one makes it so the CLI accepts a -command foo flag which gets run as a console command, and then exits. As far as I can tell this works. The second commit attempts to make it so that the console command export html foo.zip will use "foo.zip" as its output filename instead of popping up a system save dialog box. This part does not work yet.

Anyway, if you think this is a good idea I can continue to work on this and get the problems ironed out, but if you think this complicates things too much that is fine too; I wanted to ask your opinion before I spent much more time on it.

Thanks!

@nesbox
Copy link
Owner

nesbox commented May 6, 2020

Wow, I like it. We could develop your idea further and add such behavior for all the export commands which used UI file save dialog, so you could export music from a cart, for example, without opening TIC's console. Please, continue.
Thanks.

@RobLoach
Copy link
Contributor

RobLoach commented May 6, 2020

This is great! I would love to see the external command line interface improve a lot more. Keep it up 👍

Quick question.... Could we do something like this?

tic80 -code mycode.lua -sprites mysprites.gif -cover cover.gif export cart.tic

@technomancy
Copy link
Contributor Author

@RobLoach do you mean specifically that it should interpret any arguments after the already-recognized commands as if they were entered in the console? I think that makes sense if @nesbox agrees.

Running commands is pretty easy to implement; changing the export command specifically to accept a filename is much more difficult. Because of that I will probably split this up into 2 separate patches.

@technomancy technomancy changed the title WIP: export from the CLI Accept and run commands from argv. May 17, 2020
@technomancy
Copy link
Contributor Author

I think I have this working now just for the part where it accepts args from argv. Allowing the export command to take a filename can be a separate PR once we get this figured out, I think.

This allows things like "new fennel" or "export html" to work.
@technomancy
Copy link
Contributor Author

@nesbox I think this one is ready to go; thanks.

@nesbox
Copy link
Owner

nesbox commented May 19, 2020

Ok, thank you :)

Copy link
Owner

@nesbox nesbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls update the wiki if not difficult
thank you 👍

@nesbox nesbox merged commit 230d734 into nesbox:master May 20, 2020
@nesbox nesbox added the enhancement Improvement of existing feature or adding something new label May 20, 2020
@nesbox nesbox added this to the 0.80.0 milestone May 20, 2020
nesbox added a commit that referenced this pull request May 20, 2020
nesbox added a commit that referenced this pull request May 20, 2020
@technomancy technomancy deleted the cli-export branch May 21, 2020 00:14
@technomancy
Copy link
Contributor Author

Sure thing; thanks!

nesbox added a commit that referenced this pull request May 21, 2020
@nesbox nesbox removed this from the 0.80.0 milestone Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing feature or adding something new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants