How to automate downloads from the KDE store

Hi!

I manager my system with nixos. I am currently building a feature for automatically applying cursor themes (splash themes, desktop themes, …). Applying an existing theme is easy enough. The hard part are themes that I have to download from the kde store. If those where fixed URLs all would be fine.

But they are, apparently, dynamically generated links from some challenge/response type of setup.

Is there any API that allows simpler access to those files?

(If not: Are those files built and uploaded by the themes author; or is there some buildscript?)

Yes, with api.kde-look.org / api.opendesktop.org docs: https://www.opendesktop.org/ocs-api

There is a widget called apdatifier that uses the api to update add-ons:

https://github.com/exequtic/apdatifier/blob/main/package/contents/tools/sh/widgets

And someone is working on a cli tool based on apdatifier and discover to do this https://github.com/uwuclxdy/plasmoid-updater, haven’t tried it but looks promising

Are those files built and uploaded by the themes author; or is there some buildscript?

You could yes, mostly with kpackagetool6 but most authors don’t publish the source or don’t keep it up to date.