AspireSync/bin/popular-plugins
Chuck Adams 5fcc4b8eb8
update popular themes/plugins scripts for subversion repo archival (#48)
* wip: use revision as dir hash for archive files

* tweak: slightly more verbose output

* tweak: quote directory being removed

* tweak: prettier header

* fix: use -e because lolbash

* tweak: add countdown-timer to blacklist

* fix: refactor blacklist and anchor the patterns

* feat: popular-plugins and popular-themes now output json

* refactor: mv svn/bin/popular-* bin/

* feat: trunk-only builds

* tweak: add more huge slugs before populating them scientifically

* wip: add some more unscientific slugs

* tweak: add 10M+ archive files to the 'huge' pile

* tweak:  update huge and add facebook-album-sync to corrupt

* feat: add IMMEDIATES_DEPTH to support empty checkouts

* fix: svn update missing directories automatically

* feat: specifically throw woocommerce into the trunk-only bin

* fix: drop __trunk entries from trunk-only

* refactor: break trunk-only.txt out from script source

* fix: use grep and not bash regex for trunk-only test

* tweak: add font-awesome-the-easy-way to corrupt

* update: update trunk-only.txt with more slugs

* tweak: show depth used, as trunk-only is now the norm

* tweak: break out suffix generation into function

* feat: new update-trunk-archive which will replace update-archive

* tweak: get tags before trunk

* zap: rm update-archive

* tweak: less noisy banner

* feat: sync popular plugins and themes on every run
2025-02-18 15:10:20 -07:00

37 lines
769 B
Bash
Executable file

#!/bin/bash
n=${1:-100}
endpoint=https://api.wordpress.org/plugins/info/1.2/
fields=${FIELDS:-'slug,version,name,last_updated'}
[[ -n $EXTRA_FIELDS ]] && fields="$fields,$EXTRA_FIELDS"
exec curl --silent "$endpoint?action=query_plugins&browse=popular&per_page=$n" | jq -r ".plugins[] | {$fields}"
# curl --silent "https://api.wordpress.org/plugins/info/1.2/?action=query_plugins&browse=popular&per_page=$n" | jq -r '.plugins[0] | keys[]'
# active_installs
# added
# author
# author_profile
# description
# donate_link
# download_link
# downloaded
# homepage
# icons
# last_updated
# name
# num_ratings
# rating
# ratings
# requires
# requires_php
# requires_plugins
# short_description
# slug
# support_threads
# support_threads_resolved
# tags
# tested
# version