mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-01 02:31:28 +03:00
indexers: libraries-io: improve verbosity
This commit is contained in:
parent
56fae02e3a
commit
f3aec937d3
@ -39,7 +39,7 @@ libraries.io also supports other interesting popularity metrics:
|
|||||||
|
|
||||||
outFile=$(jq '.outputFile' -c -r $input)
|
outFile=$(jq '.outputFile' -c -r $input)
|
||||||
|
|
||||||
echo "loadein api key"
|
echo "loading api key"
|
||||||
if [ -z ''${API_KEY+x} ]; then
|
if [ -z ''${API_KEY+x} ]; then
|
||||||
echo "Please define env variable API_KEY for libaries.io api key"
|
echo "Please define env variable API_KEY for libaries.io api key"
|
||||||
exit 1
|
exit 1
|
||||||
@ -62,6 +62,7 @@ libraries.io also supports other interesting popularity metrics:
|
|||||||
|
|
||||||
rm -f $outFile
|
rm -f $outFile
|
||||||
for page in $(seq 1 $numPages); do
|
for page in $(seq 1 $numPages); do
|
||||||
|
echo "requesting page $page"
|
||||||
url="https://libraries.io/api/search?page=$page&sort=dependents_count&per_page=100&platforms=$platformQuery&api_key=$apiKey"
|
url="https://libraries.io/api/search?page=$page&sort=dependents_count&per_page=100&platforms=$platformQuery&api_key=$apiKey"
|
||||||
curl -k "$url" | jq "$jqQuery" -r >> $outFile
|
curl -k "$url" | jq "$jqQuery" -r >> $outFile
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user