Feat: arrange variables for templates

Split in 3 categories
- from "options" key build with default_config, file_config and cli options
- from "subject" key build csv or quantity of subject
- other in direct access from "direct_access" dictionnary inside the
  file_config
This commit is contained in:
2022-07-20 16:16:09 +02:00
parent 37d779c0ab
commit 67656c2cf1
8 changed files with 147 additions and 61 deletions

View File

@@ -41,7 +41,7 @@ def tasks_builder(
for source in sources:
corr_source = naming.corr(source)
tasks.append(activate_corr_on(source, corr_source))
tasks.append(activate_corr_on(source, opt, corr_source))
if not no_pdf:
corr_pdf = naming.source2pdf(corr_source)

View File

@@ -69,7 +69,10 @@ def tasks_builder(
for subject in subjects:
source = naming.template2source(template, subject)
args = {**subject, **options}
args = {
"subject": subject,
"options": options
}
tasks.append(generate(template, args, source))