From 0bbdc6bc00b1048e9013ff65d63d738331fdb1e7 Mon Sep 17 00:00:00 2001 From: derdon Date: Sun, 15 May 2011 12:14:03 +0200 Subject: [PATCH 1/2] check also the theme dir in autoreload mode --- pelican/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pelican/__init__.py b/pelican/__init__.py index 74bb1058..c301a925 100644 --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -140,7 +140,13 @@ def main(): if args.autoreload: while True: try: - if files_changed(pelican.path, pelican.markup): + # Check source dir for changed files ending with the given + # extension in the settings. In the theme dir is no such + # restriction; all files are recursively checked if they + # have changed, no matter what extension the filenames + # have. + if files_changed(pelican.path, pelican.markup) or \ + files_changed(pelican.theme, ['']): pelican.run() time.sleep(.5) # sleep to avoid cpu load except KeyboardInterrupt: From 421a8768d410c4a34fb994ffda13a0162e5559f9 Mon Sep 17 00:00:00 2001 From: Skami18 Date: Wed, 18 May 2011 20:26:02 +0200 Subject: [PATCH 2/2] Modified setup.py: tools/pelican-themes will now be installed as a script... --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6fcfbe9c..3b12560c 100755 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ setup( packages = ['pelican'], include_package_data = True, install_requires = requires, - scripts = ['bin/pelican'], + scripts = ['bin/pelican', 'tools/pelican-themes'], classifiers = ['Development Status :: 5 - Production/Stable', 'Environment :: Console', 'License :: OSI Approved :: GNU Affero General Public License v3',