From 55759e1ca540599d88e6492a1b08dee3ebbb3721 Mon Sep 17 00:00:00 2001 From: Mike Crute Date: Tue, 7 Sep 2010 23:07:11 -0400 Subject: Moving metabuild for no good reason --- Makefile | 17 ----------------- bin/metabuild.py | 38 ++++++++++++++++++++++++++++++++++++++ metabuild.py | 23 ----------------------- 3 files changed, 38 insertions(+), 40 deletions(-) delete mode 100644 Makefile create mode 100755 bin/metabuild.py delete mode 100755 metabuild.py diff --git a/Makefile b/Makefile deleted file mode 100644 index bc29e82..0000000 --- a/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -WEB_ROOT=/srv/www/crute.org/mike/htdocs - -site: build-site sync -css: build-css sync - -build-site: - ventriloquy/metabuild.py - -sync: - rsync -auvz rendered/ $(WEB_ROOT) - chgrp -R www-data $(WEB_ROOT) - chmod -R g+r $(WEB_ROOT) - find $(WEB_ROOT) -type d -exec chmod g+x {} \; - -build-css: - python downloads/cmpcss resources/site.css > resources/site-min.css - cp resources/site-min.css rendered/resources/site-min.css diff --git a/bin/metabuild.py b/bin/metabuild.py new file mode 100755 index 0000000..a9f1343 --- /dev/null +++ b/bin/metabuild.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python +# vim: set filencoding=utf8 +""" +Website Build Script + +@author: Mike Crute (mcrute@ag.com) +@organization: American Greetings Interactive +@date: June 03, 2010 + +TODO: + * Site Map Builder + * Full Blog Builder + * Index page + * Archive page + * Feeds +""" +import sys + +from os.path import dirname, realpath +sys.path.insert(0, dirname(dirname(realpath(__file__)))) +del dirname, realpath + +from site_builder import build_all +from site_builder.blogbuilder import build_blog + +if __name__ == '__main__': + args = sys.argv[1:] + + if len(args) != 3: + print "{0} (blog|site) input_dir output_dir".format(sys.argv[0]) + sys.exit(1) + else: + action, input_dir, output_dir = args + + if action == 'site': + build_all(input_dir, output_dir) + elif action == 'blog': + build_blog(input_dir, output_dir) diff --git a/metabuild.py b/metabuild.py deleted file mode 100755 index 6508cbb..0000000 --- a/metabuild.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python -# vim: set filencoding=utf8 -""" -Website Build Script - -@author: Mike Crute (mcrute@ag.com) -@organization: American Greetings Interactive -@date: June 03, 2010 - -TODO: - * Site Map Builder - * Full Blog Builder - * Index page - * Archive page - * Feeds -""" - -if __name__ == '__main__': - from site_builder import build_all - from site_builder.blogbuilder import build_blog - build_all('page_source', 'rendered') - build_blog('page_source/blog', 'rendered/blog') - build_blog('page_source/personal_blog', 'rendered/personal_blog') -- cgit v1.2.3