casile icon indicating copy to clipboard operation
casile copied to clipboard

Merge meta data sources

Open alerque opened this issue 5 years ago • 1 comments

Meta data for each book is merged from a series of sources or layers:

  1. CaSILE defaults
  2. Publisher toolkit
  3. Project wide meta data
  4. Target specific meta data

These sources are currently merged (hopefully in that order) and the combined output is used when building each target. Unfortunately the merge happening right now is kind of brutal and only considers top level keys in the meta data. It is not a deep merge / meld. This makes it hard to override specific values without potentially duplicating chunks much larger than the bit you want to actually override.

Preferably some sort of tree merge would happen where values could be overwritten or even erased, but also spliced into. Most notably list elements should probably be extended rather than replaced by default, although a way to clear values is also needed. This will probably require an overhaul of the data types we already use and something to walk the tree and handle each element type differently.

alerque avatar Jan 10 '19 11:01 alerque