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

Man pages #672

Merged
merged 12 commits into from
Feb 2, 2021
Merged

Man pages #672

merged 12 commits into from
Feb 2, 2021

Conversation

ratijas
Copy link
Contributor

@ratijas ratijas commented Nov 17, 2020

Just some minor quality-of-life improvements.

@fosskers May I have your permission to rewrite these man pages into more canonical form suggested by groff_man(7)? What do I mean by this is:

  • One sub-sentence per line (line breaks after dots, commas etc.),
  • Use .TP macro for options,
  • Use .B, .I etc. extensively instead of inline font escapes (\fN) -- mostly because double click source text selection sucks with \fIinline \fBgroff\fRescapes,
  • Wrap options (both short and long) in bold, and their arguments in italic and without brackets (ex: -s, --search regex).

Ideally, I'd like to rewrite everything in -mdoc groff_mdoc(7) instead of -man, because mdoc provides a semantic markup instead of direct font manipulation. But it looks so complex at first glance, that most of the world sticks with plain old groff_man(7).


So basically, I'm a lazy -Ass loafer, who could have done this PR literally two month ago, but instead invested time into studying groff, contributing to GNU and doing loadshit of irrelevant stuff, up to the point of designing full-brown syntax highlighter & plugin for Sublime Text, when in fact all I originally wanted to do is to fix those damn closing brackets sections headers ( ec870fc ).

Shame on me, it should have been hacktoberfest contribution, but whatever. I've completed the challenge by other means anyways.

@ratijas
Copy link
Contributor Author

ratijas commented Nov 17, 2020

((Tip 4 is such very beautiful but so much deleted in the end, lol))
aura tip 4

@fosskers
Copy link
Owner

Wow, thank you for this! The main manpage aura.8 has been in that form since I wrote it around 2012. I'm glad it finally got a spruce up.

Copy link
Owner

@fosskers fosskers left a comment

Choose a reason for hiding this comment

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

Almost there. I'm wondering what should be done about the flag args.

aura/doc/aura.8 Outdated Show resolved Hide resolved
aura/doc/aura.8 Outdated Show resolved Hide resolved
@fosskers
Copy link
Owner

fosskers commented Nov 18, 2020

Ah, I had misunderstood what you were asking permission for. Yes please go ahead with the reformatting of the flags according to the best practices that you've cited.

@ratijas ratijas marked this pull request as draft November 18, 2020 22:07
@fosskers
Copy link
Owner

fosskers commented Dec 1, 2020

Is there anything I can help with here?

@ratijas
Copy link
Contributor Author

ratijas commented Dec 1, 2020

Hold on, I am literally working on it. Just got back to it since yesterday.

@ratijas
Copy link
Contributor Author

ratijas commented Jan 6, 2021

ratijas, go home, u r drunk


here are some screenshots of Before|After:

aura before-after 1
aura before-after 2
aura before-after 3
aura before-after 4

o hey, there's my Kid Icarus: Uprising desktop background, because Arc Dark theme in Konsole sucks without background transparency effect.


