From 911b60b792c757243fe5f9fe8336d3569440f27b Mon Sep 17 00:00:00 2001 From: dece Date: Tue, 5 Jul 2022 22:34:07 +0200 Subject: [PATCH] shr-txt.sh --- shr-txt.sh | 6 ++++++ shrlok/shr-txt.py | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100755 shr-txt.sh delete mode 100644 shrlok/shr-txt.py diff --git a/shr-txt.sh b/shr-txt.sh new file mode 100755 index 0000000..ed28a83 --- /dev/null +++ b/shr-txt.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# Share a text file to shrlok. +cat <(printf '{"type":"txt"}\0') "$1" \ + | socat - UNIX-CONNECT:/run/shrlok/shr.sock \ + | sed 's|/var/www/files|https://files.dece.space|' \ + ; echo diff --git a/shrlok/shr-txt.py b/shrlok/shr-txt.py deleted file mode 100644 index 63f77b6..0000000 --- a/shrlok/shr-txt.py +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env python3 -