Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Improve --help output + make CI prevent copies of --help output from going out-of-sync #80

Merged
merged 9 commits into from Jan 20, 2021

Conversation

hartwork
Copy link
Member

@d-torrance what do you think?

@hartwork hartwork requested a review from esc January 15, 2021 13:01
@hartwork hartwork force-pushed the keep-man-page-in-sync branch 2 times, most recently from a488682 to d6ae6b1 Compare January 15, 2021 13:19
set -e
set -o pipefail

fgrep -A55 usage: README.rst | sed 's,^ ,,'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoding 55 as the length of the help output seems hard to maintain. Perhaps you could do something like this?

awk '/usage:/ { print; flag = 1; next } /Usage Examples/ { flag = 0 } flag { print }' README.rst

Copy link
Member Author

@hartwork hartwork Jan 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that this approach would probably require fewer updates to file extract-usage-from-readme.sh in the future. I have applied that idea of yours now, could you have another look?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay great! Let's see how happy @esc is with the latest version.

@hartwork hartwork added this to the 1.0.1 milestone Jan 15, 2021
@hartwork hartwork changed the title Keep man page in sync Make CI ensure that we keep the man page in sync Jan 16, 2021
hartwork added a commit that referenced this pull request Jan 16, 2021
hartwork added a commit that referenced this pull request Jan 16, 2021
hartwork added a commit that referenced this pull request Jan 17, 2021
hartwork added a commit that referenced this pull request Jan 17, 2021
@hartwork
Copy link
Member Author

hartwork commented Jan 18, 2021

I have turned extract-usage-from-readme.sh into sync-readme-with-help-output.sh now so that whoever cħanges --help output next, can run a script to sync the readme and will not need to copy paste text around.

@hartwork hartwork changed the title Make CI ensure that we keep the man page in sync Improve --help output + make CI stop copies of --help output from getting out-of-sync Jan 19, 2021
@hartwork hartwork changed the title Improve --help output + make CI stop copies of --help output from getting out-of-sync Improve --help output + make CI prevent copies of --help output from going out-of-sync Jan 19, 2021
hartwork added a commit that referenced this pull request Jan 19, 2021
@hartwork
Copy link
Member Author

@esc I have add documentation of bifurcation commits on top for review here now (for #84)

hartwork added a commit that referenced this pull request Jan 19, 2021
@hartwork hartwork linked an issue Jan 19, 2021 that may be closed by this pull request
Copy link
Contributor

@esc esc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The stuff about bifurcation commits looks good and I like the wording. It's not something in everyones git vocabulary, but I never found a better term for this kind of construct. Thank you for implementing it. I don't know much about manpages, so I can't comment much on that except for: LGTM! 👍

@hartwork hartwork merged commit e563cd4 into master Jan 20, 2021
@hartwork hartwork deleted the keep-man-page-in-sync branch January 20, 2021 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation does not explain what a "bifurcation" is
3 participants