1
0
mirror of https://github.com/kmein/niveum synced 2026-03-19 19:41:08 +01:00

chore(packages): reorganize scripts

This commit is contained in:
Kierán Meinhardt
2020-04-09 16:56:47 +02:00
parent 4abc0f4221
commit c6c621baf1
26 changed files with 230 additions and 189 deletions

View File

@@ -1,13 +1,21 @@
{ writeShellScriptBin, wget, curl, jq }:
writeShellScriptBin "instaget" ''
for url in "$@"; do
${curl}/bin/curl -s "$url" \
json="$(${curl}/bin/curl -s "$url" \
| grep display_url \
| grep -o '{.*}' \
| grep -o '{.*}')"
echo "$json"
| ${jq}/bin/jq -r '
.entry_data.PostPage
| .[].graphql.shortcode_media.edge_sidecar_to_children.edges
| .[].node.display_url' \
| xargs ${wget}/bin/wget
echo "$json"
| ${jq}/bin/jq -r '
.entry_data.PostPage
| .[].graphql.shortcode_media.display_url' \
| xargs ${wget}/bin/wget
done
''