|
23 | 23 |
|
24 | 24 | - name: Fetch/sum user + JSD request counts |
25 | 25 | run: | |
26 | | - declare -A GF_SCRIPTS=( # for Greasy Fork script user counts |
27 | | - ["460805"]="Autoclear ChatGPT History" |
28 | | - ["500663"]="AmazonGPT" |
29 | | - ["462440"]="BraveGPT" |
30 | | - ["466789"]="ChatGPT Auto-Continue" |
31 | | - ["462422"]="ChatGPT Auto Refresh" |
32 | | - ["500940"]="ChatGPT Auto-Talk" |
33 | | - ["465051"]="ChatGPT Infinity" |
34 | | - ["461473"]="ChatGPT Widescreen Mode" |
35 | | - ["459849"]="DuckDuckGPT" |
36 | | - ["478597"]="GoogleGPT" |
37 | | - ) |
38 | | -
|
39 | 26 | declare -A CHROME_EXTENSIONS=( # for Chrome extension user counts |
40 | 27 | ["obnaimomofoogphlhlaipeflcbneamnj"]="Brave Omnibox" |
41 | 28 | ["lbojnhaafilddefkdgmbplkafnckaoga"]="ChatGPT Auto-Continue" |
@@ -121,23 +108,6 @@ jobs: |
121 | 108 | echo "$formatted_num" |
122 | 109 | } |
123 | 110 |
|
124 | | - # Alphabetize arrays for more readable logging |
125 | | - for array_type in "GF_SCRIPTS" "CHROME_EXTENSIONS" "EDGE_ADDONS" "FF_ADDONS" ; do |
126 | | -
|
127 | | - # Extract IDs/names |
128 | | - eval ids=\${!$array_type[@]} names=(\"\${$array_type[@]}\") |
129 | | - IFS=' ' read -r -a ids <<< "$ids" # converted space-delimited IDs to actual array |
130 | | - for ((i = 0 ; i < ${#ids[@]} ; i++)) ; do |
131 | | - app_id="${ids[i]}" app_name="${names[i]}" ; done |
132 | | -
|
133 | | - # Create alphabetized arrays |
134 | | - sorted_array=() |
135 | | - for ((i = 0; i < ${#ids[@]}; i++)) ; do |
136 | | - sorted_array+=("${names[i]}:${ids[i]}") ; done |
137 | | - IFS=$'\n' sorted_array=($(sort <<<"${sorted_array[*]}")) |
138 | | - eval sorted_${array_type}=\(\"\${sorted_array[@]}\"\) |
139 | | - done |
140 | | -
|
141 | 111 | # Init Greasy Fork user counts |
142 | 112 | total_gf_users=200000 |
143 | 113 | echo -e "\n-----\nTotal Greasy Fork users: $total_gf_users\n-----\n" |
|
0 commit comments