Add autogenerated footer and remove command hr
This commit is contained in:
parent
6a9a171430
commit
0d90b0f45a
|
@ -1,6 +1,6 @@
|
||||||
# Bash Template Command
|
# Bash Template Command
|
||||||
|
|
||||||
*This `README.md` is [autogenerated](#generate-readmemd-file).*
|
*This `README.md` is autogenerated.*
|
||||||
|
|
||||||
This is a GitHub template repo that will be copied instead of forked to
|
This is a GitHub template repo that will be copied instead of forked to
|
||||||
create a new Bash command with a command something like this:
|
create a new Bash command with a command something like this:
|
||||||
|
@ -60,7 +60,6 @@ Copyright 2021 Rob Muhlestein <rob@rwx.gg>
|
||||||
Released under Apache-2.0 License
|
Released under Apache-2.0 License
|
||||||
Please mention <https://youtube.com/rwxrob>
|
Please mention <https://youtube.com/rwxrob>
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
|
@ -102,3 +101,7 @@ GitHub or similar hosting service.
|
||||||
|
|
||||||
Displays a summary of usage.
|
Displays a summary of usage.
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
*Autogenerated Tue Aug 10 07:15:16 PM EDT 2021*
|
||||||
|
|
||||||
|
|
3
command
3
command
|
@ -171,7 +171,7 @@ GitHub or similar hosting service. '
|
||||||
command_readme() {
|
command_readme() {
|
||||||
_trim "${help[main]}"
|
_trim "${help[main]}"
|
||||||
local usage="$(command_usage)"
|
local usage="$(command_usage)"
|
||||||
printf "\n----\n\n## Commands\n\n"
|
printf "\n\n## Commands\n\n"
|
||||||
local -a names=("${!help[@]}")
|
local -a names=("${!help[@]}")
|
||||||
while IFS= read -r name; do
|
while IFS= read -r name; do
|
||||||
[[ $name = main ]] && continue
|
[[ $name = main ]] && continue
|
||||||
|
@ -179,6 +179,7 @@ command_readme() {
|
||||||
[[ $body =~ ^\# ]] || body="# The \`$name\` Command\n\n$body"
|
[[ $body =~ ^\# ]] || body="# The \`$name\` Command\n\n$body"
|
||||||
printf "##$body\n\n"
|
printf "##$body\n\n"
|
||||||
done < <(printf "%s\n" "${!help[@]}" | LC_COLLATE=C sort)
|
done < <(printf "%s\n" "${!help[@]}" | LC_COLLATE=C sort)
|
||||||
|
echo -e "----\n\n*Autogenerated $(date)*\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue