coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

Move help strings to markdown files

Open tertsdiepraam opened this issue 2 years ago • 8 comments

After https://github.com/uutils/coreutils/issues/2816 and https://github.com/uutils/coreutils/pull/3180.

Below is a list of utils that need to be converted. Let's see if GitHub's task lists are useful here. All of them should be considered good-first-issues.

If you want to pick one up, for now just create a PR and we'll update this list.

Note that some utils (like who) have platform-specific help texts. We should probably leave those until we have a good solution for that.

  • [ ] arch
  • [x] base32 (https://github.com/uutils/coreutils/pull/3180)
  • [x] base64 (https://github.com/uutils/coreutils/pull/3180)
  • [ ] basename
  • [ ] basenc
  • [x] cat (https://github.com/uutils/coreutils/pull/4375)
  • [ ] chcon
  • [ ] chgrp
  • [ ] chmod
  • [ ] chown
  • [ ] chroot
  • [ ] cksum
  • [ ] comm
  • [x] cp (https://github.com/uutils/coreutils/pull/4372)
  • [ ] csplit
  • [ ] cut
  • [ ] date
  • [x] dd (https://github.com/uutils/coreutils/pull/3938)
  • [ ] df
  • [ ] dir
  • [ ] dircolors
  • [ ] dirname
  • [ ] du
  • [ ] echo
  • [ ] env
  • [ ] expand
  • [x] expr (https://github.com/uutils/coreutils/pull/4158)
  • [ ] factor
  • [ ] false
  • [ ] fmt
  • [ ] fold
  • [ ] groups
  • [ ] hashsum
  • [ ] head
  • [ ] hostid
  • [ ] hostname
  • [ ] id
  • [ ] install
  • [ ] join
  • [ ] kill
  • [ ] link
  • [ ] ln
  • [ ] logname
  • [ ] ls
  • [ ] mkdir
  • [ ] mkfifo
  • [ ] mknod
  • [ ] mktemp
  • [ ] more
  • [ ] mv
  • [ ] nice
  • [ ] nl
  • [ ] nohup
  • [ ] nproc
  • [x] numfmt (https://github.com/uutils/coreutils/pull/3180)
  • [ ] od
  • [ ] paste
  • [ ] pathchk
  • [ ] pinky
  • [ ] pr
  • [ ] printenv
  • [ ] printf
  • [ ] ptx
  • [ ] pwd
  • [ ] readlink
  • [ ] realpath
  • [ ] relpath
  • [ ] rm
  • [ ] rmdir
  • [ ] runcon
  • [ ] seq
  • [ ] shred
  • [ ] shuf
  • [ ] sleep
  • [ ] sort
  • [ ] split
  • [x] stat (https://github.com/uutils/coreutils/pull/4367)
  • [ ] stdbuf
  • [ ] stty
  • [ ] sum
  • [ ] sync
  • [ ] tac
  • [ ] tail
  • [ ] tee
  • [ ] test
  • [ ] timeout
  • [ ] touch
  • [ ] tr
  • [ ] true
  • [ ] truncate
  • [ ] tsort
  • [ ] tty
  • [ ] uname
  • [ ] unexpand
  • [ ] uniq
  • [ ] unlink
  • [ ] uptime
  • [ ] users
  • [ ] utils.txt
  • [ ] vdir
  • [ ] wc
  • [ ] who
  • [ ] whoami
  • [ ] yes

tertsdiepraam avatar Feb 14 '23 23:02 tertsdiepraam

It doesn't appear to be possible to Convert to Issue with my permissions, I checked on multiple browsers and proved that it was working on a project where I have sufficient perms.

zleyyij avatar Feb 15 '23 04:02 zleyyij

Oh I hoped that would be possible. That's too bad. I'll figure out some other way to track this. In the meantime you can just create a PR and I'll update the list manually.

tertsdiepraam avatar Feb 15 '23 08:02 tertsdiepraam

We could just accept PRs that mention the utils they update and then we manually update, but that's not a great solution. Also, with a project like this, we get situations like this quite often, so I'd like to find a better solution. @sylvestre any ideas?

tertsdiepraam avatar Feb 15 '23 10:02 tertsdiepraam

What should be the order of the sections inside the markdown files? Currently half of the files use

Usage
About
...

and the other half:

About
Usage
...

cakebaker avatar Feb 15 '23 13:02 cakebaker

Hmm good question. Both will work, but I think I prefer usage first, because that's also how it shows up in clap and in the online docs. Maybe we should even change the macro for the usage to parse the code block directly below the title, so you can write:

# numfmt
```
numfmt [OPTION]... [NUMBER]...
```

## About

Convert numbers from/to human-readable strings

Do you have a preference one way or the other?

tertsdiepraam avatar Feb 15 '23 14:02 tertsdiepraam

My preference would be the same as in the online docs:

# numfmt
```
numfmt [OPTION]... [NUMBER]...
```

Convert numbers from/to human-readable strings

cakebaker avatar Feb 15 '23 14:02 cakebaker

Ah I see, that would require a separate macro for the about text I suppose. I like that it enforces a strict format. Do you want to implement that?

tertsdiepraam avatar Feb 15 '23 15:02 tertsdiepraam

Yes.

cakebaker avatar Feb 15 '23 15:02 cakebaker

Looks like we are good ?! :) cc @tertsdiepraam

sylvestre avatar May 06 '23 17:05 sylvestre

Wow, that's great! Thanks everyone!

tertsdiepraam avatar May 07 '23 08:05 tertsdiepraam

yeah, bravo :)

sylvestre avatar May 07 '23 08:05 sylvestre