summaryrefslogtreecommitdiff
path: root/install-files/essential-files/usr/bin/brpaste
diff options
context:
space:
mode:
Diffstat (limited to 'install-files/essential-files/usr/bin/brpaste')
-rw-r--r--install-files/essential-files/usr/bin/brpaste29
1 files changed, 0 insertions, 29 deletions
diff --git a/install-files/essential-files/usr/bin/brpaste b/install-files/essential-files/usr/bin/brpaste
deleted file mode 100644
index d2f9d867..00000000
--- a/install-files/essential-files/usr/bin/brpaste
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env python3
-
-import urllib.request
-import os
-import json
-
-URL = 'http://paste.baserock.org/documents'
-
-def run(*args):
- if args:
- content = [open(x).read() for x in args]
- extensions = [os.path.splitext(x)[1] for x in args]
- else:
- content = [sys.stdin.read()]
- extensions = [None]
-
- for i, each in enumerate(content):
- req = urllib.request.Request(URL, each.encode('utf-8'))
- response = urllib.request.urlopen(req)
- the_page = response.read().decode('utf-8')
- key = json.loads(the_page)['key']
- url = "http://paste.baserock.org/%s" % key
- if extensions[i]:
- url += extensions[i]
- print(url)
-
-if __name__ == '__main__':
- import sys
- sys.exit(run(*sys.argv[1:]))