/usr/share/doc/python-cookiecutter-doc/html/cookiecutter.html is in python-cookiecutter-doc 0.6.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>cookiecutter Package — cookiecutter 0.6.4 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '0.6.4',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="cookiecutter 0.6.4 documentation" href="index.html" />
<link rel="next" title="Contributing" href="contributing.html" />
<link rel="prev" title="Usage" href="usage.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="contributing.html" title="Contributing"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="usage.html" title="Usage"
accesskey="P">previous</a> |</li>
<li><a href="index.html">cookiecutter 0.6.4 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="cookiecutter-package">
<h1>cookiecutter Package<a class="headerlink" href="#cookiecutter-package" title="Permalink to this headline">¶</a></h1>
<div class="section" id="id1">
<h2><tt class="xref py py-mod docutils literal"><span class="pre">cookiecutter</span></tt> Package<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
<span class="target" id="module-cookiecutter.__init__"></span><div class="section" id="cookiecutter">
<h3>cookiecutter<a class="headerlink" href="#cookiecutter" title="Permalink to this headline">¶</a></h3>
<p>Main package for Cookiecutter.</p>
</div>
</div>
<div class="section" id="module-cookiecutter.cleanup">
<span id="cleanup-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">cleanup</span></tt> Module<a class="headerlink" href="#module-cookiecutter.cleanup" title="Permalink to this headline">¶</a></h2>
<div class="section" id="cookiecutter-cleanup">
<h3>cookiecutter.cleanup<a class="headerlink" href="#cookiecutter-cleanup" title="Permalink to this headline">¶</a></h3>
<p>Functions for cleaning up after Cookiecutter project generation occurs.</p>
<dl class="function">
<dt id="cookiecutter.cleanup.remove_repo">
<tt class="descclassname">cookiecutter.cleanup.</tt><tt class="descname">remove_repo</tt><big>(</big><em>repo_dir</em>, <em>generated_project</em><big>)</big><a class="reference internal" href="_modules/cookiecutter/cleanup.html#remove_repo"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cookiecutter.cleanup.remove_repo" title="Permalink to this definition">¶</a></dt>
<dd><p>Move the generated project to the same level as <cite>repo_dir</cite>, then delete
<cite>repo_dir</cite>.</p>
<p>Called when Cookiecutter receives a repo as an argument instead of a
project template directory.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>repo_dir</strong> – Local directory of the cloned repo.</li>
<li><strong>generated_project</strong> – Name of project that Cookiecutter just
generated. All lowercase, no spaces or funny characters.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">True if successful, else False.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
</div>
<div class="section" id="module-cookiecutter.exceptions">
<span id="exceptions-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">exceptions</span></tt> Module<a class="headerlink" href="#module-cookiecutter.exceptions" title="Permalink to this headline">¶</a></h2>
<div class="section" id="cookiecutter-exceptions">
<h3>cookiecutter.exceptions<a class="headerlink" href="#cookiecutter-exceptions" title="Permalink to this headline">¶</a></h3>
<p>All exceptions used in the Cookiecutter code base are defined here.</p>
<dl class="exception">
<dt id="cookiecutter.exceptions.CookiecutterException">
<em class="property">exception </em><tt class="descclassname">cookiecutter.exceptions.</tt><tt class="descname">CookiecutterException</tt><a class="reference internal" href="_modules/cookiecutter/exceptions.html#CookiecutterException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cookiecutter.exceptions.CookiecutterException" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
<p>Base exception class. All Cookiecutter-specific exceptions should subclass
this class.</p>
</dd></dl>
<dl class="exception">
<dt id="cookiecutter.exceptions.MissingProjectDir">
<em class="property">exception </em><tt class="descclassname">cookiecutter.exceptions.</tt><tt class="descname">MissingProjectDir</tt><a class="reference internal" href="_modules/cookiecutter/exceptions.html#MissingProjectDir"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cookiecutter.exceptions.MissingProjectDir" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#cookiecutter.exceptions.CookiecutterException" title="cookiecutter.exceptions.CookiecutterException"><tt class="xref py py-class docutils literal"><span class="pre">cookiecutter.exceptions.CookiecutterException</span></tt></a></p>
<p>Raised during cleanup when remove_repo() can’t find a generated project
directory inside of a repo.</p>
</dd></dl>
<dl class="exception">
<dt id="cookiecutter.exceptions.NonTemplatedInputDirException">
<em class="property">exception </em><tt class="descclassname">cookiecutter.exceptions.</tt><tt class="descname">NonTemplatedInputDirException</tt><a class="reference internal" href="_modules/cookiecutter/exceptions.html#NonTemplatedInputDirException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cookiecutter.exceptions.NonTemplatedInputDirException" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#cookiecutter.exceptions.CookiecutterException" title="cookiecutter.exceptions.CookiecutterException"><tt class="xref py py-class docutils literal"><span class="pre">cookiecutter.exceptions.CookiecutterException</span></tt></a></p>
<p>Raised when a project’s input dir is not templated.
The name of the input directory should always contain a string that is
rendered to something else, so that input_dir != output_dir.</p>
</dd></dl>
<dl class="exception">
<dt id="cookiecutter.exceptions.UnknownTemplateDirException">
<em class="property">exception </em><tt class="descclassname">cookiecutter.exceptions.</tt><tt class="descname">UnknownTemplateDirException</tt><a class="reference internal" href="_modules/cookiecutter/exceptions.html#UnknownTemplateDirException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cookiecutter.exceptions.UnknownTemplateDirException" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#cookiecutter.exceptions.CookiecutterException" title="cookiecutter.exceptions.CookiecutterException"><tt class="xref py py-class docutils literal"><span class="pre">cookiecutter.exceptions.CookiecutterException</span></tt></a></p>
<p>Raised when Cookiecutter cannot determine which directory is the project
template, e.g. more than one dir appears to be a template dir.</p>
</dd></dl>
</div>
</div>
<div class="section" id="module-cookiecutter.find">
<span id="find-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">find</span></tt> Module<a class="headerlink" href="#module-cookiecutter.find" title="Permalink to this headline">¶</a></h2>
<div class="section" id="cookiecutter-find">
<h3>cookiecutter.find<a class="headerlink" href="#cookiecutter-find" title="Permalink to this headline">¶</a></h3>
<p>Functions for finding Cookiecutter templates and other components.</p>
<dl class="function">
<dt id="cookiecutter.find.find_template">
<tt class="descclassname">cookiecutter.find.</tt><tt class="descname">find_template</tt><big>(</big><em>repo_dir</em><big>)</big><a class="reference internal" href="_modules/cookiecutter/find.html#find_template"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cookiecutter.find.find_template" title="Permalink to this definition">¶</a></dt>
<dd><p>Determines which child directory of <cite>repo_dir</cite> is the project template.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>repo_dir</strong> – Local directory of newly cloned repo.</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">Returns project_template:</th></tr>
<tr class="field-even field"><td> </td><td class="field-body">Relative path to project template.</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
</div>
<div class="section" id="module-cookiecutter.generate">
<span id="generate-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">generate</span></tt> Module<a class="headerlink" href="#module-cookiecutter.generate" title="Permalink to this headline">¶</a></h2>
<div class="section" id="cookiecutter-generate">
<h3>cookiecutter.generate<a class="headerlink" href="#cookiecutter-generate" title="Permalink to this headline">¶</a></h3>
<p>Functions for generating a project from a project template.</p>
<dl class="function">
<dt id="cookiecutter.generate.generate_context">
<tt class="descclassname">cookiecutter.generate.</tt><tt class="descname">generate_context</tt><big>(</big><em>config_file=u'cookiecutter.json'</em><big>)</big><a class="reference internal" href="_modules/cookiecutter/generate.html#generate_context"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cookiecutter.generate.generate_context" title="Permalink to this definition">¶</a></dt>
<dd><p>Generates the context for a Cookiecutter project template.
Loads the JSON file as a Python object, with key being the JSON filename.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>config_file</strong> (<em>filename</em>) – JSON file containing project config values.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="cookiecutter.generate.generate_file">
<tt class="descclassname">cookiecutter.generate.</tt><tt class="descname">generate_file</tt><big>(</big><em>infile</em>, <em>context</em>, <em>env</em><big>)</big><a class="reference internal" href="_modules/cookiecutter/generate.html#generate_file"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cookiecutter.generate.generate_file" title="Permalink to this definition">¶</a></dt>
<dd><ol class="arabic simple">
<li>Render the contents of infile.</li>
<li>Render the filename of infile as the name of outfile.</li>
</ol>
<p>3. Write the rendered infile to outfile.
:param infile: Input file to generate the file from.</p>
</dd></dl>
<dl class="function">
<dt id="cookiecutter.generate.generate_files">
<tt class="descclassname">cookiecutter.generate.</tt><tt class="descname">generate_files</tt><big>(</big><em>template_dir</em>, <em>context=None</em><big>)</big><a class="reference internal" href="_modules/cookiecutter/generate.html#generate_files"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cookiecutter.generate.generate_files" title="Permalink to this definition">¶</a></dt>
<dd><p>Renders the templates and saves them to files.
:param input_dir: Project template input directory.
:paramtype input_dir: directory</p>
</dd></dl>
</div>
</div>
<div class="section" id="module-cookiecutter.main">
<span id="main-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">main</span></tt> Module<a class="headerlink" href="#module-cookiecutter.main" title="Permalink to this headline">¶</a></h2>
<div class="section" id="cookiecutter-main">
<h3>cookiecutter.main<a class="headerlink" href="#cookiecutter-main" title="Permalink to this headline">¶</a></h3>
<p>Main entry point for the <cite>cookiecutter</cite> command.</p>
<p>The code in this module is also a good example of how to use Cookiecutter as a
library rather than a script.</p>
<dl class="function">
<dt id="cookiecutter.main.cookiecutter">
<tt class="descclassname">cookiecutter.main.</tt><tt class="descname">cookiecutter</tt><big>(</big><em>input_dir</em><big>)</big><a class="reference internal" href="_modules/cookiecutter/main.html#cookiecutter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cookiecutter.main.cookiecutter" title="Permalink to this definition">¶</a></dt>
<dd><p>API equivalent to using Cookiecutter at the command line.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>input_dir</strong> – A directory containing a project template dir,
or a URL to git repo.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="cookiecutter.main.main">
<tt class="descclassname">cookiecutter.main.</tt><tt class="descname">main</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/cookiecutter/main.html#main"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cookiecutter.main.main" title="Permalink to this definition">¶</a></dt>
<dd><p>Entry point for the package, as defined in setup.py.</p>
</dd></dl>
<dl class="function">
<dt id="cookiecutter.main.parse_cookiecutter_args">
<tt class="descclassname">cookiecutter.main.</tt><tt class="descname">parse_cookiecutter_args</tt><big>(</big><em>args</em><big>)</big><a class="reference internal" href="_modules/cookiecutter/main.html#parse_cookiecutter_args"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cookiecutter.main.parse_cookiecutter_args" title="Permalink to this definition">¶</a></dt>
<dd><p>Parse the command-line arguments to Cookiecutter.</p>
</dd></dl>
</div>
</div>
<div class="section" id="module-cookiecutter.utils">
<span id="utils-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">utils</span></tt> Module<a class="headerlink" href="#module-cookiecutter.utils" title="Permalink to this headline">¶</a></h2>
<div class="section" id="cookiecutter-utils">
<h3>cookiecutter.utils<a class="headerlink" href="#cookiecutter-utils" title="Permalink to this headline">¶</a></h3>
<p>Helper functions used throughout Cookiecutter.</p>
<dl class="function">
<dt id="cookiecutter.utils.make_sure_path_exists">
<tt class="descclassname">cookiecutter.utils.</tt><tt class="descname">make_sure_path_exists</tt><big>(</big><em>path</em><big>)</big><a class="reference internal" href="_modules/cookiecutter/utils.html#make_sure_path_exists"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cookiecutter.utils.make_sure_path_exists" title="Permalink to this definition">¶</a></dt>
<dd><p>Ensures that a directory exists.
:param path: A directory path.</p>
</dd></dl>
<dl class="function">
<dt id="cookiecutter.utils.unicode_open">
<tt class="descclassname">cookiecutter.utils.</tt><tt class="descname">unicode_open</tt><big>(</big><em>filename</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/cookiecutter/utils.html#unicode_open"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cookiecutter.utils.unicode_open" title="Permalink to this definition">¶</a></dt>
<dd><p>Opens a file as usual on Python 3, and with UTF-8 encoding on Python 2.
:param filename: Name of file to open.</p>
</dd></dl>
</div>
</div>
<div class="section" id="module-cookiecutter.vcs">
<span id="vcs-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">vcs</span></tt> Module<a class="headerlink" href="#module-cookiecutter.vcs" title="Permalink to this headline">¶</a></h2>
<div class="section" id="cookiecutter-vcs">
<h3>cookiecutter.vcs<a class="headerlink" href="#cookiecutter-vcs" title="Permalink to this headline">¶</a></h3>
<p>Helper functions for working with version control systems.</p>
<dl class="function">
<dt id="cookiecutter.vcs.git_clone">
<tt class="descclassname">cookiecutter.vcs.</tt><tt class="descname">git_clone</tt><big>(</big><em>repo</em><big>)</big><a class="reference internal" href="_modules/cookiecutter/vcs.html#git_clone"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#cookiecutter.vcs.git_clone" title="Permalink to this definition">¶</a></dt>
<dd><p>Clone a git repo to the current directory.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>repo</strong> – Git repo URL ending with .git.</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">cookiecutter Package</a><ul>
<li><a class="reference internal" href="#id1"><tt class="docutils literal"><span class="pre">cookiecutter</span></tt> Package</a><ul>
<li><a class="reference internal" href="#cookiecutter">cookiecutter</a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-cookiecutter.cleanup"><tt class="docutils literal"><span class="pre">cleanup</span></tt> Module</a><ul>
<li><a class="reference internal" href="#cookiecutter-cleanup">cookiecutter.cleanup</a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-cookiecutter.exceptions"><tt class="docutils literal"><span class="pre">exceptions</span></tt> Module</a><ul>
<li><a class="reference internal" href="#cookiecutter-exceptions">cookiecutter.exceptions</a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-cookiecutter.find"><tt class="docutils literal"><span class="pre">find</span></tt> Module</a><ul>
<li><a class="reference internal" href="#cookiecutter-find">cookiecutter.find</a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-cookiecutter.generate"><tt class="docutils literal"><span class="pre">generate</span></tt> Module</a><ul>
<li><a class="reference internal" href="#cookiecutter-generate">cookiecutter.generate</a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-cookiecutter.main"><tt class="docutils literal"><span class="pre">main</span></tt> Module</a><ul>
<li><a class="reference internal" href="#cookiecutter-main">cookiecutter.main</a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-cookiecutter.utils"><tt class="docutils literal"><span class="pre">utils</span></tt> Module</a><ul>
<li><a class="reference internal" href="#cookiecutter-utils">cookiecutter.utils</a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-cookiecutter.vcs"><tt class="docutils literal"><span class="pre">vcs</span></tt> Module</a><ul>
<li><a class="reference internal" href="#cookiecutter-vcs">cookiecutter.vcs</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="usage.html"
title="previous chapter">Usage</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="contributing.html"
title="next chapter">Contributing</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/cookiecutter.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="contributing.html" title="Contributing"
>next</a> |</li>
<li class="right" >
<a href="usage.html" title="Usage"
>previous</a> |</li>
<li><a href="index.html">cookiecutter 0.6.4 documentation</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2013, Audrey Roy.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div>
</body>
</html>
|