assume entries without time are posted at end of day instead of beginning

This commit is contained in:
nytpu 2020-09-19 09:26:55 -06:00
parent 8598ef396b
commit 0e97b12e26
Signed by: nytpu
GPG Key ID: ECCDC07B337B8F5B
2 changed files with 4 additions and 3 deletions

View File

@ -6,7 +6,7 @@ needing a cgi script.
Dependencies:
other than `toot` you really should have all these installed if you're on linux.
* bash and all its goodies (duh)
* perl
* `perl`
* `date`
* `tr`
* `sed`

View File

@ -24,7 +24,7 @@ make_globals() {
global_author="nytpu"
global_author_email="alex@nytpu.com"
global_author_url="gemini://nytpu.com/" # homepage of author
global_license="CC BY-NC 4.0"
global_license="CC BY-SA 4.0"
gemlog_feed="atom.xml" # filename of the atom feed
number_of_feed_articles="50" # maximum number of posts added to atom feed
@ -35,6 +35,7 @@ make_globals() {
# don't change these
gemlog_sh_link="https://tildegit.org/nytpu/gemlog.sh" # link to the utility, you should change this if you modified it substantially
date_format_8601="+%Y-%m-%dT%H:%M:%S%:z" # *formal* ISO-8601 format including time zone
date_format_8601_timeless="+%Y-%m-%dT23:59:59%:z" # *formal* ISO-8601 format including time zone
}
get_post_title() {
@ -73,7 +74,7 @@ EOF
get_post_title "$i" | tr -d '\n'
printf "</title>\n <id>$global_url${i#'./'}</id>\n"
printf " <link rel='alternate' href='$global_url${i#'./'}'/>\n <updated>"
echo "$i" | perl -ne '/^(\d{4}-\d{2}-\d{2}).*/; print $1' | date "$date_format_8601" -f - | tr -d '\n'
echo "$i" | perl -ne '/^(\d{4}-\d{2}-\d{2}).*/; print $1' | date "$date_format_8601_timeless" -f - | tr -d '\n'
# change or remove the <summary></summary> block if you want a different description or no description at all
printf "</updated>\n <summary>You need a gemini client to view this post. If you have one installed, here is the link to the post: $global_url${i#'./'}</summary>\n </entry>\n"