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

Collection: automatic compile linked dependencies (recursive document hierarchy) #282

Open
ronaldtse opened this issue Sep 7, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@ronaldtse
Copy link
Contributor

ronaldtse commented Sep 7, 2022

We want to implement the changes to the inclusion attributes too:
https://github.com/metanorma/bipm-si-brochure/blob/5b6d6578a88022010769721e9178167054e7ce61/sources/si-brochure-bilingual.yml#L43-L67

When specifying a collection, it is cumbersome to specify the "path of the rendered output file". Most likely, the user has not compiled the dependent files used by the collection.

While it is possible to specify in a site generate config file, the order of the dependencies (i.e. list out dependent files first, then the collection), as done in metanorma/bipm-si-brochure#186, it is not ideal.

Instead, we want to automatically resolve all dependencies IN ADVANCE, and then compile the documents in the correct order.

e.g.

manifest:
  documents:
    - source: si-brochure-fr.adoc
    - source: si-brochure-en.adoc 

i.e.

brochure.xml
  |
  | (depends on)
  |
  +-- si-brochure-fr.adoc
  +-- si-brochure-en.adoc

Notice that the (intermediate) output location of the si-brochure-fr.adoc file (e.g. somepath/si-brochure-fr.xml) does not matter as long as the results will be provided at the output location.

Right now we are only allowing a one-level dependency but clearly this can go deeper into recursive levels.

The approach to do this is to have ProcessingTree, ProcessingNode classes to model this and then link the outputs back to the parent.

@abunashir can you please help implement this? Thanks.

Originally posted by @ronaldtse in #205 (comment)

@ronaldtse ronaldtse added the enhancement New feature or request label Sep 7, 2022
@ronaldtse ronaldtse moved this to 🆕 New in Metanorma Sep 7, 2022
@ronaldtse ronaldtse changed the title Collection: implement recursive document hierarchy attributes Collection: automatic compile linked dependencies (recursive document hierarchy) Sep 7, 2022
@ronaldtse ronaldtse moved this from 🆕 New to 🌋 Urgent in Metanorma Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🌋 Urgent
Development

No branches or pull requests

2 participants