aboutsummaryrefslogtreecommitdiff
path: root/hack/markdown-preprocess
Commit message (Collapse)AuthorAge
* Man pages: refactor common options: --volumeEd Santiago2022-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This one is a nightmare, because --volume has been edited in four different files throughout the years (five if you count podman-build, which I am not including in this PR). Those edits have not always been done in sync. The list of options was reordered 2022-06-28 by Giuseppe in #14734, but only in podman-create and -run (not in podman-pod-*). No explanation of why, but I'll assume he knew what he was doing, and have accepted that for the reference copy. There was also a big edit in #8519. The "Propagation property...bind mounted" sentence first appeared in pod-clone, in #14299 by cdoern, with no obvious source of where it came from. I choose to include it in the reference copy. The "**copy**" option seems to work in pod-create, so I'm including it in the reference copy. Someone please yell loudly if this is not the case. The "disables SELinux separation for containers used in the build", no idea, changed that to just "for the container/pod" The "advanced users / overlay / upperdir / workdir" paragraph makes zero sense to me, but hey, I assume it applies to all the commands, so I put it in the reference copy. Finally, there's still a mishmash of backticks, asterisks, underscores, and even quotation marks. Someone is gonna have to perform major cleanup on this one day, but at least it'll be in only one place. Signed-off-by: Ed Santiago <santiago@redhat.com>
* Man pages: refactor common options: archEd Santiago2022-08-15
| | | | | | | | | | | | | | | | | | Smaller, more reviewable chunks. This is just one option, --arch. Future PRs may, if the reviewing is easy, include multiple options. This one includes fixes to the preprocessor script, though: * big oops, I was not handling '<<something pod|something>>' where 'pod' appears other than the beginning of the string. * I was also not handling 'container<<| or pod>>', where one side was empty. * Behavior change: <<subcommand>>, on podman-pod-foo, becomes just 'foo' (not 'pod foo'). This will be useful in a future PR where we refactor --pod-id-file. Signed-off-by: Ed Santiago <santiago@redhat.com>
* Man pages: refactor common optionsEd Santiago2022-08-09
| | | | | | Continued. Harder-to-review ones this time. Signed-off-by: Ed Santiago <santiago@redhat.com>
* Refactor common man page options, phase 2Ed Santiago2022-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Followup to #15174. These are the options that are easy(ish) to review: those that have only drifted slightly, and need only minor tweaks to bring back to sanity. For the most part, I went with the text in podman-run because that was cleaned up in #5192 way back in 2020. These diffs primarily consist of using '**' (star star) instead of backticks, plus other formatting and punctuation changes. This PR also adds a README in the options dir, and a new convention: <<container text...|pod text...>> which tries to do the right thing based on whether the man page name includes "-pod-" or not. Since that's kind of hairy code, I've also added a test suite for it. Finally, since this is impossible to review by normal means, I'm temporarily committing hack/markdown-preprocess-review, a script that will diff option-by-option. I will remove it once we finish this cleanup, but be advised that there are still 130+ options left to examine, and some of those are going to be really hard to reunite. Review script usage: simply run it (you need to have 'diffuse' installed). It isn't exactly obvious, but it shouldn't take more than a minute to figure out. The rightmost column (zzz-chosen.md) is the "winner", the actual content that will be used henceforth. You really want an ultrawide screen here. Signed-off-by: Ed Santiago <santiago@redhat.com>
* markdown-preprocess: force extra newline on commentsEd Santiago2022-08-04
| | | | | | | | | | | | | | | | | go-md2man happily ignores our comment lines in most cases, but sphinx (used in readthedocs) cannot deal with comments if they immediately follow any other content line: blah blah [//]: # (my comment) ...the whole comment line is actually rendered in its output. Only solution seems to be to add extra newlines before each comment. Makes diff and PR review harder, but otherwise has no effect on the rendered documents. Signed-off-by: Ed Santiago <santiago@redhat.com>
* hack/markdown-preprocess: allow to be executed from any dirPaul Holzinger2022-08-04
| | | | Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* fix hack/markdown-preprocess to support older python versionsPaul Holzinger2022-08-04
| | | | | | | | | str.removeprefix() and str.removesuffix() is python 3.9+ only but we need to support older versions for the OSX cross task. This fixes broken CI on main. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* Refactor common options in man pagesEd Santiago2022-08-03
podman-create and -run have many options in common. To date, these are copy-pasted and haphazardly maintained. Solution: add an include mechanism, '@@option foo', such that multiple md source files can fetch from one common file. This is a Phase One commit, a very small subset of what's possible. Purpose of this commit is ease of review. If this passes review, much more (trickier stuff) will be forthcoming. Signed-off-by: Ed Santiago <santiago@redhat.com>