fix ping, add scheme to neofetch

This commit is contained in:
Gabriel Fontes
2022-01-15 11:10:09 -03:00
parent 1753e940f9
commit b9c3469f79
7 changed files with 81 additions and 31 deletions
+15 -7
View File
@@ -1,14 +1,9 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p jq httpie
album="bXDPRpV"
clientid="0c2b2b57cdbe5d8"
function fetch_image() {
image=$1
result=$(https api.imgur.com/3/album/$album Authorization:"Client-ID $clientid")
images=$(echo $result | jq -r '.data.images[] | "\(.description)|\(.type)|\(.id)"')
echo "["
while read -r image; do
name=$(echo $image | cut -d '|' -f 1)
ext=$(echo $image | cut -d '|' -f 2 | cut -d '/' -f 2)
id=$(echo $image | cut -d '|' -f 3)
@@ -20,5 +15,18 @@ while read -r image; do
echo " id = \"$id\";"
echo " sha256 = \"$sha256\";"
echo " }"
}
album="bXDPRpV"
clientid="0c2b2b57cdbe5d8"
result=$(https api.imgur.com/3/album/$album Authorization:"Client-ID $clientid")
images=$(echo $result | jq -r '.data.images[] | "\(.description)|\(.type)|\(.id)"')
echo "["
while read -r image; do
fetch_image $image &
done <<< "$images"
wait
echo "]"
+30
View File
@@ -461,4 +461,34 @@
id = "ssi4zpM";
sha256 = "00wqp90q4x3nyr1bj40qw2wpppw7f4aq1vgww2jhm9ja0aafhmn5";
}
{
name = "fox-forest-green";
ext = "jpeg";
id = "HdCMqmb";
sha256 = "1rkxvg6mjnraphinfbgb7jmd272qrdzlxfj3fc0bqlx9b0q5i0a2";
}
{
name = "city-pink-car-outrun";
ext = "jpeg";
id = "yC3GJi4";
sha256 = "0z2xa9i5d7688hmbys03avaz0kj74mzyhcpv7h4jx89hy0k0563r";
}
{
name = "city-pink-gold-sunset";
ext = "jpeg";
id = "0QU8UeV";
sha256 = "0kcn8c4iz8vg3fw99iwx16w69vp74fllir75yxdm94rhsjhwc44x";
}
{
name = "forest-blue-purple-deer";
ext = "jpeg";
id = "5p9moeS";
sha256 = "14dgj27kk7ax4fp08q7xpd6za75zn5zqadb9lzdj29bp6arh7ijx";
}
{
name = "city-pink-purple-scifi";
ext = "jpeg";
id = "XK9g9yK";
sha256 = "0qd0hc22dxfyax6yn0gcd9syl6gaaqr14zx2cf81jmqqlv7nx5cf";
}
]