aboutsummaryrefslogtreecommitdiff
path: root/keyringer-export-pads
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-12-06 15:08:06 -0200
committerSilvio Rhatto <rhatto@riseup.net>2018-12-06 15:08:06 -0200
commit761bf47b0bdac9e9d4b642aae6db9dd2789bda8e (patch)
treea3525431daf5401025e203fc420cf90cf51c1fde /keyringer-export-pads
parent3bc73f18a72f5b8a92d3fe11be75fa377f93edb5 (diff)
downloadscripts-761bf47b0bdac9e9d4b642aae6db9dd2789bda8e.tar.gz
scripts-761bf47b0bdac9e9d4b642aae6db9dd2789bda8e.tar.bz2
Adds keyringer-export-pads
Diffstat (limited to 'keyringer-export-pads')
-rwxr-xr-xkeyringer-export-pads25
1 files changed, 25 insertions, 0 deletions
diff --git a/keyringer-export-pads b/keyringer-export-pads
new file mode 100755
index 0000000..34837cb
--- /dev/null
+++ b/keyringer-export-pads
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+#
+# Export etherpad content into a keyring.
+# This is currently too specific to be added into keyringer tree.
+#
+
+# Load functions
+#LIB="`dirname $0`/../functions"
+#source "$LIB" maintenance $* || exit 1
+
+# Parameters
+KEYRING="$1"
+BASENAME="`basename $0`"
+
+# Check
+if [ -z "$KEYRING" ]; then
+ echo "usage: $BASENAME <keyring>"
+ exit 1
+fi
+
+# Dispatch
+for pad in `keyringer $KEYRING ls pads/urls`; do
+ echo "Exporting $pad..."
+ torify curl `keyringer $KEYRING decrypt pads/urls/$pad main 2> /dev/null`/export/txt | keyringer $KEYRING encrypt pads/exports/$pad
+done