From 2580e02140f112e8797807620e36712489039754 Mon Sep 17 00:00:00 2001 From: Tianhao Wang Date: Sat, 14 Oct 2023 00:04:45 +0200 Subject: init --- examples/hugo_timeline_partial.html | 22 ++++++++++++++++++++++ examples/syncblog.sh | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 examples/hugo_timeline_partial.html create mode 100644 examples/syncblog.sh (limited to 'examples') diff --git a/examples/hugo_timeline_partial.html b/examples/hugo_timeline_partial.html new file mode 100644 index 0000000..251ccce --- /dev/null +++ b/examples/hugo_timeline_partial.html @@ -0,0 +1,22 @@ + + +

Timeline

+ + + {{ $tl := site.Data.tl }} + {{ range $tl }} + + + + + {{ end }} + +
@{{.account}}🔗
[{{.created_at}}] {{ .content }}
diff --git a/examples/syncblog.sh b/examples/syncblog.sh new file mode 100644 index 0000000..5661923 --- /dev/null +++ b/examples/syncblog.sh @@ -0,0 +1,22 @@ +#!/usr/bin/bash + +# THIS IS AN EXAMPLE +# DON'T RUN ME WITHOUT MODIFYING! + +# FOOLPROOF +echo "do you know what you are doing?" +exit() + +cd +echo "Fetching Timeline from fedi..." +./timelinebot.py +cp tl.json + +cd +echo "Rendering blog..." +hugo + +echo "Sync blog to remote server..." +rsync -avh -og --chown=http:http --info=progress2 --info=name0 --update --delete-after \ + \ + user@remote_server: -- cgit v1.2.3-70-g09d2