The entire (new) content server interface is in a single HTML file index-generated.html (look in the resources/content-server directory of the calibre installation). The javascript in that file contacts various JSON end-points on the server. So if you want to make a new interface for the server, all you need to do is replace index-generated.html with whatever floats your boat.
Of course, if you want your interface to be available to other calibre users, then it would require a few lines of python to add the appropriate end point to serve up that html. It is on my TODO list to pluginize this, so you can have content server plugin that are self contained with all their assets, but loaded by the content server to make new endpoints available.
I agree that the JSON API needs documentation, but at least as far as I am concerned, that will not come until I am done with the plugin system I spoke of earlier. Contributions to the documentation are welcome.
To get a list of endpoints the server currently supports simply grep for @endpoint in the calibre/srv directory. Note that this JSON API is used not just by the HTML interface but also by calibredb when connecting to the server as a backend, and other third party apps that present custom interfaces to the server.
Finally, let me just say that the new interface is optimized for use on a mobile device, where lots of people like the fact that they can read books in a browser without needing yet another privacy invading third party app.
It's certainly possible that in optimizing for that, there are regressions in usage for your particualr use case, which seems to be distributing books to other people via desktop browsers. So *specific*, *actionable* suggestions on improving the interface for that use case are welcome. I am also open to adding a whole different interface for that use case, much as the /mobile interface exists already for people using outdated browsers. Indeed you might find the /mobile interface better suited to your needs.
|