summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbcattaneo <c@ttaneo.uy>2020-09-08 12:32:36 -0300
committerRasmus Thomsen <oss@cogitri.dev>2021-03-31 19:40:07 +0200
commit2cfba484161c6b9b712e1f0582d3bd5537302100 (patch)
treeb6d1525cb6cf459b38613bc2618865324a7240c9
parentf99fc64d248e55a83a128f3283fa7fff012c4c11 (diff)
downloadwgetpaste-2cfba484161c6b9b712e1f0582d3bd5537302100.tar.gz
Add missing expiration to pinnwand JSON
-rwxr-xr-xwgetpaste4
1 files changed, 2 insertions, 2 deletions
diff --git a/wgetpaste b/wgetpaste
index 9457b7a..94f816e 100755
--- a/wgetpaste
+++ b/wgetpaste
@@ -289,8 +289,8 @@ REGEX_RAW_pinnwand='s|^\(https://bpa.st\)\(/.*\)$|\1/raw\2|'
escape_description_pinnwand() { sed -e 's|"|\\"|g' -e 's|\x1b|\\u001b|g' -e 's|\r||g' <<< "$*"; }
escape_input_pinnwand() { sed -e 's|\\|\\\\|g' -e 's|\x1b|\\u001b|g' -e 's|\r||g' -e 's|\t|\\t|g' -e 's|"|\\"|g' -e 's|$|\\n|' <<< "$*" | tr -d '\n'; }
POST_pinnwand() {
- local description="${2}" language="${3}" content="${6}"
- echo "{\"expiry\": \"${DEFAULT_EXPIRATION_bpaste}\", \"files\": [ {\"name\": \"${description}\", \"lexer\": \"${language}\", \"content\": \"${content}\"} ] }"
+ local description="${2}" language="${3}" expiration="${4}" content="${6}"
+ echo "{\"expiry\": \"${expiration}\", \"files\": [ {\"name\": \"${description}\", \"lexer\": \"${language}\", \"content\": \"${content}\"} ] }"
}
# snippets
REGEX_URL_snippets='s|.*"web_url":"\([^"]*\)".*|\1|p'