aboutsummaryrefslogtreecommitdiff
path: root/export-pad
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-08-20 20:42:26 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-08-20 20:42:26 -0300
commitd1791e72e2e1442033cad2ad7ef1dd183562ddec (patch)
tree1a6f087ba2d77d6a7f69230da2ec8ba30c5b0f00 /export-pad
downloadutils-doc-d1791e72e2e1442033cad2ad7ef1dd183562ddec.tar.gz
utils-doc-d1791e72e2e1442033cad2ad7ef1dd183562ddec.tar.bz2
Initial import
Diffstat (limited to 'export-pad')
-rwxr-xr-xexport-pad18
1 files changed, 18 insertions, 0 deletions
diff --git a/export-pad b/export-pad
new file mode 100755
index 0000000..fd17d2a
--- /dev/null
+++ b/export-pad
@@ -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