diff options
Diffstat (limited to 'bin/metabuild.py')
-rwxr-xr-x | bin/metabuild.py | 38 |
1 files changed, 38 insertions, 0 deletions
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 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # vim: set filencoding=utf8 | ||
3 | """ | ||
4 | Website Build Script | ||
5 | |||
6 | @author: Mike Crute (mcrute@ag.com) | ||
7 | @organization: American Greetings Interactive | ||
8 | @date: June 03, 2010 | ||
9 | |||
10 | TODO: | ||
11 | * Site Map Builder | ||
12 | * Full Blog Builder | ||
13 | * Index page | ||
14 | * Archive page | ||
15 | * Feeds | ||
16 | """ | ||
17 | import sys | ||
18 | |||
19 | from os.path import dirname, realpath | ||
20 | sys.path.insert(0, dirname(dirname(realpath(__file__)))) | ||
21 | del dirname, realpath | ||
22 | |||
23 | from site_builder import build_all | ||
24 | from site_builder.blogbuilder import build_blog | ||
25 | |||
26 | if __name__ == '__main__': | ||
27 | args = sys.argv[1:] | ||
28 | |||
29 | if len(args) != 3: | ||
30 | print "{0} (blog|site) input_dir output_dir".format(sys.argv[0]) | ||
31 | sys.exit(1) | ||
32 | else: | ||
33 | action, input_dir, output_dir = args | ||
34 | |||
35 | if action == 'site': | ||
36 | build_all(input_dir, output_dir) | ||
37 | elif action == 'blog': | ||
38 | build_blog(input_dir, output_dir) | ||