fusch.online

git / lists / casts

git.fusch.online/planner

Generate static pages from a list of links
git clone git://git.fusch.online/planner
Log / Files / Readme / Issues

commit 00a5ee1b14ed457ea4b6092252f6b8771018c72c
parent e485adb21cdaa30abac0e22341320501f5fe6c3d
Author: tutti <tutti@fusch.online>
Date:   Sat, 29 Jun 2019 23:18:40 +0200

add config

Diffstat:
MREADME.md | 4+++-
Aconfig | 3+++
Mplanner | 6++----
3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md @@ -8,7 +8,9 @@ Generate static pages from a list of links ## usage - BASEURL=example.com ./planner links.tsv +Edit `config`, then: + + ./planner links.tsv This will write all files to a directory named ./planner_html. diff --git a/config b/config @@ -0,0 +1,3 @@ +PLANNER_NAME=tutti +PLANNER_EMAIL=tutti@fusch.online +PLANNER_URL=planner.fusch.online diff --git a/planner b/planner @@ -6,12 +6,10 @@ site=planner_html offline=false dateformat="--rfc-3339=seconds" builddate=$(date "$dateformat") -baseurl=${BASEURL:-example.com} sitetitle="planner" config=./config - print_html_head() { cat <<EOF <!DOCTYPE html> @@ -60,9 +58,9 @@ print_atom_head() { cat << EOF <?xml version="1.0" encoding="UTF-8" ?> <feed xmlns="http://www.w3.org/2005/Atom"> -<link rel="self" href="https://$sitetitle.$baseurl/atom.xml"></link> +<link rel="self" href="https://$PLANNER_URL/atom.xml"></link> <title>$sitetitle</title> -<id>https://$sitetitle.$baseurl</id> +<id>https://$PLANNER_URL</id> <updated>$builddate</updated> EOF }