Add a way to specify CSS files. Add default settings too.

--HG--
rename : samples/themes/notmyidea/archives.html => samples/themes/notmyidea/templates/archives.html
rename : samples/themes/notmyidea/article.html => samples/themes/notmyidea/templates/article.html
rename : samples/themes/notmyidea/base.html => samples/themes/notmyidea/templates/base.html
rename : samples/themes/notmyidea/categories.html => samples/themes/notmyidea/templates/categories.html
rename : samples/themes/notmyidea/category.html => samples/themes/notmyidea/templates/category.html
rename : samples/themes/notmyidea/index.html => samples/themes/notmyidea/templates/index.html
rename : samples/themes/notmyidea/tag.html => samples/themes/notmyidea/templates/tag.html
rename : samples/themes/notmyidea/tags.html => samples/themes/notmyidea/templates/tags.html
This commit is contained in:
Alexis Metaireau 2010-08-18 16:02:06 +02:00
commit a114521914
22 changed files with 631 additions and 156 deletions

View file

@ -8,25 +8,24 @@ files to read and a template to use.
The main use case is to generate static-files-based blogs, to ease DVCSes as
storages, but it could be used with others goal in mind.""")
parser.add_argument('-p', '--path', default='content', dest='path',
parser.add_argument('-p', '--path', dest='path',
help='Path where to find the content files (default is "content").')
parser.add_argument('-t', '--templates-path', default=None, dest='templates',
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', default=None, dest='output',
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='rest', dest='markup',
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', default=None, dest='settings',
parser.add_argument('-s', '--settings', dest='settings',
help='the settings of the application. Default to None.')
if __name__ == '__main__':
args = parser.parse_args()
files = []
for root, dirs, temp_files in os.walk(args.path, followlinks=True):
files.extend([os.sep.join((root, f)) for f in temp_files])
generate_output(files, args.templates, args.output, args.markup,
generate_output(args.path, args.templates, args.output, args.markup,
args.settings)
print 'Done !'