Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Any chance this utility published as a library? #18

Closed
tailhook opened this issue Feb 1, 2018 · 9 comments
Closed

Any chance this utility published as a library? #18

tailhook opened this issue Feb 1, 2018 · 9 comments
Labels
enhancement New feature or request

Comments

@tailhook
Copy link

tailhook commented Feb 1, 2018

The plan is to use it to provide some markdown formatting in command-line utilities.

What do you think?

@swsnr
Copy link
Owner

swsnr commented Feb 2, 2018

@tailhook I can make a lib crate of it, and expose the entry function, but I'd rather not like to think about a useful API or make any promises about compatibility. Honestly, to me that's too much effort for such a small tool.

@swsnr
Copy link
Owner

swsnr commented Feb 2, 2018

If you have a concrete idea where you'd like to use this tool as a library then we can look into it, but I won't publish mdcat as a library just because I could.

@swsnr swsnr closed this as completed Feb 7, 2018
@tailhook
Copy link
Author

tailhook commented Feb 7, 2018

Sorry for being unresponsive. The idea I had in mind is:

  1. Use it in complex command-line utilities, athough I'm not sure that clap will adopt it
  2. Use it in vagga where users define commands and commands are often non trivial, requiring some descriptions

However, I'll probably hack some prototype before actually doing any work in this library.

@swsnr
Copy link
Owner

swsnr commented Feb 7, 2018

@tailhook I do not believe that either of these should use mdcat, and personally I'd not like to have to consider these use cases in mdcat.

I'd just like to use mdcat to quickly view and navigate a markdown README in my terminal for looking up some stuff, and that's basically the entire scope of this tool. Having to consider other use cases is already too much work for me to be honest.

@tailhook
Copy link
Author

tailhook commented Feb 7, 2018

Basically I need some markdown to "escape-codes" formatter. So do you recommend just fork this code?

@swsnr
Copy link
Owner

swsnr commented Feb 7, 2018

Yes, perhaps, if it suits your needs I don't mind if you fork it under the terms of its license. But it's in an early stage, and doesn't format all well.

Personally, tho, I think better formats exist to provide help. If you'd like to stick to text at least go for man pages which—unlike mdcat—provide some basic cross-referencing—pandoc can turn markdown into man pages—but I believe a good HTML manual works way better than an --help or man ever do.

@swsnr swsnr reopened this Feb 7, 2018
@swsnr swsnr closed this as completed in 0b22341 Feb 7, 2018
@swsnr
Copy link
Owner

swsnr commented Feb 7, 2018

@tailhook Okay, I made mdcat a library crate because it helps me as well to get an idea of what I'm doing. So the next release provides an extern crate mdcat with a minimal interface.

Feel free to use, but please understand that I make no guarantees about that interface yet and that I'll change the interface whenever I need it to make my changes to mdcat.

@tailhook
Copy link
Author

tailhook commented Feb 7, 2018

Feel free to use, but please understand that I make no guarantees about that interface yet and that I'll change the interface whenever I need it to make my changes to mdcat.

No problem. Just make sure to bump major version every time you break the API :)

@swsnr
Copy link
Owner

swsnr commented Feb 7, 2018

@tailhook I'll adhere to semantic versioning, so as long as mdcat is still at 0.x please do not assume the API is stable. It may change at any time, even in patch releases. I won't make any promises before 1.0 🙂

This was referenced Feb 14, 2018
@swsnr swsnr added the enhancement New feature or request label Feb 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants