Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

api table of contents truncated descriptions #81

Closed
ikappaki opened this issue Aug 25, 2022 · 5 comments
Closed

api table of contents truncated descriptions #81

ikappaki opened this issue Aug 25, 2022 · 5 comments

Comments

@ikappaki
Copy link
Contributor

Hi,

some of the descriptions in the API table of contents are truncated compared to their full docstring, is this a feature or a bug? :)

https://github.com/babashka/process/blob/master/API.md

Perhaps they should include the text up to the first full stop .? e.g. sh looks a bit strange with the description ending in the middle of the sentence.

Table of contents

  • babashka.process - Shell out in Clojure with simplicity and ease.
    • $ - Convenience macro around process
    • *defaults* - Dynamic var containing overridable default options
    • check - Takes a process, waits until is finished and throws if exit code is non-zero.
    • destroy - Takes process or map
    • destroy-tree - Same as destroy but also destroys all descendants
    • exec - Replaces the current process image with the process image specified
    • pb - Returns a process builder (as record).
    • pipeline - Returns the processes for one pipe created with -> or creates
    • process - Takes a command (vector of strings or objects that will be turned
    • sh - Convenience function similar to clojure.java.shell/sh that sets
    • shell - Convenience function around process that was originally in babashka.tasks.
    • start - Takes a process builder, calls start and returns a process (as record).
    • tokenize - Tokenize string to list of individual space separated arguments.

Thanks

@borkdude
Copy link
Contributor

This should be fixed in https://github.com/borkdude/quickdoc

@ikappaki
Copy link
Contributor Author

I can see the description appears as truncated because quickdoc gets the first line and then searches for a full stop.

The bs.process/sh docstring for example is and that only extracts the first line:

"Convenience function similar to `clojure.java.shell/sh` that sets
  `:out` and `:err` to `:string` by default and blocks. Similar to
  `cjs/sh` it does not check the exit code (this can be done with
  `check`)."

An option would be to have quickdoc extract the text up to the first full stop, and collapse continuous whitespaces into a single one. so the text of the above example docstring would become:

Convenience function similar to `clojure.java.shell/sh` that sets `:out` and `:err` to `:string` by default and blocks.

What do you think?

Thanks

@borkdude
Copy link
Contributor

I'm fine with that!

@ikappaki
Copy link
Contributor Author

I'm fine with that!

Raised borkdude/quickdoc#16.

@borkdude
Copy link
Contributor

Applied newest quickdoc on API.md

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants