"""
Generates blog.za3k.com from source files.
Source files consist of a YAML "front material", and markdown body.
-Mostly they have been exported from wordpress by wordpress2frontmaterial.py.
+Mostly they have been exported from wordpress.
This is one big honking violation of:
assert self.destination
os.system("rm -rf \"{}\"/*".format(self.destination))
- def publish(self):
- os.system("rsync -r --delete {destination}/ germinate:/var/www/blog".format(destination=self.destination))
-
if __name__ == "__main__":
parser = argparse.ArgumentParser(
prog="blog",
description="Generate za3k's blog from markdown files with YAML frontmatter and some templates",
)
parser.add_argument("-l", "--local", action='store_true', help="use relative paths for links")
- parser.add_argument("-p", "--publish", action='store_true', help="publish to blog2.za3k.com")
parser.add_argument("-c", "--config", help="location of config file", default="config.yaml")
args = parser.parse_args()
blog.clean()
blog.generate_all()
- if not args.local and args.publish:
- blog.publish()