commit ea34be20d6218b9f9e730534743130fd9cb08603 Author: systers Date: Fri Nov 20 23:59:31 2020 +0100 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8bc849e --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.log +pulish/ +./index.html diff --git a/cron.sh b/cron.sh new file mode 100644 index 0000000..85874b3 --- /dev/null +++ b/cron.sh @@ -0,0 +1,22 @@ +date >> cron.log +echo "cronjob started!" >> cron.log +echo "" >> cron.log + +# This will pump all the pads with a __PUBLISH__ tag into a folder "publish" as meta.json, txt, html and dhtml +.venv/bin/etherpump pull --meta --dhtml --html --text --publish-opt-in --publish __PUBLISH__ --pub publish --css stylesheet.css --fix-names + +echo "Making the Etherpump index now ..." + +# This will make an index for the dump +.venv/bin/etherpump index input \ + /var/www/etherpump/publish/*.meta.json \ + --order lastedited \ + --reverse \ + --templatepath /var/www/etherpump/templates \ + --title "Varia ether-notes, magic words and curated listings." \ + --output index.html | tee -a etherpump.log + +echo "Done!" + +# This will save a pad.css file every hour from the pad https://pad.vvvvvvaria.org/pad.css +# cp publish/pad.css /srv/etherpad-lite/src/altetherpad/src/static/skins/no-skin/pad.css diff --git a/stylesheet.css b/stylesheet.css new file mode 100644 index 0000000..0d69ad6 --- /dev/null +++ b/stylesheet.css @@ -0,0 +1,31 @@ +html{ + border: 10px inset #9600ff; + min-height: calc(100vh - 20px); +} +body{ + margin:1em; + // font-family:monospace; + font-size:16px; + line-height: 1.3; + background-color: pink; +} +#welcome{ + max-width: 600px; + margin:1em 0; +} +table{ + min-width: 800px; +} +th, td{ + text-align: left; + padding:0 1em 0 0; +} +hr{ + border:0; + border-bottom:1px solid; + margin:2em 0 1em; +} +#footer{ + max-width: 600px; +} +.info{font-size: smaller;} diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..7d50809 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,59 @@ + + + + + {{ title }} + + + {% block scripts %} + {% endblock scripts %} + + +{% set padoftheday = pads | random %} +

{{ title }}

+
+ Welcome! The pages below have been deliberately published by their authors in order to share their thoughts, research and process in an early form. This page represents one of Varia's low-effort publishing tools. The pages are all produced through Varia's Etherpad instance. +
+
+ Etherpad is used as collaborative writing tool to take notes, create readers, coordinate projects and document gatherings that happen in and around Varia. For example {{ padoftheday.padid }}. +
+
+ This index is updated every 60 minutes. +
+ + + + + + + + + + + +{% for pad in pads %} + + + + + + + +{% endfor %} + +
nameversionslast editedrevisionsauthors
+ {{ pad.padid }} + + {% for v in pad.versions %}{{ v.type }} {% endfor %} + {{ pad.lastedited_iso|datetimeformat }}{{ pad.revisions }}{{ pad.author_ids|length }}
+ + + +