posts_with_tags() to list all posts referenced by several tag files
This commit is contained in:
parent
a52f2e6758
commit
4558f43f4a
8
bb.sh
8
bb.sh
|
@ -776,6 +776,14 @@ tags_in_post() {
|
||||||
sed -n "/^<p>$template_tags_line_header/{s/^<p>$template_tags_line_header//;s/<[^>]*>//g;s/[ ,]\+/ /g;p}" $1
|
sed -n "/^<p>$template_tags_line_header/{s/^<p>$template_tags_line_header//;s/<[^>]*>//g;s/[ ,]\+/ /g;p}" $1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Finds all posts referenced in a number of tags.
|
||||||
|
# Arguments are tags
|
||||||
|
# Prints one line with space-separated tags to stdout
|
||||||
|
posts_with_tags() {
|
||||||
|
tag_files="$(echo "$@" | sed "s/\S\+/tag_&.html/g")"
|
||||||
|
sed -n '/^<h3><a class="ablack" href="[^"]*">/{s/.*href="\([^"]*\)">.*/\1/;p}' $tag_files
|
||||||
|
}
|
||||||
|
|
||||||
# Rebuilds tag_*.html files
|
# Rebuilds tag_*.html files
|
||||||
# if no arguments given, rebuilds all of them
|
# if no arguments given, rebuilds all of them
|
||||||
# if arguments given, they should have this format:
|
# if arguments given, they should have this format:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user