X-Git-Url: https://plomlompom.com/repos/?p=redo-blog;a=blobdiff_plain;f=processor%2Fdefault.html.do;h=31fa9cd5e24259401c9ff0332eae1639f95c8648;hp=ba163e2e29f32369cd2075f5d282cd6b46879326;hb=72ae8fbf69b4a8de4cf31c5b9b9ee7bb760f2278;hpb=0dddf8e27165915e413feaa4a6acf234e4ca5d17 diff --git a/processor/default.html.do b/processor/default.html.do index ba163e2..31fa9cd 100644 --- a/processor/default.html.do +++ b/processor/default.html.do @@ -10,7 +10,8 @@ prep_url() { # Pull in global dependencies. . ./helpers.sh metadata_dir=metadata -captchas_dir=captchas +captchas_dir=captchas/public +mkdir -p "$captchas_dir" meta_file="${metadata_dir}/${1%.html}.automatic_metadata" redo-ifchange "$meta_file" intermediate_file="${metadata_dir}/${1%.html}.intermediate" @@ -38,6 +39,7 @@ date_created=$(date -u "+%Y-%m-%d" -d "@${datetime_created_unix}") datetime_lastmod_unix=$(get_lastmod_date_from_meta_file "$meta_file") date_updated=$(date -u "+%Y-%m-%d" -d "@${datetime_lastmod_unix}") replies=$(while read line; do prep_url "$line"; done < "$replies_file") +captcha=$(escape_html "$(cat "$captcha_file" | sed -n 2p)" | prep_sed) # Put data into template. template=$(cat "$article_tmpl_file") @@ -49,4 +51,5 @@ sed 's/%DATE_CREATED%/'"$date_created"'/g' | \ sed 's/%DATE_UPDATED%/'"$date_updated"'/g' | \ sed 's/%BODY%/'"$body"'/g' | \ sed 's/%LINKBACKS%/'"$replies"'/g' | \ +sed 's/%CAPTCHA%/'"$captcha"'/g' | \ tr '\a' '%'