From: Zachary Vance Date: Wed, 3 Jul 2024 22:06:20 +0000 (-0400) Subject: new rsync X-Git-Url: https://git.za3k.com/?a=commitdiff_plain;h=0de0b5884ea3733565301d0667f2e480cf977754;p=blog.git new rsync --- diff --git a/blog b/blog index d3839bc..e0ef456 100755 --- a/blog +++ b/blog @@ -14,6 +14,8 @@ not documented. Other than that I think it's pretty nice! """ +# TODO: Pagination for main blog, categories, tag + import sys sys.dont_write_bytecode = True @@ -315,6 +317,9 @@ class Blog(PseudoMap): 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", @@ -336,6 +341,7 @@ if __name__ == "__main__": if args.all: blog.clean() blog.generate_all() + blog.publish() else: blog.updates_happened(args.changed_files)