janklab / MlxShake

Export Matlab Live Scripts to Markdown, HTML, PDF, and more.
Other
9 stars 1 forks source link

External CLI command (like `exportmlx`) with `--format` option #9

Closed ghost closed 3 years ago

ghost commented 3 years ago

I feel like a CLI top-level function would complete this. It'd probably benefit from being a top level function exportmlx. If it supported an --extension option with the tex or md values that would be great!

apjanke commented 3 years ago

LOL; already on the TODO list. ;)

image

https://github.com/janklab/MlxShake/blob/master/doc-project/TODO.md

Thanks for making an Issue for it; most people probably aren't looking at the TODO.md file in the code.

I'll get this done pretty soon: it's not hard; just need to find an hour or two to put it together.

apjanke commented 3 years ago

It'll pick the format automatically based on the file extension of the output file you specified, defaulting to Markdown if no file extension is given, and will have a --format option to override that. Will have various other options that map to the other major configuration items in MlxExportOptions.

apjanke commented 3 years ago

Okay, here's a mlxshake shell command for you! It's in the new bin/ directory.

https://github.com/janklab/MlxShake/commit/6174ef6832f7d2d92013f1db72cb9cef29cd290b

Try ./bin/mlxshake --help to see its options.

ghost commented 3 years ago

image