Martin Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48963 )
Change subject: util/util_readme: Update summary and tail to match current docs ......................................................................
util/util_readme: Update summary and tail to match current docs
The top and bottom of the generated file have been changed in the documentation directory, so update what's generated by creating markdown files in the util_readme directory.
This change also adds a note at the bottom of the documentation file that it's generated and the markdown in the util_readme directory should be edited instead.
Signed-off-by: Martin Roth martin@coreboot.org Change-Id: I020a94e66ada320e49bd78125d59a09b237015f5 --- A util/util_readme/bottom_text.md A util/util_readme/header_text.md M util/util_readme/util_readme.sh 3 files changed, 24 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/48963/1
diff --git a/util/util_readme/bottom_text.md b/util/util_readme/bottom_text.md new file mode 100644 index 0000000..4a7dc68 --- /dev/null +++ b/util/util_readme/bottom_text.md @@ -0,0 +1,16 @@ + + + ## In depth documentation + +* [ifdtool](ifdtool/index.md) + +## Generated documentation + +**Please do not edit the markdown file in the documentation directory +*directly.** + +This file was generated by running util_readme.sh. Please make sure it +is rerun when new tools are added or when documentation is updated. + +To update, edit the markdown files in the util directory, then +re-generate this file by running `util/util_readme/util_readme.sh` diff --git a/util/util_readme/header_text.md b/util/util_readme/header_text.md new file mode 100644 index 0000000..47769c7 --- /dev/null +++ b/util/util_readme/header_text.md @@ -0,0 +1,5 @@ +# Utilities + +## List of utils + +_Scripts and programs found in the coreboot `./util` directory_ diff --git a/util/util_readme/util_readme.sh b/util/util_readme/util_readme.sh index 64b4232..168bde0 100755 --- a/util/util_readme/util_readme.sh +++ b/util/util_readme/util_readme.sh @@ -10,7 +10,6 @@ UTIL_DIR=$(dirname "$UTIL_README_DIR") COREBOOT_ROOT_DIR=$(dirname "$UTIL_DIR") DOCMENTATION_DIR="$COREBOOT_ROOT_DIR/Documentation" -SUMMARY="_Scripts and programs found in the `./util` directory_"
# format description to under 72 characters per line and only # breaking on whitespace @@ -27,8 +26,7 @@ DESCRIPTION_FILES=$(find "$UTIL_DIR" -name "description.md" | sort)
echo -n "" > "$UTIL_DIR/README.md" -echo "# Utilities" > "$DOCMENTATION_DIR/util.md" -echo "$SUMMARY" >> "$DOCMENTATION_DIR/util.md" +cat "${UTIL_README_DIR}/header_text.md" > "$DOCMENTATION_DIR/util.md"
for DESC_FILE in $DESCRIPTION_FILES; do UTIL_NAME=$(echo "$DESC_FILE" | rev | cut -d '/' -f2 | rev) @@ -43,3 +41,5 @@ fmtstring "$DESC" >> "$UTIL_DIR/README.md" fmtstring "$DESC" >> "$DOCMENTATION_DIR/util.md" done + +cat "${UTIL_README_DIR}/bottom_text.md" >> "$DOCMENTATION_DIR/util.md"
Tom Hiller has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48963 )
Change subject: util/util_readme: Update summary and tail to match current docs ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48963/1/util/util_readme/util_readm... File util/util_readme/util_readme.sh:
https://review.coreboot.org/c/coreboot/+/48963/1/util/util_readme/util_readm... PS1, Line 45: cat "${UTIL_README_DIR}/bottom_text.md" >> "$DOCMENTATION_DIR/util.md" As mentioned in #48966, should Should `util/README.md` also have the same header and footer as `Documentation/util.md`?
Attention is currently required from: Tom Hiller. Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48963 )
Change subject: util/util_readme: Update summary and tail to match current docs ......................................................................
Patch Set 2:
(1 comment)
File util/util_readme/util_readme.sh:
https://review.coreboot.org/c/coreboot/+/48963/comment/fbbaea96_6d1ee4f0 PS1, Line 45: cat "${UTIL_README_DIR}/bottom_text.md" >> "$DOCMENTATION_DIR/util.md"
As mentioned in #48966, should Should `util/README. […]
It didn't before, so I didn't add it. If it should, I'd be glad to add it in a separate patch.
Attention is currently required from: Martin Roth. Tom Hiller has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48963 )
Change subject: util/util_readme: Update summary and tail to match current docs ......................................................................
Patch Set 2:
(1 comment)
File util/util_readme/util_readme.sh:
https://review.coreboot.org/c/coreboot/+/48963/comment/4692523d_6549e7a8 PS1, Line 45: cat "${UTIL_README_DIR}/bottom_text.md" >> "$DOCMENTATION_DIR/util.md"
It didn't before, so I didn't add it. If it should, I'd be glad to add it in a separate patch.
`Documentation/util.md` did not include them either until they were added here and in 48966. Just so everything is synced, could this PR be updated to add the header and footer to `util/REAME.md` as well as a PR with with the file updated?
Martin Roth has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/48963 )
Change subject: util/util_readme: Update summary and tail to match current docs ......................................................................
Abandoned