forked from calculate/calculate-overlay
Compare commits
12 Commits
b95e947b2f
...
26c676be52
Author | SHA1 | Date |
---|---|---|
Alexander Tratsevskiy | 26c676be52 | 6 months ago |
Alexander Tratsevskiy | e801fe831c | 6 months ago |
Alexander Tratsevskiy | e16395b081 | 6 months ago |
Alexander Tratsevskiy | 4a9e9f5ad5 | 6 months ago |
Alexander Tratsevskiy | 14ecc2a108 | 6 months ago |
Alexander Tratsevskiy | 4dada52314 | 6 months ago |
ktrace | 36f3ef194e | 6 months ago |
ktrace | 7b6f0e8e35 | 6 months ago |
Alexander Kurakin | e461808a66 | 6 months ago |
Victor Kustov | b97f58cded | 6 months ago |
ktrace | e045f99483 | 6 months ago |
Victor Kustov | 2ee14ae366 | 6 months ago |
@ -1 +1 @@
|
||||
DIST wgetpaste-2.25.tar.bz2 11107 BLAKE2B 1ed46ada9045326583900a78bbbd66ea7776ae7ae7191b14f258ef417ef65c344d6ff7e6c5ac0592d93c2936bc189ea0a33c18a8f2e6a0eb9e4e1d9d3b67701b SHA512 c3cd56f32311c77ce5ac970f0cd6b2e8285cac3caaf61669237ac707ed3b9aab285fbe9dee6260ea13b8df41a22acfaa3b8439298560ab68c3a568d60557d82e
|
||||
DIST wgetpaste-2.33.tar.xz 16408 BLAKE2B 78baebf4edb6e6340a73127099366d306359d02c0c1eab137822c56669da0609a5479940b4fb2accbc79978df091dcd34415876618e64aa556d1584f74773736 SHA512 9bf1f379316da372b4f69296b54f9a266dcf9fdaa2a8718165a2029571f4c2c0166304ffebeb2ec4657ea6f49087793f40d9da383f5da052bce0543c90ea13ab
|
||||
|
@ -1,188 +0,0 @@
|
||||
diff -ruN wgetpaste-2.22.orig/wgetpaste wgetpaste-2.22/wgetpaste
|
||||
--- wgetpaste-2.25.orig/wgetpaste 2014-01-21 11:31:59.475610453 +0400
|
||||
+++ wgetpaste-2.25/wgetpaste 2014-01-21 11:41:13.858639053 +0400
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
VERSION="2.25"
|
||||
|
||||
+DEFAULT_SERVICE="calculate"
|
||||
+
|
||||
# don't inherit LANGUAGE from the env
|
||||
unset LANGUAGE
|
||||
|
||||
@@ -14,7 +16,7 @@ E=$'\e'
|
||||
N=$'\n'
|
||||
|
||||
### services
|
||||
-SERVICES="bpaste ca codepad dpaste gists poundpython"
|
||||
+SERVICES="bpaste ca codepad dpaste gists poundpython calculate"
|
||||
# bpaste
|
||||
ENGINE_bpaste=lodgeit
|
||||
URL_bpaste="http://bpaste.net/"
|
||||
@@ -42,6 +44,17 @@ URL_poundpython="http://paste.pound-python.org/"
|
||||
ENGINE_tinyurl=tinyurl
|
||||
URL_tinyurl="http://tinyurl.com/ api-create.php"
|
||||
REGEX_RAW_tinyurl='s|^\(http://[^/]*/\)\([[:alnum:]]*\)$|\1\2|'
|
||||
+# calculate
|
||||
+ENGINE_calculate=calculate
|
||||
+if [[ "$LANG" =~ 'ru_RU' ]]; then
|
||||
+ URL_calculate="http://pastebin.calculate-linux.ru"
|
||||
+else
|
||||
+ URL_calculate="http://pastebin.calculate-linux.org"
|
||||
+fi
|
||||
+DEFAULT_LANGUAGE_calculate="Text"
|
||||
+DEFAULT_PARENT_calculate=""
|
||||
+DEFAULT_PRIVATE_calculate=0
|
||||
+SIZE_calculate="25000 25%kB"
|
||||
|
||||
### engines
|
||||
# ca
|
||||
@@ -52,12 +65,12 @@ LANGUAGE_COUNT_ca=0
|
||||
EXPIRATIONS_ca="Never 5%minutes 10%minutes 15%minutes 30%minutes 45%minutes 1%hour 2%hours \
|
||||
4%hours 8%hours 12%hours 1%day 2%days 3%days 1%week 2%weeks 3%weeks 1%month 2%months \
|
||||
3%months 4%months 5%months 6%months 1%year"
|
||||
-POST_ca="s=Submit+Post name description type expiry % content"
|
||||
+POST_ca="s=Submit+Post name description type expiry % % % content"
|
||||
REGEX_URL_ca='s|^.*content="[0-9]*;\(http://[^/]*/[0-9]*\)".*$|\1|p'
|
||||
REGEX_RAW_ca='s|^\(http://[^/]*/\)\([0-9]*\)$|\1raw/\2|'
|
||||
# codepad
|
||||
LANGUAGES_codepad="C C++ D Haskell Lua OCaml PHP Perl Plain%Text Python Ruby Scheme Tcl"
|
||||
-POST_codepad="submit % % lang % % code"
|
||||
+POST_codepad="submit % % lang % % % % code"
|
||||
REGEX_URL_codepad='s|^--.*\(http://codepad.org/[^ ]\+\)|\1|p'
|
||||
REGEX_RAW_codepad='s|^\(http://[^/]*/\)\([[:alnum:]]*\)$|\1\2/raw.rb|'
|
||||
# dpaste
|
||||
@@ -67,7 +80,7 @@ LANGUAGE_VALUES_dpaste="% Apache Bash Css Diff DjangoTemplate Haskell JScript Py
|
||||
Ruby Rhtml Sql Xml"
|
||||
EXPIRATIONS_dpaste="30%days 30%days%after%last%view"
|
||||
EXPIRATION_VALUES_dpaste="off on"
|
||||
-POST_dpaste="submit=Paste+it poster title language hold % content"
|
||||
+POST_dpaste="submit=Paste+it poster title language hold % % % content"
|
||||
REGEX_RAW_dpaste='s|^\(http://[^/]*/\)[^0-9]*\([0-9]*/\)$|\1\2plain/|'
|
||||
# gists
|
||||
LANGUAGES_gists="ActionScript Ada Apex AppleScript Arc Arduino ASP Assembly
|
||||
@@ -141,8 +154,23 @@ objective-c objective-j ocaml ooc perl php text pov prolog python python3 py3tb
|
||||
ragel-c ragel-cpp ragel-d ragel-java ragel-objc ragel-ruby raw rconsole rebol redcode rst rhtml rb \
|
||||
rbcon splus sass scala scheme smalltalk smarty sql sqlite3 squidconf tcl tcsh tex diff vala vb.net \
|
||||
vim xml xml+cheetah xml+django xml+evoque xml+mako xml+myghty xml+php xml+erb xml+smarty xslt yaml"
|
||||
-POST_lodgeit="submit=Paste! % % language % % code"
|
||||
+POST_lodgeit="submit=Paste! % % language % % % % code"
|
||||
REGEX_RAW_lodgeit='s|^\(http://[^/]*/\)show\(/[[:alnum:]]*/\)$|\1raw\2|'
|
||||
+# calculate
|
||||
+LANGUAGES_calculate="Apache Bash Batch Boo C C# C++ Clojure Creole_Wiki CSS \
|
||||
+CSV D Debian_control-files Django_Jinja_Templates Dylan Erlang eRuby_rhtml GAS GCC_Messages \
|
||||
+Genshi_Templates Gettext_catalogs GL_Shader_language Haskell HTML INI_File Interactive_Ruby IO \
|
||||
+IRC_Logs Java javac_Messages JavaScript JSP Lighttpd Literate_Haskell LLVM Lua Mako_Templates Matlab \
|
||||
+Matlab_Session MiniD Multi-File Myghty_Templates MySQL Nasm Nginx Object-Pascal OCaml Perl PHP \
|
||||
+PHP_(inline) Povray Python Python_Console_Sessions Python_Tracebacks reStructuredText Ruby Scala \
|
||||
+Scheme Smalltalk Smarty sources.list SQL SquidConf TeX_LaTeX Text Unified_Diff Vim XML XSLT YAML"
|
||||
+LANGUAGE_VALUES_calculate="apache bash bat boo c csharp cpp clojure creole css csv d control html+django \
|
||||
+dylan erlang rhtml gas gcc-messages html+genshi gettext glsl haskell html ini irb io irc java \
|
||||
+javac-messages js jsp lighttpd literate-haskell llvm lua html+mako matlab matlabsession minid multi \
|
||||
+html+myghty mysql nasm nginx objectpascal ocaml perl html+php php povray python pycon pytb rst ruby \
|
||||
+scala scheme smalltalk smarty sourceslist sql squidconf tex text diff vim xml xslt yaml"
|
||||
+POST_calculate="submit=paste! % % language % parent private % text"
|
||||
+REGEX_RAW_calculate='s|^\(http://[^/]*/\)show\(/[0-9]*/\)$|\1raw\2|'
|
||||
|
||||
### errors
|
||||
die() {
|
||||
@@ -340,6 +368,9 @@ Options:
|
||||
-s, --service SERVICE set service to use (defaults to "$DEFAULT_SERVICE")
|
||||
-e, --expiration EXPIRATION set when it should expire (defaults to "$DEFAULT_EXPIRATION")
|
||||
|
||||
+ -p, --parent PARENT set parent paste (defaults to "$DEFAULT_PARENT", make use id paste) (Calculate pastebin option)
|
||||
+ -P, --private PRIVATE set private status (defaults to "$DEFAULT_PRIVATE") (Calculate pastebin option)
|
||||
+
|
||||
-S, --list-services list supported pastebin services
|
||||
-L, --list-languages list languages supported by the specified service
|
||||
-E, --list-expiration list expiration setting supported by the specified service
|
||||
@@ -431,6 +462,18 @@ showlanguages() {
|
||||
done | sort
|
||||
}
|
||||
|
||||
+showprivate() {
|
||||
+ local p priv d
|
||||
+ priv=PRIVATE_$ENGINE
|
||||
+ [[ -n $COMPLETIONS ]] && printlist ${!priv} | sort && exit 0
|
||||
+ echo "Private supported by $(getrecipient) (case sensitive):"
|
||||
+ [[ -z ${!priv} ]] && echo "$N\"$ENGINE\" has no support for setting language." >&2 && exit 1
|
||||
+ for p in ${!priv}; do
|
||||
+ [[ ${p//\%/ } = $DEFAULT_PRIVATE ]] && d="*" || d=" "
|
||||
+ echo " $d${p//\%/ }"
|
||||
+ done | sort
|
||||
+}
|
||||
+
|
||||
showexpirations() {
|
||||
local e expiration info d
|
||||
expiration=EXPIRATIONS_$ENGINE
|
||||
@@ -484,7 +527,7 @@ postdata() {
|
||||
post=POST_$ENGINE
|
||||
if [[ -n ${!post} ]]; then
|
||||
nr=${!post//[^ ]}
|
||||
- [[ 6 = ${#nr} ]] || die "\"${SERVICE}\" is not supported by ${FUNCNAME}()."
|
||||
+ [[ 8 = ${#nr} ]] || die "\"${SERVICE}\" is not supported by ${FUNCNAME}()."
|
||||
extra=${!post%% *}
|
||||
[[ '%' = $extra ]] || echo -n "$extra&"
|
||||
e() {
|
||||
@@ -497,7 +540,7 @@ postdata() {
|
||||
post=${post#$f }
|
||||
done
|
||||
}
|
||||
- e "${!post#$extra }" NICK DESCRIPTION LANGUAGE EXPIRATION CVT_TABS INPUT
|
||||
+ e "${!post#$extra }" NICK DESCRIPTION LANGUAGE EXPIRATION PARENT PRIVATE CVT_TABS INPUT
|
||||
elif [[ function == $(type -t json_$ENGINE) ]]; then
|
||||
json_$ENGINE "$DESCRIPTION" "$LANGUAGE" "$INPUT"
|
||||
else
|
||||
@@ -600,6 +643,16 @@ while [[ -n $1 ]]; do
|
||||
-L | --list-languages )
|
||||
LISTLANGUAGES=0
|
||||
;;
|
||||
+ -p | --parent )
|
||||
+ requiredarg "$@"
|
||||
+ PARENTSET=0
|
||||
+ PARENT="$2"
|
||||
+ ;;
|
||||
+ -P | --private )
|
||||
+ requiredarg "$@"
|
||||
+ PRIVATESET=0
|
||||
+ PRIVATE="$2"
|
||||
+ ;;
|
||||
-n | --nick )
|
||||
requiredarg "$@"
|
||||
NICK=$(escape "$2")
|
||||
@@ -677,12 +730,16 @@ load_configs
|
||||
DEFAULT_NICK=${DEFAULT_NICK:-$(whoami)} || die "whoami failed"
|
||||
DEFAULT_SERVICE=${DEFAULT_SERVICE:-bpaste}
|
||||
DEFAULT_LANGUAGE=${DEFAULT_LANGUAGE:-Plain Text}
|
||||
+DEFAULT_PARENT=${DEFAULT_PARENT:-''}
|
||||
+DEFAULT_PRIVATE=${DEFAULT_PRIVATE:-0}
|
||||
DEFAULT_EXPIRATION=${DEFAULT_EXPIRATION:-1 month}
|
||||
SERVICE=${SERVICE:-${DEFAULT_SERVICE}}
|
||||
ENGINE=ENGINE_$SERVICE
|
||||
ENGINE="${!ENGINE}"
|
||||
default="DEFAULT_NICK_$SERVICE" && [[ -n ${!default} ]] && DEFAULT_NICK=${!default}
|
||||
default="DEFAULT_LANGUAGE_$SERVICE" && [[ -n ${!default} ]] && DEFAULT_LANGUAGE=${!default}
|
||||
+default="DEFAULT_PARENT_$SERVICE" && [[ -n ${!default} ]] && DEFAULT_PARENT=${!default}
|
||||
+default="DEFAULT_PRIVATE_$SERVICE" && [[ -n ${!default} ]] && DEFAULT_PRIVATE=${!default}
|
||||
default="DEFAULT_EXPIRATION_$SERVICE" && [[ -n ${!default} ]] && DEFAULT_EXPIRATION=${!default}
|
||||
NICK=${NICK:-$(escape "${DEFAULT_NICK}")}
|
||||
[[ -z $SOURCE ]] && SOURCE="stdin"
|
||||
@@ -704,6 +761,10 @@ INFO_ARGS=${INFO_ARGS:-"--ignore-default-opts"}
|
||||
LANGUAGE=${LANGUAGE:-${DEFAULT_LANGUAGE}}
|
||||
verifylanguage
|
||||
LANGUAGE=$(escape "$LANGUAGE")
|
||||
+PARENT=${PARENT:-${DEFAULT_PARENT}}
|
||||
+PARENT=$(escape "$PARENT")
|
||||
+PRIVATE=${PRIVATE:-${DEFAULT_PRIVATE}}
|
||||
+PRIVATE=$(escape "$PRIVATE")
|
||||
EXPIRATION=${EXPIRATION:-${DEFAULT_EXPIRATION}}
|
||||
verifyexpiration
|
||||
EXPIRATION=$(escape "$EXPIRATION")
|
||||
@@ -853,6 +914,7 @@ else
|
||||
[[ -f $TMPF ]] || TMPF=$(mktemp /tmp/wgetpaste.XXXXXX)
|
||||
if [[ -f $TMPF ]]; then
|
||||
postdata > "$TMPF" || die "Failed to write to temporary file: \"$TMPF\"."
|
||||
+ [[ $LANG =~ ru_RU ]] && enconv $TMPF
|
||||
WGETARGS="--post-file=$TMPF"
|
||||
else
|
||||
# fall back to using --post-data if the temporary file could not be created
|
@ -0,0 +1,72 @@
|
||||
--- a/wgetpaste 2023-11-05 01:00:11.421397200 +0300
|
||||
+++ b/wgetpaste 2023-11-05 01:08:36.145761741 +0300
|
||||
@@ -41,7 +41,18 @@
|
||||
}
|
||||
|
||||
### services
|
||||
-SERVICES="0x0 bpaste codepad dpaste gists ix_io pgz snippets"
|
||||
+SERVICES="0x0 bpaste codepad dpaste gists ix_io pgz snippets calculate"
|
||||
+# calculate
|
||||
+ENGINE_calculate=calculate
|
||||
+if [[ "$LANG" =~ 'ru_RU' ]]; then
|
||||
+ URL_calculate="http://pastebin.calculate-linux.ru"
|
||||
+else
|
||||
+ URL_calculate="http://pastebin.calculate-linux.org"
|
||||
+fi
|
||||
+DEFAULT_LANGUAGE_calculate="Text"
|
||||
+DEFAULT_PARENT_calculate=""
|
||||
+DEFAULT_PRIVATE_calculate=0
|
||||
+SIZE_calculate="25000 25%kB"
|
||||
# 0x0
|
||||
ENGINE_0x0=0x0
|
||||
URL_0x0="http://0x0.st"
|
||||
@@ -89,6 +100,22 @@
|
||||
# 0x0
|
||||
escape_description_0x0() { echo "$*"; }
|
||||
escape_input_0x0() { echo "$*"; }
|
||||
+LANGUAGES_calculate="Apache Bash Batch Boo C C# C++ Clojure Creole_Wiki CSS \
|
||||
+CSV D Debian_control-files Django_Jinja_Templates Dylan Erlang eRuby_rhtml GAS GCC_Messages \
|
||||
+Genshi_Templates Gettext_catalogs GL_Shader_language Haskell HTML INI_File Interactive_Ruby IO \
|
||||
+IRC_Logs Java javac_Messages JavaScript JSP Lighttpd Literate_Haskell LLVM Lua Mako_Templates Matlab \
|
||||
+Matlab_Session MiniD Multi-File Myghty_Templates MySQL Nasm Nginx Object-Pascal OCaml Perl PHP \
|
||||
+PHP_(inline) Povray Python Python_Console_Sessions Python_Tracebacks reStructuredText Ruby Scala \
|
||||
+Scheme Smalltalk Smarty sources.list SQL SquidConf TeX_LaTeX Text Unified_Diff Vim XML XSLT YAML"
|
||||
+LANGUAGE_VALUES_calculate="apache bash bat boo c csharp cpp clojure creole css csv d control html+django \
|
||||
+dylan erlang rhtml gas gcc-messages html+genshi gettext glsl haskell html ini irb io irc java \
|
||||
+javac-messages js jsp lighttpd literate-haskell llvm lua html+mako matlab matlabsession minid multi \
|
||||
+html+myghty mysql nasm nginx objectpascal ocaml perl html+php php povray python pycon pytb rst ruby \
|
||||
+scala scheme smalltalk smarty sourceslist sql squidconf tex text diff vim xml xslt yaml"
|
||||
+REGEX_RAW_calculate='s|^\(http://[^/]*/\)show\(/[0-9]*/\)$|\1raw\2|'
|
||||
+POST_calculate() {
|
||||
+ POST_generic "submit=paste! parent private language % % text" "$PARENT" "$PRIVATE" "$3" "$4" "$5" "$6"
|
||||
+}
|
||||
POST_0x0() {
|
||||
local filename="${2}"
|
||||
local content="${6}" boundary="WGETPASTE-yuLr+iHOSQ+trEgDcj9UVq5R302bid"
|
||||
@@ -562,6 +589,8 @@
|
||||
-v, --verbose show wget stderr output if no url is received
|
||||
--completions emit output suitable for shell completions (only affects --list-*)
|
||||
--debug be *very* verbose (implies -v)
|
||||
+ -p, --parent PARENT [service calculate only!] set parent paste as -p <id> paste
|
||||
+ -P, --private PRIVATE [service calculate only!] set private status as -P <seed>
|
||||
|
||||
-h, --help show this help
|
||||
-g, --ignore-configs ignore ""/etc/wgetpaste.conf, ~/.wgetpaste.conf etc.
|
||||
@@ -843,6 +872,17 @@
|
||||
-C | --xclippaste )
|
||||
XCLIPPASTE=0
|
||||
;;
|
||||
+ -p | --parent )
|
||||
+ requiredarg "$@"
|
||||
+ PARENTSET=0
|
||||
+ PARENT="$2"
|
||||
+ ;;
|
||||
+ -P | --private )
|
||||
+ requiredarg "$@"
|
||||
+ PRIVATESET=0
|
||||
+ PRIVATE="$2"
|
||||
+ ;;
|
||||
+
|
||||
-* )
|
||||
die "$0: unrecognized option \`$1'"
|
||||
;;
|
@ -0,0 +1,69 @@
|
||||
From cc41231b0ea2ec5cc0a8353fd4a9b6b71301f819 Mon Sep 17 00:00:00 2001
|
||||
From: Christopher Fore <csfore@posteo.net>
|
||||
Date: Sat, 14 Oct 2023 21:48:39 -0400
|
||||
Subject: [PATCH] Add new service - paste.gentoo.zip
|
||||
|
||||
Specified in the code with `pgz` and in the cli for usage and brevity.
|
||||
---
|
||||
See also: https://github.com/zlin/wgetpaste/pull/48
|
||||
- Oskari
|
||||
|
||||
wgetpaste | 21 +++++++++++++++++++--
|
||||
1 file changed, 19 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/wgetpaste b/wgetpaste
|
||||
index b3a537b..fc0b559 100755
|
||||
--- a/wgetpaste
|
||||
+++ b/wgetpaste
|
||||
@@ -41,7 +41,7 @@ POST_generic() {
|
||||
}
|
||||
|
||||
### services
|
||||
-SERVICES="0x0 bpaste codepad dpaste gists ix_io snippets"
|
||||
+SERVICES="0x0 bpaste codepad dpaste gists ix_io pgz snippets"
|
||||
# 0x0
|
||||
ENGINE_0x0=0x0
|
||||
URL_0x0="http://0x0.st"
|
||||
@@ -68,6 +68,10 @@ URL_gists="https://api.github.com/gists"
|
||||
ENGINE_ix_io=ix_io
|
||||
URL_ix_io="http://ix.io"
|
||||
SIZE_ix_io="1000000 1%MB"
|
||||
+# paste.gentoo.zip
|
||||
+ENGINE_pgz=pgz
|
||||
+URL_pgz="https://paste.gentoo.zip"
|
||||
+SIZE_pgz="2000000 2%MB"
|
||||
# snippets
|
||||
ENGINE_snippets=snippets
|
||||
URL_snippets="https://gitlab.com/api/v4/snippets"
|
||||
@@ -139,7 +143,6 @@ POST_dpaste() {
|
||||
}
|
||||
REGEX_RAW_dpaste='s|^http.*|\0.txt|'
|
||||
REGEX_URL_dpaste='s|^http.*|\0|p'
|
||||
-
|
||||
# gists
|
||||
LANGUAGES_gists="ActionScript Ada Apex AppleScript Arc Arduino ASP Assembly
|
||||
Augeas AutoHotkey Batchfile Befunge BlitzMax Boo Brainfuck Bro C C# C++
|
||||
@@ -230,6 +233,20 @@ POST_lodgeit() {
|
||||
POST_generic "submit=Paste! % % language % % code" "$1" "$2" "$3" "$4" "$5" "$6"
|
||||
}
|
||||
REGEX_RAW_lodgeit='s|^\(https\?://[^/]*/\)show\(/[[:alnum:]]*/\)$|\1raw\2|'
|
||||
+# paste.gentoo.zip
|
||||
+escape_input_pgz() { echo "$*"; }
|
||||
+POST_pgz() {
|
||||
+ local content="${6}"
|
||||
+ local boundary="WGETPASTE-3d8dfd9bff2b12a7410328d2ec1ed145"
|
||||
+ echo "--${boundary}"
|
||||
+ echo "Content-Disposition: form-data; name=\"file\""
|
||||
+ echo ""
|
||||
+ echo "${content}"
|
||||
+ echo "--${boundary}--"
|
||||
+ ADDITIONAL_HEADERS_pgz=("Content-Type: multipart/form-data; boundary=${boundary}")
|
||||
+}
|
||||
+REGEX_RAW_pgz='s|^http.*|\0|'
|
||||
+REGEX_URL_pgz='s|^http.*|\0|p'
|
||||
# pinnwand
|
||||
LANGUAGES_pinnwand="ABAP ActionScript%3 ActionScript Ada ANTLR ANTLR%With%ActionScript%Target \
|
||||
ANTLR%With%CPP%Target ANTLR%With%C#%Target ANTLR%With%Java%Target ANTLR%With%ObjectiveC%Target \
|
||||
--
|
||||
2.41.0
|
||||
|
@ -0,0 +1,38 @@
|
||||
--- a/wgetpaste 2023-11-05 01:14:42.819088466 +0300
|
||||
+++ b/wgetpaste 2023-11-06 14:31:32.400944620 +0300
|
||||
@@ -41,7 +41,14 @@
|
||||
}
|
||||
|
||||
### services
|
||||
-SERVICES="0x0 bpaste codepad dpaste gists ix_io pgz snippets calculate"
|
||||
+SERVICES="0x0 bpaste codepad dpaste gists ix_io pgz snippets calculate orgru"
|
||||
+# orgru
|
||||
+ENGINE_orgru=orgru
|
||||
+URL_orgru="http://paste.org.ru/"
|
||||
+SIZE_orgru="100000 100%kB"
|
||||
+REGEX_URL_orgru="s|<a href=\"\(/\?.*\)\">refresh</a>|http://paste.org.ru\1|p"
|
||||
+REGEX_RAW_orgru="s|<a href=\"\(/\?.*\)\">refresh</a>|http://paste.org.ru\1|"
|
||||
+DEFAULT_LANGUAGE_orgru="AutoDetect"
|
||||
# calculate
|
||||
ENGINE_calculate=calculate
|
||||
if [[ "$LANG" =~ 'ru_RU' ]]; then
|
||||
@@ -97,6 +104,19 @@
|
||||
REGEX_RAW_tinyurl='s|^\(http://[^/]*/\)\([[:alnum:]]*\)$|\1\2|'
|
||||
|
||||
### engines
|
||||
+# orgru
|
||||
+LANGUAGES_orgru="AutoDetect C C++ ASM Perl Java IDL Pascal C# JS.NET VB.NET Forth Fortran Visual%Basic html css css%for%html \
|
||||
+css%for%svg jsp php xhtml%transitional xhtml%strict xhtml%frameset SVG%1.0 ColdFusion JavaScript ActionScript VBScript xml \
|
||||
+dtd xslt%1.0 XML%Schema Relax%NG Clarion Clipper FoxPro SQLJ%(Java%sql) Paradox SQL,%PL/SQL MySQL Batch/Config.sys/NTcmd \
|
||||
+sh/ksh/bash%script Apache%httpd.conf Config,%INI%and%CTL Java%properties Lex YACC makefile TeX VRML 1C Ada ABAP/4 AutoIt%2.x \
|
||||
+AWK Dssp ADSP-21xx%Asm Cobol Cache/Open-M Eiffel Erlang Icon Lisp MatLab Modula2%and%Oberon2 PicAsm Python Rexx Ruby Standard%ML \
|
||||
+OCaml Tcl/Tk Verilog%HDL VHDL Diff/Patch xslfo%1.0 DocBook%4.2 MathML2 wml rss mason PostScript RTF%text M4 VIM"
|
||||
+LANGUAGE_VALUES_orgru="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 27 28 29 30 31 32 33 34 35 36 38 39 40 41 42 \
|
||||
+43 44 45 46 47 48 53 54 55 56 59 61 66 67 68 69 70 71 72 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 91 92 98 111 112 113 114 \
|
||||
+120 133 135 137 156 158"
|
||||
+POST_orgru(){
|
||||
+ POST_generic "submit % % type % % code" "$1" "$2" "$3" "$4" "$5" "$6"
|
||||
+}
|
||||
# 0x0
|
||||
escape_description_0x0() { echo "$*"; }
|
||||
escape_input_0x0() { echo "$*"; }
|
@ -0,0 +1,31 @@
|
||||
https://github.com/zlin/wgetpaste/pull/45
|
||||
|
||||
From ab4632ca9cd54c9e7478f37eee821113c0135c37 Mon Sep 17 00:00:00 2001
|
||||
From: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
|
||||
Date: Fri, 28 Jul 2023 18:55:10 -0500
|
||||
Subject: [PATCH] Disable sprunge
|
||||
|
||||
Sprunge seems to have recently died. Disable it by removing it from the
|
||||
service list, but keep the core bits in case it decides to come back.
|
||||
|
||||
RIP ;(
|
||||
---
|
||||
wgetpaste | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/wgetpaste b/wgetpaste
|
||||
index 864d5ef..b3a537b 100755
|
||||
--- a/wgetpaste
|
||||
+++ b/wgetpaste
|
||||
@@ -41,7 +41,7 @@ POST_generic() {
|
||||
}
|
||||
|
||||
### services
|
||||
-SERVICES="0x0 bpaste codepad dpaste gists ix_io snippets sprunge"
|
||||
+SERVICES="0x0 bpaste codepad dpaste gists ix_io snippets"
|
||||
# 0x0
|
||||
ENGINE_0x0=0x0
|
||||
URL_0x0="http://0x0.st"
|
||||
--
|
||||
2.41.0
|
||||
|
@ -0,0 +1,83 @@
|
||||
https://github.com/zlin/wgetpaste/pull/38
|
||||
|
||||
From 3470bbe651c2264a7f985f3b86f67a6ff6d0c587 Mon Sep 17 00:00:00 2001
|
||||
From: Sam James <sam@gentoo.org>
|
||||
Date: Tue, 22 Nov 2022 01:29:16 +0000
|
||||
Subject: [PATCH 1/3] test: respect TMPDIR in mktemp (pass --tmpdir)
|
||||
|
||||
Signed-off-by: Sam James <sam@gentoo.org>
|
||||
--- a/test/test.sh
|
||||
+++ b/test/test.sh
|
||||
@@ -7,7 +7,7 @@
|
||||
# Don't assume the test is being run from the same directory as the script
|
||||
TEST_DIR="$(dirname "$0")"
|
||||
TEST_FILE="$TEST_DIR/test.txt"
|
||||
-DL_DIR="$(mktemp -q -d /tmp/wgetpaste_test.XXXXX)"
|
||||
+DL_DIR="$(mktemp -q --tmpdir -d wgetpaste_test.XXXXX)"
|
||||
# Services to hard skip
|
||||
# Pre-declare as map to maintain type even if empty
|
||||
# key -> value := service -> reason
|
||||
--- a/test/test_ansi.sh
|
||||
+++ b/test/test_ansi.sh
|
||||
@@ -9,7 +9,7 @@
|
||||
TEST_DIR="$(dirname "$0")"
|
||||
ANSI_FILE="$TEST_DIR/red.txt"
|
||||
NOANSI_FILE="$TEST_DIR/red_no_ansi.txt"
|
||||
-DL_DIR="$(mktemp -q -d /tmp/wgetpaste_test_ansi.XXXXX)"
|
||||
+DL_DIR="$(mktemp -q --tmpdir -d wgetpaste_test_ansi.XXXXX)"
|
||||
# Services to hard skip
|
||||
# Pre-declare as map to maintain type even if empty
|
||||
# key -> value := service -> reason
|
||||
|
||||
From 0c3cc1a5286c95a5bcd6408035f6c230350c1565 Mon Sep 17 00:00:00 2001
|
||||
From: Sam James <sam@gentoo.org>
|
||||
Date: Tue, 22 Nov 2022 01:29:40 +0000
|
||||
Subject: [PATCH 2/3] test: use portable bash shebang
|
||||
|
||||
Signed-off-by: Sam James <sam@gentoo.org>
|
||||
--- a/test/test.sh
|
||||
+++ b/test/test.sh
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/bash
|
||||
+#!/usr/bin/env bash
|
||||
|
||||
# wgetpaste test script
|
||||
# Exit code: number of mismatched downloads or 1 for general failure
|
||||
--- a/test/test_ansi.sh
|
||||
+++ b/test/test_ansi.sh
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/bash
|
||||
+#!/usr/bin/env bash
|
||||
|
||||
# wgetpaste test script (stripping ANSI codes)
|
||||
# Based on test/test.sh
|
||||
|
||||
From 8d1cf7a8d0ce9ff21a8e1dc66169b04e4f8fc852 Mon Sep 17 00:00:00 2001
|
||||
From: Sam James <sam@gentoo.org>
|
||||
Date: Tue, 22 Nov 2022 01:29:55 +0000
|
||||
Subject: [PATCH 3/3] test: normalise copyright header
|
||||
|
||||
Signed-off-by: Sam James <sam@gentoo.org>
|
||||
--- a/test/test.sh
|
||||
+++ b/test/test.sh
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# wgetpaste test script
|
||||
# Exit code: number of mismatched downloads or 1 for general failure
|
||||
-# Copyright (C) 2021 xxc3nsoredxx
|
||||
+# Copyright (C) 2022 Oskari Pirhonen <xxc3ncoredxx@gmail.com>
|
||||
|
||||
# Don't assume the test is being run from the same directory as the script
|
||||
TEST_DIR="$(dirname "$0")"
|
||||
--- a/test/test_ansi.sh
|
||||
+++ b/test/test_ansi.sh
|
||||
@@ -3,7 +3,7 @@
|
||||
# wgetpaste test script (stripping ANSI codes)
|
||||
# Based on test/test.sh
|
||||
# Exit code: number of mismatched downloads or 1 for general failure
|
||||
-# Copyright (C) 2022 Oskari Pirhonen <xxc3ncoredxx@gmail.com>
|
||||
+# Copyright (C) 2022 Oskari Pirhonen <xxc3ncoredxx@gmail.com>
|
||||
|
||||
# Don't assume the test is being run from the same directory as the script
|
||||
TEST_DIR="$(dirname "$0")"
|
||||
|
@ -1 +0,0 @@
|
||||
DEFAULT_SERVICE="bpaste"
|
@ -1,6 +1 @@
|
||||
#!/bin/bash
|
||||
|
||||
SERVICES="${SERVICES} lugons"
|
||||
|
||||
ENGINE_lugons=lodgeit
|
||||
URL_lugons="https://paste.lugons.org/"
|
||||
DEFAULT_SERVICE=calculate
|
||||
|
@ -1,31 +0,0 @@
|
||||
# Copyright 1999-2022 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-text/wgetpaste/wgetpaste-2.25-r3.ebuild,v 1.9 2014/11/02 09:09:38 ago Exp $
|
||||
|
||||
EAPI="8"
|
||||
|
||||
DESCRIPTION="Command-line interface to various pastebins"
|
||||
HOMEPAGE="http://wgetpaste.zlin.dk/"
|
||||
SRC_URI="http://wgetpaste.zlin.dk/${P}.tar.bz2"
|
||||
|
||||
LICENSE="public-domain"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 ~arm hppa ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x86-solaris"
|
||||
|
||||
RDEPEND="net-misc/wget
|
||||
app-i18n/enca
|
||||
"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/calculate_wgetpaste-25.patch )
|
||||
|
||||
src_prepare() {
|
||||
sed -i -e "s:/etc:\"${EPREFIX}\"/etc:g" wgetpaste || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin ${PN}
|
||||
insinto /etc/wgetpaste.d
|
||||
newins "${FILESDIR}"/wgetpaste-config-services services.conf
|
||||
insinto /usr/share/zsh/site-functions
|
||||
doins _wgetpaste
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit optfeature
|
||||
|
||||
DESCRIPTION="Command-line interface to various pastebins"
|
||||
HOMEPAGE="https://github.com/zlin/wgetpaste"
|
||||
SRC_URI="https://github.com/zlin/wgetpaste/releases/download/${PV}/${P}.tar.xz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
|
||||
IUSE="+ssl"
|
||||
|
||||
PROPERTIES="test_network"
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="net-misc/wget[ssl?]"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.33-tests.patch
|
||||
"${FILESDIR}"/${PN}-2.33-disable-sprunge.patch
|
||||
"${FILESDIR}"/${PN}-2.33-add-paste-gentoo-zip.patch
|
||||
"${FILESDIR}"/${PN}-2.33-add-paste-calculate.patch
|
||||
"${FILESDIR}"/${PN}-2.33-add-paste-orgru.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -i -e "s:/etc:\"${EPREFIX}\"/etc:g" wgetpaste || die
|
||||
}
|
||||
|
||||
src_test() {
|
||||
test/test.sh || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin ${PN}
|
||||
insinto /usr/share/zsh/site-functions
|
||||
doins _wgetpaste
|
||||
insinto /etc/wgetpaste.d
|
||||
newins "${FILESDIR}"/wgetpaste-config-services services.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
optfeature "ANSI (color code) stripping support" app-text/ansifilter
|
||||
optfeature "xclip support" x11-misc/xclip
|
||||
}
|
@ -0,0 +1,158 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
MULTILIB_COMPAT=( abi_x86_64 )
|
||||
|
||||
inherit desktop multilib-build pax-utils unpacker xdg
|
||||
|
||||
DESCRIPTION="Free and secure calls and messages to anyone, anywhere"
|
||||
HOMEPAGE="https://www.viber.com/"
|
||||
SRC_URI="
|
||||
amd64? (
|
||||
https://download.cdn.viber.com/cdn/desktop/Linux/${PN}.deb -> ${P}.deb
|
||||
)
|
||||
"
|
||||
|
||||
QA_PRESTRIPPED="
|
||||
opt/viber/Viber
|
||||
opt/viber/libexec/QtWebEngineProcess
|
||||
opt/viber/lib/libicudata.so.66
|
||||
opt/viber/lib/libssl.so.1.1
|
||||
opt/viber/lib/libcrypto.so.1.1
|
||||
opt/viber/lib/libXcomposite.so.1
|
||||
opt/viber/lib/libwebp.so.6
|
||||
opt/viber/lib/libicui18n.so.66
|
||||
opt/viber/lib/libqrencode.so
|
||||
opt/viber/lib/libViberRTC.so
|
||||
opt/viber/lib/libminizip.so.1
|
||||
opt/viber/lib/libdouble-conversion.so.3
|
||||
opt/viber/lib/libicuuc.so.66
|
||||
opt/viber/lib/libpng16.so.16
|
||||
opt/viber/lib/libXdamage.so.1
|
||||
opt/viber/lib/libb2.so.1
|
||||
opt/viber/lib/libjpeg.so.8
|
||||
opt/viber/lib/libpcre2-16.so.0
|
||||
opt/viber/lib/libre2.so.5
|
||||
"
|
||||
|
||||
LICENSE="Viber"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* ~amd64"
|
||||
IUSE="+abi_x86_64 apulse +pulseaudio"
|
||||
REQUIRED_USE="
|
||||
^^ ( apulse pulseaudio )
|
||||
"
|
||||
RESTRICT="bindist mirror"
|
||||
|
||||
BDEPEND="
|
||||
sys-apps/fix-gnustack
|
||||
"
|
||||
RDEPEND="
|
||||
app-arch/brotli:=[${MULTILIB_USEDEP}]
|
||||
app-arch/snappy:=[${MULTILIB_USEDEP}]
|
||||
app-arch/zstd:=[${MULTILIB_USEDEP}]
|
||||
app-crypt/mit-krb5[${MULTILIB_USEDEP}]
|
||||
dev-libs/expat[${MULTILIB_USEDEP}]
|
||||
dev-libs/glib:2[${MULTILIB_USEDEP}]
|
||||
dev-libs/libevent:=[${MULTILIB_USEDEP}]
|
||||
dev-libs/libxml2[${MULTILIB_USEDEP}]
|
||||
dev-libs/libxslt[${MULTILIB_USEDEP}]
|
||||
dev-libs/nspr[${MULTILIB_USEDEP}]
|
||||
dev-libs/nss[${MULTILIB_USEDEP}]
|
||||
dev-libs/wayland[${MULTILIB_USEDEP}]
|
||||
media-libs/alsa-lib[${MULTILIB_USEDEP}]
|
||||
media-libs/fontconfig:1.0[${MULTILIB_USEDEP}]
|
||||
media-libs/freetype:2[${MULTILIB_USEDEP}]
|
||||
media-libs/gst-plugins-bad:1.0[${MULTILIB_USEDEP}]
|
||||
media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}]
|
||||
media-libs/gst-plugins-good:1.0[${MULTILIB_USEDEP}]
|
||||
media-plugins/gst-plugins-libav:1.0[${MULTILIB_USEDEP}]
|
||||
media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
|
||||
media-libs/harfbuzz:=[${MULTILIB_USEDEP}]
|
||||
media-libs/lcms:2[${MULTILIB_USEDEP}]
|
||||
media-libs/libglvnd[${MULTILIB_USEDEP}]
|
||||
media-libs/libmng:=[${MULTILIB_USEDEP}]
|
||||
media-libs/libwebp:=[${MULTILIB_USEDEP}]
|
||||
media-libs/opus[${MULTILIB_USEDEP}]
|
||||
media-libs/mesa[${MULTILIB_USEDEP}]
|
||||
media-libs/tiff-compat:4[${MULTILIB_USEDEP}]
|
||||
net-print/cups[${MULTILIB_USEDEP}]
|
||||
sys-apps/dbus[${MULTILIB_USEDEP}]
|
||||
|| (
|
||||
sys-apps/systemd[${MULTILIB_USEDEP}]
|
||||
sys-apps/systemd-utils[udev,${MULTILIB_USEDEP}]
|
||||
)
|
||||
sys-libs/mtdev
|
||||
sys-libs/zlib:0/1[${MULTILIB_USEDEP}]
|
||||
x11-libs/gdk-pixbuf:2[${MULTILIB_USEDEP}]
|
||||
x11-libs/gtk+:3[${MULTILIB_USEDEP}]
|
||||
x11-libs/libdrm[${MULTILIB_USEDEP}]
|
||||
x11-libs/libICE[${MULTILIB_USEDEP}]
|
||||
x11-libs/libSM[${MULTILIB_USEDEP}]
|
||||
x11-libs/libX11[${MULTILIB_USEDEP}]
|
||||
x11-libs/libxcb:0/1.12[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXext[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXfixes[${MULTILIB_USEDEP}]
|
||||
x11-libs/libxkbcommon[${MULTILIB_USEDEP}]
|
||||
x11-libs/libxkbfile[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXrandr[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXScrnSaver[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXtst[${MULTILIB_USEDEP}]
|
||||
x11-libs/pango[${MULTILIB_USEDEP}]
|
||||
x11-libs/tslib[${MULTILIB_USEDEP}]
|
||||
x11-libs/xcb-util-cursor[${MULTILIB_USEDEP}]
|
||||
x11-libs/xcb-util-image[${MULTILIB_USEDEP}]
|
||||
x11-libs/xcb-util-keysyms[${MULTILIB_USEDEP}]
|
||||
x11-libs/xcb-util-renderutil[${MULTILIB_USEDEP}]
|
||||
x11-libs/xcb-util-wm[${MULTILIB_USEDEP}]
|
||||
apulse? ( media-sound/apulse[${MULTILIB_USEDEP}] )
|
||||
pulseaudio? (
|
||||
media-libs/libpulse[glib,${MULTILIB_USEDEP}]
|
||||
media-plugins/gst-plugins-pulse:1.0[${MULTILIB_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if use apulse ; then
|
||||
sed -i '/Exec=/s|/opt|apulse /opt|' \
|
||||
usr/share/applications/viber.desktop || die "sed failed"
|
||||
fi
|
||||
|
||||
# remove hardcoded path
|
||||
sed -i '/Icon/s|/usr/share/pixmaps/viber.png|viber|' \
|
||||
usr/share/applications/viber.desktop \
|
||||
|| die "sed failed for viber.desktop"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
newicon -s scalable usr/share/icons/hicolor/scalable/apps/Viber.svg \
|
||||
viber.svg
|
||||
for size in 16x16 24x24 32x32 48x48 64x64 96x96 128x128 256x256; do
|
||||
newicon -s "${size%%x*}" usr/share/viber/"${size}".png viber.png
|
||||
done
|
||||
dosym ../icons/hicolor/96x96/apps/viber.png \
|
||||
/usr/share/pixmaps/viber.png
|
||||
|
||||
domenu usr/share/applications/viber.desktop
|
||||
|
||||
insinto /opt/viber
|
||||
doins -r opt/viber/.
|
||||
|
||||
pax-mark -m "${ED}"/opt/viber/Viber \
|
||||
"${ED}"/opt/viber/QtWebEngineProcess
|
||||
|
||||
fix-gnustack -f "${ED}"/opt/viber/lib/libQt6WebEngineCore.so.6 > /dev/null \
|
||||
|| die "removing execstack flag failed"
|
||||
|
||||
fperms +x /opt/viber/Viber \
|
||||
/opt/viber/lib/libQt6Core.so.6 \
|
||||
/opt/viber/libexec/QtWebEngineProcess
|
||||
|
||||
dosym ../../opt/viber/Viber /usr/bin/Viber
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
# mask portage wgetpaste
|
||||
>=app-text/wgetpaste-2.33
|
||||
>app-text/wgetpaste-2.33-r0
|
||||
|
||||
# prevent automagic depends
|
||||
sys-libs/db:6.0
|
||||
|
Loading…
Reference in new issue