First some thoughts to completely confuse all of you
Over the years kindoff learned not to try to organize big chunks of data in to directory’s according to a well-crafted scheme which at the end never seem to fit.
With other words store the data uncategorized and let computers do the filtering / querying afterwards.
Calibre desktop seems to have a virtual library mechanism, although it seems to be more a search utility rather than a mechanism to restrict access to certain sources. Moreover no clue if the content-server has this ability.
Just some thoughts
IMHO option 2 (separate) is most versatile, for those who do not agree with the above can go completely wild splitting up their libraries.
IIUC library are defined by their path and the (json) db lives in the root of this path. IF SO:
To keep is simple I would suggest to have a fixed prefix ( ie /var/lib/nethserver/calibre/libraries/
) and on a fresh install one library with an arbitrary name without sub categories. (ie lib starts at the root)
If subcategories are desired you can make your well-crafted scheme and call /store them as (i.e.)
(key) library1
with an array of catogories (prop)'books','comics'
or
(key) libary2
(prop) '/books/computing','books/cooking','commics'
(you get the drill)
These properties can be concatenated to the absolute path to the libraries (i.e.) /var/lib/nethserver/calibre/libraries/libary2/books/computing
.
possible caveat can be creation of multiple library entries (record) for the same library.