Currently, when setting "custom_template_header_path" and "custom_template_body_path" only absolute paths are supported because of the current state of get_template_part in FileHeader.py.
I have found an OS agnostic method of handling paths based on home directories, and it is tested and working on OSX, and should work on the other major OSes.
Simply change
_ = os.path.join(custom_template_path, tmpl_name)
to
_ = os.path.expanduser(os.path.join(custom_template_path, tmpl_name))
If the given path does not contain a home directory relative to that system then the function will return the original path unmodified.
If you'd prefer, I can submit a pull request.
Currently, when setting
"custom_template_header_path"and"custom_template_body_path"only absolute paths are supported because of the current state of get_template_part in FileHeader.py.I have found an OS agnostic method of handling paths based on home directories, and it is tested and working on OSX, and should work on the other major OSes.
Simply change
_ = os.path.join(custom_template_path, tmpl_name)to
_ = os.path.expanduser(os.path.join(custom_template_path, tmpl_name))If the given path does not contain a home directory relative to that system then the function will return the original path unmodified.
If you'd prefer, I can submit a pull request.