Using and Mastering Cookiecutter Transcripts
Chapter: Welcome to the course
Lecture: What you will learn

Login or purchase this course to watch this video and the rest of the course contents.
0:02 The course is broken into three major sections.
0:05 It's going to start out with just what it takes to consume Cookiecutter.
0:09 You know, if I am somebody and I see a Cookiecutter template out there
0:12 and I want to create a project on it, how do I do that,
0:15 what are the intricacies, and sort of advanced features there.
0:18 If I am like a project lead, or I run some kind of software development team,
0:22 or maybe I own an open source project, there is a different set of things
0:27 that I might care about around creating templates, and so on,
0:30 and if I want to contribute back to Cookiecutter, make it better,
0:33 make it match my workflow better, there is some edge care
0:37 that I need to bring in as a feature, we'll talk about how to do that.
0:40 So in the consuming Cookiecutter part,
0:42 we're going to talk about what you need to just run
0:45 and use Cookiecutter as a program, we're going to install Cookiecutter,
0:48 we're going to learn and talk about the command line interface for Cookicutter,
0:53 we're going to survey the pantry full of cookies,
0:57 which is the official set of Cookiecutter templates
0:59 listed in the Cookiecutter documentation, there are many more
1:02 that people didn't bother to get back into the listing,
1:05 but there is quite a few interesting ones there
1:08 and you will understand the power of Cookiecutter as you go through them.
1:11 We'll talk about local versus remote templates, do you need internet connection,
1:15 how do these two things connect, we'll about profile defaults
1:19 Cokiecutter ask you lots of questions, what's your name,
1:23 what's your email address, things like that, all the time,
1:26 and we'll see that you don't always have to answer those,
1:28 you can set up defaults for them, how to use Cookiecutter
1:30 within virtual environments, replaying project creation
1:33 as in answering the exact questions, the exact same way
1:36 over and over again, in a reliable way, and things like that.
1:39 Now, if you're a project lead, you might want to create Cookiecutter templates
1:45 for your project, for your company or for your team,
1:48 and so we're going to talk about how do we create Cookiecutter templates,
1:51 what are the basics, we'll see that there is a Cookiecutter json file
1:55 and there is a certain project structure, that we use,
1:58 and that will form the template, we'll see how you can prompt the user,
2:02 there is a lot of choices on user input
2:04 and what the types of questions you can ask are,
2:07 and we'll see that there is this concept of choice prompts
2:11 so if I want to ask the user hey, pick a web framework template for this,
2:16 do you want Jinja, do you want Chameleon, do you want Mako,
2:19 you can give them a list like that, and we also see
2:22 that you can have complex default values, one of the real powerful things
2:26 about Cookicutter are its pre and post generation hooks,
2:30 this is arbitrary Python code that you write and ship with your template and it runs,
2:35 either right before the files are created and transformed,
2:38 but after the information has been gathered from the users, or entirely afterwards.
2:43 As in the case of the post generation hook.
2:46 We'll see that you might want to exclude certain files from transforms
2:49 if you want to ship a Cookiecutter template as part of your
2:52 Cookiecutter template that turns out to be a problem,
2:55 so we'll see how to solve that problem, how you can conditionally include
2:58 files and directories or maybe exclude them,
3:00 so in my case of the web template framework,
3:03 if you choose Mako you don't want to include the Jinja or the Chameleon templates
3:06 so you might want to exclude them here.
3:09 We'll do a little bit of a case study for various existing project templates,
3:13 some of the popular open source projects and companies
3:16 and how they are using Cookiecutter,
3:19 and finally, once we've learned about how to create these templates,
3:22 we'll see how you can get your template listed in the official documentation
3:26 for people to discover your project.
3:29 Last but not least, as somebody who is creating Cookiecutter templates,
3:32 you may well want to use the programmatic interface,
3:35 not the command line interface to Cookiecutter.
3:38 So if you want to give your users an application
3:42 that they can run that will create projects,
3:44 you can internally invisibly wrap up Cookiecutter in this application,
3:48 and you use whatever UI you want command line interface,
3:52 GUI, web app, it doesn't really matter, you can gather
3:56 a bunch of information from the users and programmatically use Cookiecutter
3:59 to actually do the project's creation.
4:02 Now finally, as a contributor, we're going to see
4:04 how you can check out and build Cookiecutter locally,
4:07 how you locally register it as a package so that Python knows
4:11 how to find the source and then you can test it and things like that,
4:14 we'll talk a bit about the contributor guidelines,
4:16 we'll actually go through the process of adding a feature
4:19 or in this case really we're going to add a bug fix
4:22 but we're going to modify Cookiecutter and push that back
4:24 to the open source project, so hopefully, by the time this course is done,
4:27 there should be a feature that wasn't there at the beginning,
4:30 because we're going to do that as part of our demo.
4:33 Alright, so this is what we're going to learn about Cookiecutter
4:36 so super cool project, there is a lot to cover and I hope you're excited to get started.