happy new year and wish you a marry xmas btw (even if it's orthodox one).

@ratijas ratijas marked this pull request as ready for review January 6, 2021 22:49
@fosskers
Copy link
Owner

Those changes look wonderful!

@fosskers
Copy link
Owner

I'll give this a manual test and then merge if everything looks alright.

@ratijas ratijas marked this pull request as draft January 11, 2021 01:13
At least groff manuals advice use of 'almost-empty' lines instead of
completely blank lines, and that has something to do with vertical
layout, which might end up stretched or whatever.
According to groff_man(7), text following .SH is set to .PP anyway, which
makes explicit paragraphs redundant.
This way groff restores (P)revious font (which is bold here) of the heading
instead of forcing it to become (R)oman (regular).
Fixes most flashy formatting errors where the whole description of an
option becomes bold if font is not restored appropriately.
Leave it be, it is nice and readable.
Uses advanced groff_man(7) formatting requests to layout examples with
their tags.
This example became literally useless since the introduction of
`-Ss --both` search sub-option.
Copy-pasted style from pacman(8) and pacman.conf(5).
Using .EX/EE requests is equivalent to .nf + .nh and also should set font
to monospace in e.g. HTML output device.

Double-indented (RSAMPLE/ERSAMPLE) macro will be used for nested paragraphs
in later commits.
* use .TP (with default indent) instead of `.RS 4`;
* use .TS/.TE and tbl(1) preprocessor for table data;
* use bulleted list in PRO TIPS section;
* spread paragraphs using empty request lines for visual clarity.
@ratijas
Copy link
Contributor Author

ratijas commented Jan 11, 2021

Completely rewrote git history, so it supposed to make more sense now. But what do I know? I'm still drunk AF, it doesn't make any sense to me either way.

Namely: squashed multiple changes to the same chunks and redundant micro-commits. Also, removed dot at the end of SEE ALSO section, since this seems to be more canonical way. And also this readability buff:

diff --git a/aura/doc/aura.8 b/aura/doc/aura.8
index 6e671b7..4f0ea8e 100644
--- a/aura/doc/aura.8
+++ b/aura/doc/aura.8
@@ -648,7 +648,8 @@ You can then install it whenever you want with
 .
 Research packages using
 .BR \-Ad \ ( \-\-deps ),
-.BR \-Ai \ ( \-\-info ") and "
+.BR \-Ai \ ( \-\-info )
+and
 .BR \-Ap \ ( \-\-pkgbuild )!
 .
 .IP \(bu 2n

Otherwise, it's the same candy just in a different wrapper.

@ratijas ratijas marked this pull request as ready for review January 11, 2021 02:10
* use bold for options and italic for arguments;
* prefer macros over inline fonts changes;
* reword some descriptions, but nothing serious to worry about.

PS ratijas is [[maybe] not so] lazy little piece of sh|t after all.
   The proof is trivial and left as an exercise for him.
@ratijas
Copy link
Contributor Author

ratijas commented Jan 27, 2021

hi @fosskers, how it's going with moving countries? c:

For whatever reason, GitHub still thinks that changes are requested, but they actually were resolved long ago, so this shouldn't be an issue.

@fosskers
Copy link
Owner

fosskers commented Jan 27, 2021

Rest assured I haven't forgotten about this. I'm preparing to vacate my apartment on Sunday, and things are quite a mess at the moment as you might imagine.

@ratijas
Copy link
Contributor Author

ratijas commented Jan 27, 2021

Oh yeah, it's harsh. I moved countries a bit while studying at universities, so I kinda know what you're talking about. Btw, just got my first job week ago, still can't get used to the early morning schedule.

About man pages. You can view individual files with this command: man -l ./aura.8, and do an edit-preview cycle with this one-liner:

while true; do man -l aura.8; sleep 1; done

(sleep 1 is good for your health, it's very important for being able to wake up).

@fosskers
Copy link
Owner

fosskers commented Feb 2, 2021

I have successfully moved and am now reviewing the PR in earnest.

@fosskers fosskers merged commit 4b2f908 into fosskers:master Feb 2, 2021
@fosskers
Copy link
Owner

fosskers commented Feb 2, 2021

Thanks again!

@ratijas
Copy link
Contributor Author

ratijas commented Feb 3, 2021

Glad to see you are alright!

LMAO, can't believe you really merged all those commit messages unchanged. That's a good stuff.

And I have just received my new shiny hacktoberfest t-shirt. Is it just a coincidence? Hmm…

@ratijas ratijas deleted the man-pages branch February 3, 2021 09:52
@fosskers
Copy link
Owner

fosskers commented Feb 3, 2021

I'm not a fan of rewriting history. Each commit represents effort and shows the overall process.

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

Successfully merging this pull request may close these issues.

2 participants