copier-org / copier

Library and command-line utility for rendering projects templates.
https://readthedocs.org/projects/copier/
MIT License
2.07k stars 183 forks source link

Generate file structures on dynamic loop #1271

Open yajo opened 1 year ago

yajo commented 1 year ago

Just: {% yield single_var from looped_var %}{{ single_var }}{% endyield %}

The implementation could be similar to https://github.com/orgs/copier-org/discussions/908#discussioncomment-6505536:

Does single_var exist in context?

OK, we got the exception. Now, are you rendering a filename?

Originally posted by @yajo in https://github.com/copier-org/copier/discussions/908#discussioncomment-6543747

0xsoydev commented 1 year ago

Hello there @yajo, I am new to the open source community, I would like to try and solve this issue, if you may, could you please assign this issue to me?

kj-9 commented 3 weeks ago

@yajo Hi, I've created #1855 to implement the yield tag functionality. Would you kindly review and provide advice?

I'm new to Copier and don't have deep knowledge of the codebase yet, so I'm not entirely confident if this implementation is the best approach.

I'm really looking forward to having this feature available, and I hope this contribution can help move it forward. Any feedback would be greatly appreciated!