Mercurial > piecrust2
comparison piecrust/commands/builtin/baking.py @ 1032:54159951d97a
bake: Add `--sources` argument.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 16 Jan 2018 08:38:06 -0800 |
parents | 3c669bb9498e |
children | fe0af94ca757 |
comparison
equal
deleted
inserted
replaced
1031:c1e062843464 | 1032:54159951d97a |
---|---|
24 '-f', '--force', | 24 '-f', '--force', |
25 help="Force re-baking the entire website.", | 25 help="Force re-baking the entire website.", |
26 action='store_true') | 26 action='store_true') |
27 parser.add_argument( | 27 parser.add_argument( |
28 '-p', '--pipelines', | 28 '-p', '--pipelines', |
29 help="The pipelines to run.", | 29 help="Specifies the pipelines to run.", |
30 action='append') | |
31 parser.add_argument( | |
32 '-s', '--sources', | |
33 help="Specifies the content sources to run.", | |
30 action='append') | 34 action='append') |
31 parser.add_argument( | 35 parser.add_argument( |
32 '-w', '--workers', | 36 '-w', '--workers', |
33 help="The number of worker processes to spawn.", | 37 help="The number of worker processes to spawn.", |
34 type=int, default=-1) | 38 type=int, default=-1) |
138 forbidden_pipelines = None | 142 forbidden_pipelines = None |
139 | 143 |
140 baker = Baker( | 144 baker = Baker( |
141 ctx.appfactory, ctx.app, out_dir, | 145 ctx.appfactory, ctx.app, out_dir, |
142 force=ctx.args.force, | 146 force=ctx.args.force, |
147 allowed_sources=ctx.args.sources, | |
143 allowed_pipelines=allowed_pipelines, | 148 allowed_pipelines=allowed_pipelines, |
144 forbidden_pipelines=forbidden_pipelines) | 149 forbidden_pipelines=forbidden_pipelines) |
145 records = baker.bake() | 150 records = baker.bake() |
146 | 151 |
147 return records | 152 return records |