Porting Term into Comonicon printing system #193
Replies: 3 comments 3 replies
-
That's very interesting, and something Term could certainly do, Term's meant to be a counterpart to rich in Python for Julia. |
Beta Was this translation helpful? Give feedback.
-
I probably won't have time to work on this, also I don't think we should have Comonicon depending on the Term given how heavy it is tested on v1.8.5 julia> @time using Comonicon
0.097803 seconds (309.89 k allocations: 21.233 MiB)
julia> @time using Term
0.642835 seconds (1.78 M allocations: 122.588 MiB, 10.77% gc time, 0.24% compilation time) however, one can write an extra code generator like other code generators, or we can provide a custom printer API for the Julia code generator and implement this as a separate package. |
Beta Was this translation helpful? Give feedback.
-
Great, I was playing around with This was achieved by adding
Regarding the dependency issue of having The other ideas you mentioned sound great, yet I'm not that skillful to write a
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @FedeClaudi
I was unsure whether to open the discussion here or in the
Comonicon.jl
repo, but anyways...Since JuliaLang/julia#44527 landed, it is certainly better to use Julia as a scripting language, then it naturally comes that command line applications (CLI) may be a thing in the coming versions. There is a lot of stuff related to CLI, but one thing that is pretty useful is the design of how the CLI will take the flags, arguments, and options. Here comes the
Comonicon.jl
package (kudos to @Roger-luo!) it has many features and works lovely! Here is a simple example of how a function becomes amain
command:Will give this:
It is nice, and I was fine with it. However, a time ago I came across Typer which is
Basically applying
rich
to Python to create gorgeous CLIs. here is an example of it:I believe this is could be achieved using Term with that panel feature and will be awesome!
Beta Was this translation helpful? Give feedback.
All reactions