New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy without render #184
Copy without render #184
Conversation
You can add a key `_ignore_files` in your cookiecutter.json containing a list of filenames (or a globs) that will be skipped on rendering.
I'll add some tests for the prompting part, because I see that the coverage decreased there. |
👍 |
That's exactly what I need. Can't wait to see this in an upcoming release 👍 |
@LucianU - I'm kind of thick, so I have a stupid question: Does this pull request allow you to use cookiecutter to grab a template without rendering it? |
@pydanny, it allows someone to specify a list of paths to directories or files that shouldn't be rendered. Instead, they are simply copied. Is that what you're asking? |
@LucianU Ah... I think I get it now. If I'm not mistaken, this allows us to bypass rendering of files/directories named things like: If that's the case, I'll argue for getting this into 0.8.0. 😄 |
Yes, that's one use case. I use it for my ansible setup. Ansible uses Jinja, so I need cookiecutter to ignore the directory where I keep all my playbooks, inventory files and so on. |
"_copy_without_render": [ | ||
"*.html", | ||
"*not_rendered_dir", | ||
"rendered_dir/not_rendered_file.ini", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The extra comma inside this list gives me a ValueError: No JSON object could be decoded.
I would love to see this functionality in 0.8.0. It allows us to use cookiecutter to do ansible tasks. |
@LucianU Would you mind if I cherry-picked your stuff into a new branch and finish this out? You'll still get credit and kudos. 😺 |
Please do. |
I'm on it! |
Hi, @pydanny! I'm at PythonBrasil and we could talk (and work) on this Pull Request together if you wish. Thanks, |
So, is this idea dead? REALLY need this for ansible scripts |
@lanshark, This is is not dead at all. I want this to work! However, getting this to work on all platforms is a must for Cookiecutter pull requests. Unfortunately, this PR is not passing all tests on all platforms and fixing that takes free time that we just don't have. Even evaluating PRs takes time we don't have. The issue is that we have to focus on jobs and gigs that pay the bills. What time is left for open source is unfortunately not that much, and usually dedicated to emergencies or smaller tasks that we can resolve in minutes rather than hours. We've considered adding a donation button in order to have paid time for Cookiecutter. Do you think that would be a good idea? Would you or your company be willing to donate for professional quality work on this particular issue? If so, then I'll add it today and we'll be able to get on the problem right now. |
Hmm, Hi Danny! Wow - didn't expect to get an answer that quick! I certainly understand I would be willing to work on the problem. Is there a branch that's Let me know how I can help! -Scott On 3/3/15 1:22 PM, Daniel Greenfeld wrote:
|
@lanshark - it's pretty frustrating because myself, @audreyr, and @michaeljoseph would love to put more time into this project, especially in regards to the review of pull requests. We're trying to figure out a way to fund development, since this is a very favorite project of ours. In any case, this PR is failing on Windows tests (what @appveyor tests). That is what needs to be fixed AFAIK. |
@hackebrot Everyone would love to see this work. The challenge, of course, is windows. |
🔔 Copy without render is now available on master! 😃 See http://cookiecutter.readthedocs.org/en/latest/advanced_usage.html#copy-without-render |
🏆 |
Closing this with many thanks to @LucianU! |
Happy to have contributed and happy to see this merged in. |
Danny, I realize doing releases is always work, but it'd be great if this were released to pypi. |
Hopefully this week. We have a period of slowdown between now and the arrival of what is hopefully the last proof of our book. Which means maybe tomorrow. |
This continues the work started in PR #132. Looking forward to your feedback.