mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
--HG-- rename : pelican/pelican => bin/pelican rename : pelican/themes/archives.html => pelican/themes/templates/archives.html rename : pelican/themes/article.html => pelican/themes/templates/article.html rename : pelican/themes/base.html => pelican/themes/templates/base.html rename : pelican/themes/categories.html => pelican/themes/templates/categories.html rename : pelican/themes/category.html => pelican/themes/templates/category.html rename : pelican/themes/index.html => pelican/themes/templates/index.html rename : pelican/themes/tag.html => pelican/themes/templates/tag.html rename : pelican/themes/tags.html => pelican/themes/templates/tags.html
27 lines
1.2 KiB
Python
Executable file
27 lines
1.2 KiB
Python
Executable file
#!/usr/local/bin/python2.7
|
|
from pelican.generator import generate_output
|
|
import argparse
|
|
|
|
parser = argparse.ArgumentParser(description="""A tool to generate a
|
|
static blog, with restructured text input files.""")
|
|
|
|
parser.add_argument('-p', '--path', dest='path',
|
|
help='Path where to find the content files (default is "content").')
|
|
parser.add_argument('-t', '--templates-path', dest='templates',
|
|
help='Path where to find the templates. If not specified, will uses the'
|
|
' ones included with pelican.')
|
|
parser.add_argument('-o', '--output', dest='output',
|
|
help='Where to output the generated files. If not specified, a directory'
|
|
' will be created, named "output" in the current path.')
|
|
parser.add_argument('-m', '--markup', default='rst', dest='markup',
|
|
help='the markup language to use. Currently only ReSTreucturedtext is'
|
|
' available.')
|
|
parser.add_argument('-s', '--settings', dest='settings',
|
|
help='the settings of the application. Default to None.')
|
|
|
|
if __name__ == '__main__':
|
|
args = parser.parse_args()
|
|
files = []
|
|
generate_output(args.path, args.templates, args.output, args.markup,
|
|
args.settings)
|
|
print 'Done !'
|