Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge meta data sources #21

Open
alerque opened this issue Jan 10, 2019 · 1 comment
Open

Merge meta data sources #21

alerque opened this issue Jan 10, 2019 · 1 comment

Comments

@alerque
Copy link
Member

alerque commented Jan 10, 2019

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
Copy link
Member Author

alerque commented Jan 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant