sh Imgur下载器

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh Imgur下载器相关的知识,希望对你有一定的参考价值。

function ImgurDir {
if [ -d ~/imgur\ albums ]
then
cd ~/imgur\ albums
else
mkdir ~/imgur\ albums
cd ~/imgur\ albums
fi
} 
function readAlbum {
echo "what album do you want?"
read album
}
function GetLinks {
wget -q www.imgur.com/a/$album
links=$(grep -o \<img\ id=\"thumb-..... $album)
rm $album
}
function subdir {
if [ -d $album ]
then 
cd $album
rm -rf
else
mkdir $album
cd $album
fi
}
function GetImg {
COUNTER=0
printf %s "$links" | while IFS= read -r line
do
   let COUNTER=COUNTER+1 
 shorter=${line:15}
wget -q  www.i.imgur.com/$shorter.gif
echo "getting image" $COUNTER
done

}
function main {
ImgurDir
long=$USERNAME
short=${long:0:1}
echo "Welcome" "${short^^}""${long:1}" "to Denis' Imgur album downloading script!(currently only supports \"Blog Layout\")"
readAlbum
subdir
GetLinks
GetImg
}
main

以上是关于sh Imgur下载器的主要内容,如果未能解决你的问题,请参考以下文章

sh 用于将图像上传到imgur.com的Shell脚本

sh 关键字下载器

XAMPP/MySQL 下载图像错误 - Java

从 Mathematica 上传图像到 Imgur

图像未在主要发布时显示,但在“场景”构建器上显示

SwiftUI 操作表选择器