forked from nytpu/gemlog.sh
add asterism and footer separator and remove CRLF
This commit is contained in:
parent
d20c40d0b0
commit
bc710a3edd
14
gemlog.sh
14
gemlog.sh
|
@ -96,7 +96,7 @@ build_entries() {
|
||||||
|
|
||||||
{
|
{
|
||||||
# header of the page (above the posts list)
|
# header of the page (above the posts list)
|
||||||
sed 's/$/\r/g' << 'EOF'
|
cat << 'EOF'
|
||||||
```yet another tech gemlog (yatg) by nytpu
|
```yet another tech gemlog (yatg) by nytpu
|
||||||
,───────────────.
|
,───────────────.
|
||||||
(_\ _________ \ __
|
(_\ _________ \ __
|
||||||
|
@ -114,12 +114,14 @@ EOF
|
||||||
post=$(basename $i)
|
post=$(basename $i)
|
||||||
title=$(get_post_title "$i")
|
title=$(get_post_title "$i")
|
||||||
pubdate=$(echo $i | perl -ne '/^(\d{4}-\d{2}-\d{2}).*/; print $1')
|
pubdate=$(echo $i | perl -ne '/^(\d{4}-\d{2}-\d{2}).*/; print $1')
|
||||||
printf "=> $global_url$post $pubdate — $title\r\n"
|
printf "=> $global_url$post $pubdate — $title\n"
|
||||||
done < <(ls -r [[:digit:]]*.gmi)
|
done < <(ls -r [[:digit:]]*.gmi)
|
||||||
|
|
||||||
# footer of the page (below the list of posts)
|
|
||||||
sed 's/$/\r/g' << EOF
|
|
||||||
|
|
||||||
|
# footer of the page (below the list of posts)
|
||||||
|
cat << EOF
|
||||||
|
|
||||||
|
|
||||||
|
⁂
|
||||||
|
|
||||||
=> / go home
|
=> / go home
|
||||||
=> /gemlog/old/ click here to view an archive of my old gemlog
|
=> /gemlog/old/ click here to view an archive of my old gemlog
|
||||||
|
@ -143,7 +145,7 @@ toot() {
|
||||||
then
|
then
|
||||||
echo "tooting..."
|
echo "tooting..."
|
||||||
# change this if you want the toot to have different content
|
# change this if you want the toot to have different content
|
||||||
printf "new gemlog post: ${title}\n\ngemini://nytpu.com/gemlog/${filename}" | toot post
|
printf "new gemlog post: ${title}\n\ngemini://nytpu.com/gemlog/${filename}" | toot post
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue