@@ -0,0 +1,690 @@
+#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0Aimport argparse%0A%0Afrom peanut import site%0A%0A%0Adef cli():%0A    %22%22%22Command line interface%0A    %22%22%22%0A    parser = argparse.ArgumentParser(description='Static blog generator')%0A%0A    parser.add_argument('dir', nargs='?', help='Blog directory')%0A    parser.add_argument('-c', '--config', help='Config file path')%0A%0A    args = parser.parse_args()%0A%0A    return %7B%0A        'directory': args.dir or '.',%0A        'config_path': args.config or None%0A    %7D%0A%0Adef main():%0A    %22%22%22Read command line arguments and generate site%0A    %22%22%22%0A    args = cli()%0A    blog = site.Site(args%5B'directory'%5D, args%5B'config_path'%5D)%0A    blog.generate()%0A%0Aif __name__ == '__main__':%0A    main()%0A

Add command line tool