aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2025-04-16 09:12:55 +0200
committerElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2025-04-16 09:12:55 +0200
commitcf2e6a9e651a0a1453e14e6b45a25579a8e46f03 (patch)
treebffb72a9a1fb9842bffb790eecb5cf00316411db /bin
parentcf1b6018b6b179a3c88894b1ca208d5d2e357751 (diff)
update for recent ruamel.yamlHEADmaster
Diffstat (limited to 'bin')
-rwxr-xr-xbin/render11
1 files changed, 6 insertions, 5 deletions
diff --git a/bin/render b/bin/render
index a8aa6ba..ece7e3b 100755
--- a/bin/render
+++ b/bin/render
@@ -29,8 +29,9 @@ class Renderer:
self.args = self.parser.parse_args()
def load_design(self, design):
+ yaml = ruamel.yaml.YAML(typ='safe', pure=True)
with open(design, 'r') as fp:
- design = ruamel.yaml.safe_load(fp)
+ design = yaml.load(fp)
template = design['template']
settings = {}
with open(os.path.join(
@@ -38,26 +39,26 @@ class Renderer:
'paper',
design['paper']+'.yaml'
), 'r') as fp:
- settings.update(ruamel.yaml.safe_load(fp))
+ settings.update(yaml.load(fp))
with open(os.path.join(
'conf',
'margins',
design['margins']+'.yaml'
), 'r') as fp:
- settings.update(ruamel.yaml.safe_load(fp))
+ settings.update(yaml.load(fp))
with open(os.path.join(
'conf',
'theme',
design['theme']+'.yaml'
), 'r') as fp:
- settings.update(ruamel.yaml.safe_load(fp))
+ settings.update(yaml.load(fp))
with open(os.path.join(
'conf',
'settings',
template,
design['settings']+'.yaml'
), 'r') as fp:
- settings.update(ruamel.yaml.safe_load(fp))
+ settings.update(yaml.load(fp))
settings.update(design.get('override', {}))
return template, settings