forked from gaybro8777/diecutter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathINSTALL
More file actions
111 lines (68 loc) · 2.16 KB
/
INSTALL
File metadata and controls
111 lines (68 loc) · 2.16 KB
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
#######################
Install, configure, run
#######################
This project is open-source, published under BSD license.
See :doc:`/about/license` for details.
If you want to install a development environment, you should go to
:doc:`/contributing` documentation.
*************
Prerequisites
*************
* `Python`_ version 2.7.
*******
Install
*******
Install "diecutter" package with your favorite tool. As an example with `pip`_:
.. code-block:: sh
pip install diecutter
*********
Configure
*********
Use `diecutter's online demo`_ to generate your local diecutter configuration:
.. code-block:: sh
# Adapt "YOUR_TEMPLATE_DIR"!
wget -O diecutter.ini --post-data "template_dir=YOUR_TEMPLATE_DIR" http://diecutter.io/api/diecutter.ini
diecutter.service
=================
Python path to service class that implements `diecutter` API.
Default is ``diecutter.local.LocalService``.
Builtin services are:
* ``diecutter.local.LocalService``
* ``diecutter.github.GithubService``
diecutter.engine
================
Code of the default engine to use to render files.
Default is ``jinja2``.
diecutter.filename_engine
=========================
Code of the default engine to use to render filenames.
Default is ``filename``.
diecutter.engine.*
==================
Mapping between engine codes and Python path to the template engine class.
Defaults:
* django: ``piecutter.engines.django:DjangoEngine``
* filename: ``piecutter.engines.filename:FilenameEngine``
* jinja2: ``piecutter.engines.jinja:Jinja2Engine``
.. note::
`diecutter` itself does not implement engines. Engines are implemented as
part of `piecutter <https://piecutter.readthedocs.io>`_.
***
Run
***
``pserve`` (paster's server) should have been installed automatically as part
of diecutter's dependencies. Use it to run the service:
.. code-block:: sh
pserve diecutter.ini --reload
*****
Check
*****
Check it works:
.. code-block:: sh
curl http://localhost:8106
You should get an "hello" with diecutter's version.
.. rubric:: References
.. target-notes::
.. _`Python`: http://python.org
.. _`pip`: https://pypi.python.org/pypi/pip/
.. _`diecutter's online demo`: http://diecutter.io/