replace home grown screenshotting with flameshot
This commit is contained in:
parent
5ce906b628
commit
0f165c54f5
3 changed files with 17 additions and 98 deletions
|
@ -204,13 +204,9 @@ in {
|
|||
#!${pkgs.zsh}/bin/zsh
|
||||
fileid=$(${pkgs.pwgen}/bin/pwgen 16 1)
|
||||
|
||||
filename=$(basename $1)
|
||||
extension=$(echo "''${filename##*.}" | awk '{gsub(/^ +| +$/,"")} {print $0}')
|
||||
if [[ "$extension" = "$filename" ]] then
|
||||
extension=$(grep "$(file -b --mime-type $1)" ${mimeTypes} | awk '{print $2}')
|
||||
fi
|
||||
extension=$(file "$1" --extension | cut -d' ' -f2 | sed 's/???/txt/')
|
||||
|
||||
rsync -a --chmod=664 "$1" "wizbos.club:~/public/uploads/$fileid.$extension"
|
||||
ssh wizbos.club "cat > ~/public/uploads/$fileid.$extension" < "$1"
|
||||
echo "https://p.gen2.space/uploads/$fileid.$extension"
|
||||
'';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue