diff options
author | Nicholas Vinson <nvinson234@gmail.com> | 2020-10-24 08:53:21 -0400 |
---|---|---|
committer | Rasmus Thomsen <oss@cogitri.dev> | 2021-02-19 09:31:23 +0100 |
commit | 3f9e38c7d75be638e71c9391de21ae064028f545 (patch) | |
tree | 00f584bfd5d4d984c42c1824114bc556bf8f8777 | |
parent | 6d44493b989aad3ec5e2189029be992aa03e7541 (diff) | |
download | wgetpaste-3f9e38c7d75be638e71c9391de21ae064028f545.tar.gz |
Sort pastebins in alphabetical order
-rwxr-xr-x | wgetpaste | 27 |
1 files changed, 13 insertions, 14 deletions
@@ -68,14 +68,14 @@ URL_gists="https://api.github.com/gists" ENGINE_ix_io=ix_io URL_ix_io="http://ix.io" SIZE_ix_io="1000000 1%MB" -# tinyurl -ENGINE_tinyurl=tinyurl -URL_tinyurl="http://tinyurl.com/ api-create.php" -REGEX_RAW_tinyurl='s|^\(http://[^/]*/\)\([[:alnum:]]*\)$|\1\2|' # snippets ENGINE_snippets=snippets URL_snippets="https://gitlab.com/api/v4/snippets" ADDITIONAL_HEADERS_snippets=("Content-Type: application/json") +# tinyurl +ENGINE_tinyurl=tinyurl +URL_tinyurl="http://tinyurl.com/ api-create.php" +REGEX_RAW_tinyurl='s|^\(http://[^/]*/\)\([[:alnum:]]*\)$|\1\2|' ### engines # 0x0 @@ -184,16 +184,6 @@ POST_ix_io() { } REGEX_RAW_ix_io='s|^http.*|\0|' REGEX_URL_ix_io='s|^http.*|\0|p' - -# snippets -REGEX_URL_snippets='s|.*"web_url":"\([^"]*\)".*|\1|p' -REGEX_RAW_snippets='s|^\(.*/snippets\)\(/.*\)$|\1\2/raw|' -escape_description_snippets() { sed -e 's|"|\\"|g' -e 's|\x1b|\\u001b|g' -e 's|\r||g' <<< "$*"; } -escape_input_snippets() { 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_snippets() { - local description="${2}" content="${6}" - echo "{\"title\": \"${description}\", \"content\": \"${content}\", \"description\": \"${description}\", \"file_name\": \"${description}\", \"visibility\": \"${VISIBILITY_snippets}\" }" -} # lodgeit LANGUAGES_lodgeit="ABAP ActionScript ActionScript%3 Ada ANTLR ANTLR%With%ActionScript%Target \ ANTLR%With%CPP%Target ANTLR%With%C#%Target ANTLR%With%Java%Target ANTLR%With%ObjectiveC%Target \ @@ -293,6 +283,15 @@ POST_pinnwand() { } REGEX_LOC_pinnwand="\(/show/[^ ]*\).*$|https://bpaste.net\1" REGEX_RAW_pinnwand='s|^\(https\?://[^/]*/\)show\(/[^ ]*/\?\)$|\1raw\2|' +# snippets +REGEX_URL_snippets='s|.*"web_url":"\([^"]*\)".*|\1|p' +REGEX_RAW_snippets='s|^\(.*/snippets\)\(/.*\)$|\1\2/raw|' +escape_description_snippets() { sed -e 's|"|\\"|g' -e 's|\x1b|\\u001b|g' -e 's|\r||g' <<< "$*"; } +escape_input_snippets() { 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_snippets() { + local description="${2}" content="${6}" + echo "{\"title\": \"${description}\", \"content\": \"${content}\", \"description\": \"${description}\", \"file_name\": \"${description}\", \"visibility\": \"${VISIBILITY_snippets}\" }" +} ### errors die() { |