X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/copy_free?a=blobdiff_plain;f=processor%2Fmetadata%2Fdefault.feed_snippet.do;h=7ff8d4348a6f4946fa4d4f07c23937ec517621fd;hb=576cff5e1afc893dbc4004a958b66b326b847693;hp=8dca59b68f3bc67bc816dc5ad858b020af87e9a9;hpb=ff5b37d8bc4cfba8f1db69a279da887accaa0296;p=redo-blog
diff --git a/processor/metadata/default.feed_snippet.do b/processor/metadata/default.feed_snippet.do
index 8dca59b..7ff8d43 100644
--- a/processor/metadata/default.feed_snippet.do
+++ b/processor/metadata/default.feed_snippet.do
@@ -1,5 +1,11 @@
#!/bin/sh
+# Handle URL from .links file.
+prep_url() {
+ url=$(escape_html "$1")
+ printf "\n" "$url"
+}
+
# Pull in dependencies.
. ../helpers.sh
src_file=$(get_source_file "$1")
@@ -7,6 +13,7 @@ meta_file="${1%.feed_snippet}.automatic_metadata"
redo-ifchange "$meta_file"
intermediate_file="${1%.feed_snippet}.intermediate"
redo-ifchange "$intermediate_file"
+replies_file="${src_file%.*}.links"
# Get variables, write entry.
html_file=$(escape_url "${1%.feed_snippet}.html")
@@ -17,11 +24,15 @@ uuid=$(get_uuid_from_meta_file "$meta_file")
published_unix=$(get_creation_date_from_meta_file_seconds "$meta_file")
published_rfc3339=$(date -u "+%Y-%m-%dT%TZ" -d "@${published_unix}")
body=$(read_and_escape_file "$intermediate_file" | sed 1d)
+if test -f "$replies_file"; then
+ replies=$(while read line; do prep_url "$line"; done < "$replies_file")
+fi
printf "\n"
printf "%s\n" "$title"
printf "urn:uuid:%s\n" "$uuid"
printf "%s\n" "$lastmod_rfc3339"
printf "%s\n" "$published_rfc3339"
-printf "\n" "$(get_basepath)" "${html_file}"
-printf "\n%s\n\n" "$body"
+printf "" "$(get_basepath)" "${html_file}"
+printf "%s" "$replies"
+printf "\n\n%s\n\n" "$body"
printf "\n"