You are not logged in.
Pages: 1
I want to make a script to get a list of trending packages from the info in https://pkgstats.archlinux.de/. Before I do it I wanted to make sure there isn't already a way to do this.
And if there isn't, would you recommend me to use python or bash for this? Thanks.
Offline
You will need to sample the database and determine yourself if a package is “trending” (for your definition of it). Hypothetically you could use the API and query the packages resource, but the number of subjects alone is in the range of 100k — it would be overwhelming to the service. So it seems the best approach would be to contact administrators in the project thread and see if you can get a saner access to the data.
Sometimes I seem a bit harsh — don’t get offended too easily!
Offline
If by "trending" you mean packages with the highest popularity, then this should be trivial as the /packages query with no (or default) parameters returns the first 100 packages for the current month and - while I don't know if this is specifically documented - returns them sorted by popularity starting with the highest popularity values. So in otherwords, the default /packages/ query gives you the 100 most popular packages. In other words:
curl -s https://pkgstats.archlinux.de/api/packages \
| jq -r '.packagePopularities[]|.name'
Last edited by Trilby (2022-08-10 03:04:17)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
By trending I mean how the current behavior compares to the usual behavior. I've only found a go package so I guess I'll have to write it in go.
Last edited by linuxscoop (2022-08-10 10:04:07)
Offline
Pages: 1