[Feature Request] - RESTful add/remove/modify users & location change of dbs
Opened this issue · 3 comments
I've recently forked this project to dockerize it, which went pretty smoothly. I'd like to send a pull request to merge this in, but before then I think it would be great if there were a RESTful way to add & delete users, and change their passwords.
If this project is still under active development, it would be great if this could be added. Glancing at the code it looks like it would be pretty easy to add, but I'm new to Python. The interface could itself be protected by a username & password that the server gets from the environment, which is easy for Docker users to set at deploy time.
Also, to facilitate docker deployments, it would be most welcome if the various databases could be created in a subdirectory containing nothing else, so that this directory can be mapped to persistent storage on the host.
I'm willing to do all this work myself, but I thought I'd open an issue first to give you the opportunity to do it yourself and avoid any potential blunders by a Python newb like myself.
Unfortunately, this package isn't really "actively" maintained anymore.
That said, I'd love to see this dockerized! :-)
The location of the Anki collections is configurable (the data_root
in the .ini file) so that shouldn't be a problem.
There isn't an API for managing users, but the way that users are provided is completely pluggable - you could swap it out with something simpler, like that uses a flat file instead of the sqlite implementation. I personally always considered the sqlite user database to be an "example" - I don't actually use that in practice, but others do and someone contributed a command-line tool to manage it at one point.
Thanks for the quick and unambiguous response!
The dockerizing is already done it was actually pretty easy, you can see the Dockerfile in the dockerize branch on my fork here: https://github.com/alzeebum/anki-sync-server/blob/dockerize/docker/Dockerfile
I'll make the changes in my fork and send a pull request when it's done, but if you don't want to take it for any reason, no hard feelings. I'm hoping this will make it easier for people to run their own sync servers and maybe even build public alternatives to ankiweb.