Closed MarcelGep closed 7 months ago
Hi @MarcelGep,
I will look into it. Does it work with other output formats? E.g., if you use --markdown instead of --latex.
Kindly, Gustav
Hi @MarcelGep,
the problem is only very bad documentation from my part.
The --template
flag is ment to set the name of the selected template only. You cannot place it anywhere other than in the template
folder under the document structure. The reasoning behind that was simply to copy the methodology of the assets
folder.
So, in your case: doorstop publish all ./dist --latex --template TEMPLATE_NAME
means that you are actually trying to publish all documents in the standard doorstop folder, i.e., ./reqs
. To correctly supply a custom template, you have to create a folder named template
under the 'reqs' folder and in that folder place your template files.
reqs/
├── REQ001.yml
├── REQ002.yml
├── <snip>
├── assets
│ └── logo-black-white.png
└── template
├── TEMPLATE_NAME.cls
└── TEMPLATE_NAME.yml
Please note that you have to supply both a .cls
file and a .yml
file and that the --template
flag takes the name without any file ending.
I hope this helps, and I will try to update the documentation as soon as possible.
Kind regards, Gustav
Hey @neerdoc thanks for the response this way works 👍 With a correct documentation this will be perfect :-)
That means that i can add for each document folder a separate template folder and can using separate templates for each document?
├── swrs
│ ├── HEAD-1.0.yml
│ ├── HEAD-1.1.yml
│ ├── SWRS0001.yml
│ └── SWRS0002.yml
├── sys
│ ├── assets
│ │ └── autoware-logo.png
│ ├── HEAD-1.0.yml
│ ├── HEAD-1.1.yml
│ ├── HEAD-1.2.yml
│ ├── HEAD-1.3.yml
│ ├── SYS0001.yml
│ ├── SYS0002.yml
│ ├── SYS0003.yml
│ └── template
│ ├── logo-black-white.png
│ ├── template.cls
│ └── template.yml
└── template
├── logo-black-white.png
├── template.cls
└── template.yml
Ok if i put only the "template" folder into the "reqs" folder it doesn't work!
doorstop.common.DoorstopError: Template flag set, but no 'template' folder was found.
It only works if i put the "template" folder into the document folder "sys" -> "reqs/sys/template".
├── swrs
│ ├── HEAD-1.0.yml
│ ├── HEAD-1.1.yml
│ ├── SWRS0001.yml
│ └── SWRS0002.yml
└── sys
├── assets
│ └── autoware-logo.png
├── HEAD-1.0.yml
├── HEAD-1.1.yml
├── HEAD-1.2.yml
├── HEAD-1.3.yml
├── SYS0001.yml
├── SYS0002.yml
├── SYS0003.yml
└── template
├── logo-black-white.png
├── template.cls
└── template.yml
This beta release contains a fix for this issue: https://pypi.org/project/doorstop/3.0b11/ cc @neerdoc
Hello together, maybe i'm stupid but the latex publisher works not with a custom template?
I run
doorstop publish all ./dist --latex --template PATH/TO/TEMPLATE
and i get an Error doorstop.common.DoorstopError: Template flag set, but no 'template' folder was found.
I try a template folder as parameter or a .tex file or a .html file but i get only this error. What should i set as --template parameter?
(I'm using doorstop v3.0b10)
Update: I look at the source code and the variable "document_template" (template.py) is always "None" because the "template" attribute of a document will never set and the parameter --template is never used only for if/else query. I don't understand!!?!?!?