I have this:
user_dir: /home/user
user_pics: /home/user/pics
How could I use the user_dir for user_pics? If I have to specify
If you are using python with PyYaml, joining strings is possible within the YAML file. Unfortunately this is only a python solution, not a universal one:
with os.path.join:
user_dir: &home /home/user
user_pics: !!python/object/apply:os.path.join [*home, pics]
with string.join (for completeness sake - this method has the flexibility to be used for multiple forms of string joining:
user_dir: &home /home/user
user_pics: !!python/object/apply:string.join [[*home, pics], /]