You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly, thanks for Cog, it is such a great way to generate files against a template using Python.
However, the major downside of the current implementation (for me at least) is that it is line-based. There doesn't appear to be a way to do inline templating. For example, let's say I want to generate a Doxygen C source file header:
However, the Cog source code mandates that the [[[end]]] tag is present, and is on a different line to the Python code block, which prevents this rather useful ability. If the -d option is used to delete the source code and the [[[end]]] tag was optional, I could just do:
Firstly, thanks for Cog, it is such a great way to generate files against a template using Python.
However, the major downside of the current implementation (for me at least) is that it is line-based. There doesn't appear to be a way to do inline templating. For example, let's say I want to generate a Doxygen C source file header:
However, the Cog source code mandates that the [[[end]]] tag is present, and is on a different line to the Python code block, which prevents this rather useful ability. If the -d option is used to delete the source code and the [[[end]]] tag was optional, I could just do:
which would get transformed rather neatly into:
This is kinda similar to how PHP works inline with HTML, and would be a really useful feature IMO.
The text was updated successfully, but these errors were encountered: