sergiotapia / magnetissimo

Web application that indexes all popular torrent sites, and saves it to the local database.
MIT License
2.98k stars 187 forks source link

Explore CLI support for piping #140

Closed sergiotapia closed 1 year ago

sergiotapia commented 1 year ago

Looks like a useful tool, but I kinda wish this kind of programs had a CLI. It seems to be doing one main thing (searching), and it could be super useful to be able to pipe the results to a downloading program.

I believe this can just be a simple API endpoint that someone can curl and then pipe that into jq or something to do whatever with. I'll cook up a recipe and put it in the readme for people who need this.

sergiotapia commented 1 year ago

We now have /api/latest and /api/search/:search_term endpoints for this. You could curl this, then pipe the result to jq and do anything with the data.