]> gitweb.fluxo.info Git - scripts.git/commitdiff
Adds export-pad
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 24 Jul 2020 14:07:11 +0000 (11:07 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 24 Jul 2020 14:07:11 +0000 (11:07 -0300)
export-pad [new file with mode: 0755]

diff --git a/export-pad b/export-pad
new file mode 100755 (executable)
index 0000000..fd17d2a
--- /dev/null
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+#
+# Export etherpad content into a file.
+#
+
+# Parameters
+URL="$1"
+FILE="$2"
+BASENAME="`basename $0`"
+
+# Check
+if [ -z "$FILE" ]; then
+  echo "usage: $BASENAME <url> <file>"
+  exit 1
+fi
+
+# Dispatch
+torify curl $URL/export/txt > $FILE