r-unruh / mtracker

cli movie tracker written in Rust - keep track of watched movies and series
MIT License
4 stars 1 forks source link

External subcommands #5

Open aartoni opened 2 weeks ago

aartoni commented 2 weeks ago

I'm interested in building some external programs that take advantage of mtracker, namely:

My idea is this should not be part of the mtracker project itself because I like the fact that it is this minimal. However, I also think that it would be cool if we could run something like mtracker suggest movies and get movie recommendation based on mtracker movies.

I know that there's a way to do this because programs (e.g., cargo) allow for external subcommands but I don't know what the requirements would be on the mtracker to have this feature.

r-unruh commented 1 week ago

It's an interesting idea to make it modular.

So the user needs to register on TMDB first to get an API key. This is why I haven't built any of those things into mtracker. To me it sounds like very few people would go through all that trouble, unless the tool is very powerful and can do amazing things. Maybe we can get there.

aartoni commented 1 week ago

For every subcommand, the idea is having them living in their own git repository and have their own config and data dirs. This way we can rest assured that we don't have to provide support to whoever tampers with mtracker's own directories.

Practical example

So you could say that this is simply a way to omit the dash in the program name, in reality extensions get installed in a specific location. Let's look at pass for instance, it has an extensions directory at usr/lib/password-store/extensions, if you were to install pass-otp or pass-tomb you would find them there (so not in your $PATH).