瀏覽代碼

Add script to upload a file to transfer.sh

master
Arun Prakash Jana 6 年之前
父節點
當前提交
f135a30c0c
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: A75979F35C080412
共有 3 個文件被更改,包括 18 次插入1 次删除
  1. +1
    -0
      user-scripts/README.md
  2. +1
    -1
      user-scripts/imgresize
  3. +16
    -0
      user-scripts/transfer

+ 1
- 0
user-scripts/README.md 查看文件

@@ -13,4 +13,5 @@
| nlaunch | Drop-down independent app launcher (needs fzy), drop in `$PATH`; fallback regular prompt |
| picker | Pick files and pipe the newline-separated list to another utility |
| sxiv | Open images in current directory in sxiv |
| transfer | Upload current file to transfer.sh |
| upgrade | Check and update to latest version of nnn manually on Debian 9 Stretch |

+ 1
- 1
user-scripts/imgresize 查看文件

@@ -25,7 +25,7 @@ if [ -z "$res" ]; then
read res
fi

if [ -z "$res" ]; then
if ! [ -z "$res" ]; then
if ! [ -z "$minsize" ]; then
imgp -ackx "$res" -s "$minsize"
fi


+ 16
- 0
user-scripts/transfer 查看文件

@@ -0,0 +1,16 @@
#!/usr/bin/env sh

# Description: Upload a file to transfer.sh
#
# Shell: POSIX compliant
# Author: Arun Prakash Jana

if ! [ -z "$1" ]; then
# Upload the file, show the download link and wait till user presses any key
curl -s --upload-file "$1" https://transfer.sh/`basename "$1"`
echo
read input

# To write download link to "$1".loc and exit
# curl -s --upload-file "$1" https://transfer.sh/`basename "$1"` -o `basename "$1"`.loc
fi

Loading…
取消
儲存