annotate piecrust/__init__.py @ 415:0e9a94b7fdfa

bake: Improve bake record information. * Store things in the bake record that require less interaction between the master process and the workers. For instance, don't store the paginator object in the render pass info -- instead, just store whether pagination was used, and whether it had more items. * Simplify information passing between workers and bake passes by saving the rendering info to the JSON cache. This means the "render first sub" job doesn't have to return anything except errors now. * Add more performance counter info.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 20 Jun 2015 19:23:16 -0700
parents 869a206facd5
children 9ccc933ac2c7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
1
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
2 CACHE_DIR = '_cache'
36
485682a6de50 New site layout support.
Ludovic Chabant <ludovic@chabant.com>
parents: 3
diff changeset
3 ASSETS_DIR = 'assets'
485682a6de50 New site layout support.
Ludovic Chabant <ludovic@chabant.com>
parents: 3
diff changeset
4 TEMPLATES_DIR = 'templates'
485682a6de50 New site layout support.
Ludovic Chabant <ludovic@chabant.com>
parents: 3
diff changeset
5 THEME_DIR = 'theme'
3
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
6
36
485682a6de50 New site layout support.
Ludovic Chabant <ludovic@chabant.com>
parents: 3
diff changeset
7 CONFIG_PATH = 'config.yml'
485682a6de50 New site layout support.
Ludovic Chabant <ludovic@chabant.com>
parents: 3
diff changeset
8 THEME_CONFIG_PATH = 'theme_config.yml'
273
d70a4adb61dd themes: Add the `chef themes` command
Ludovic Chabant <ludovic@chabant.com>
parents: 100
diff changeset
9 THEME_INFO_PATH = 'theme_info.yml'
415
0e9a94b7fdfa bake: Improve bake record information.
Ludovic Chabant <ludovic@chabant.com>
parents: 307
diff changeset
10 ASSET_DIR_SUFFIX = '-assets'
3
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
11
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
12 DEFAULT_FORMAT = 'markdown'
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
13 DEFAULT_TEMPLATE_ENGINE = 'jinja2'
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
14 DEFAULT_POSTS_FS = 'flat'
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
15 DEFAULT_DATE_FORMAT = '%b %d, %Y'
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
16 DEFAULT_THEME_SOURCE = 'http://bitbucket.org/ludovicchabant/'
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
17
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
18 PIECRUST_URL = 'http://bolt80.com/piecrust/'
f485ba500df3 Gigantic change to basically make PieCrust 2 vaguely functional.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
19
69
cb1ed436642c Always use version generated by `setup.py`. Better version generation.
Ludovic Chabant <ludovic@chabant.com>
parents: 36
diff changeset
20 try:
cb1ed436642c Always use version generated by `setup.py`. Better version generation.
Ludovic Chabant <ludovic@chabant.com>
parents: 36
diff changeset
21 from piecrust.__version__ import APP_VERSION
cb1ed436642c Always use version generated by `setup.py`. Better version generation.
Ludovic Chabant <ludovic@chabant.com>
parents: 36
diff changeset
22 except ImportError:
cb1ed436642c Always use version generated by `setup.py`. Better version generation.
Ludovic Chabant <ludovic@chabant.com>
parents: 36
diff changeset
23 APP_VERSION = 'unknown'
cb1ed436642c Always use version generated by `setup.py`. Better version generation.
Ludovic Chabant <ludovic@chabant.com>
parents: 36
diff changeset
24
100
69d5eecfa449 Better `prepare` command, with templates and help topics.
Ludovic Chabant <ludovic@chabant.com>
parents: 69
diff changeset
25 import os.path
69d5eecfa449 Better `prepare` command, with templates and help topics.
Ludovic Chabant <ludovic@chabant.com>
parents: 69
diff changeset
26 RESOURCES_DIR = os.path.join(os.path.dirname(__file__), 'resources')
69d5eecfa449 Better `prepare` command, with templates and help topics.
Ludovic Chabant <ludovic@chabant.com>
parents: 69
diff changeset
27