From c2382aa25a3e2b37ee5227e9e8325f8faa1d435f Mon Sep 17 00:00:00 2001 From: Chloe Kudryavtsev Date: Fri, 27 Dec 2019 17:41:36 -0500 Subject: [anypaste] add plugins --- dot_anypaste-plugins/executable_anyclone | 21 +++++++++++++++++++++ dot_anypaste-plugins/executable_brpaste | 28 ++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 dot_anypaste-plugins/executable_anyclone create mode 100644 dot_anypaste-plugins/executable_brpaste (limited to 'dot_anypaste-plugins') diff --git a/dot_anypaste-plugins/executable_anyclone b/dot_anypaste-plugins/executable_anyclone new file mode 100644 index 0000000..6fc03d5 --- /dev/null +++ b/dot_anypaste-plugins/executable_anyclone @@ -0,0 +1,21 @@ +#!/bin/sh +case $1 in + check_eligibility) + true + ;; + upload) + d=$(date +%Y/%m/%d) + rclone copyto "$ap_path" "fafnir:shared/anypaste/$d/$ap_human_name" + echo >&2 + echo "Direct: https://minio.toast.cafe/shared/anypaste/$d/$ap_human_name" + echo + ;; + get_info) + echo '[name]' + echo 'RClone' + echo '[description]' + echo 'LMAO' + echo '[tags]' + echo 'private' + echo 'direct' +esac diff --git a/dot_anypaste-plugins/executable_brpaste b/dot_anypaste-plugins/executable_brpaste new file mode 100644 index 0000000..7d36ca4 --- /dev/null +++ b/dot_anypaste-plugins/executable_brpaste @@ -0,0 +1,28 @@ +#!/bin/sh + +: "${brpaste_host:=https://brpaste.xyz}" + +case $1 in + check_eligibility) + [[ $ap_mime == text/* ]] + ;; + upload) + brpaste_id=$(curl -#fF "data=<$ap_path" "$brpaste_host") \ + || { echo 'ERROR: Upload failed!' >&2 && exit 1; } + echo >&2 + echo "Link: $brpaste_host/$brpaste_id" + echo "Direct: $brpaste_host/raw/$brpaste_id" + echo + ;; + get_info) + echo '[name]' + echo 'BRPaste' + echo '[description]' + echo 'A pastebin so fast, it burns rubber.' + echo '[tags]' + echo 'private' + echo 'direct' + echo + echo '[optional_config]' + echo 'brpaste_host:Hosted instance to use (default: https://brpaste.xyz)' +esac -- cgit v1.2.3