Introduction
Introduction Statistics Contact Development Disclaimer Help
Make txt version content and enclosure link pdf version. - tgtimes - The Gopher…
git clone git://bitreich.org/tgtimes git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws…
Log
Files
Refs
Tags
README
---
commit 54a44e815e4b30a8652bd3069f2f6062f60a11da
parent c5089ceb5a678d669b98b10ac03295ebb1b948dc
Author: Christoph Lohmann <[email protected]>
Date: Sat, 29 Jan 2022 21:02:40 +0100
Make txt version content and enclosure link pdf version.
Diffstat:
M archive/mk-atom.sh | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/archive/mk-atom.sh b/archive/mk-atom.sh
@@ -15,16 +15,23 @@ do
printf "\t\t<entry>\n"
printf "\t\t<id>%s</id>\n" "${uri}"
printf "\t\t<title><![CDATA[%s]]></title>\n" "${release}"
+ printf "\t\t<author><name>The Gopher Times Authors</name></author>\n"
+
cd ${release}
- find . -type f | cut -d'/' -f 2- \
- | while read -r releasefile;
- do
- mimetype="$(file --mime-type -b "${releasefile}")"
- printf "\t\t<link type=\"%s\" href=\"%s/%s\" />\n" \
+ txtedition=$(find . -type f -name "*.txt" | cut -d'/' -f 2-)
+ pdfedition=$(find . -type f -name "*.pdf" | cut -d'/' -f 2-)
+ printf "\t\t<content type=\"text\"><[!CDATA["
+ cat $txtedition
+ printf "]]></content>\n"
+
+ lastmodified=$(stat --printf="%Y" ${txtedition})
+ lastupdated="$(date +%FT%T%z -d @${lastmodified})"
+ printf "\t\t<updated>%s</updated>\n" "${lastupdated}"
+ mimetype="$(file --mime-type -b "${pdfedition}")"
+ printf "\t\t<link type=\"%s\" href=\"%s/%s\" />\n" \
"${mimetype}" \
"${uri}" \
- "${releasefile}"
- done
+ "${pdfedition}"
cd ..
printf "\t\t</entry>\n"
done
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.