diff options
author | rusinthread <rusinthread@cock.li> | 2017-01-18 16:57:44 +0300 |
---|---|---|
committer | rusinthread <rusinthread@cock.li> | 2017-01-18 16:57:44 +0300 |
commit | 73011a22c2be57079a40bec230cd9f80bfc829af (patch) | |
tree | 87c6b89e86610726906205a150d3061a35b71f0c /gen_md.py | |
parent | 6f98b826299808f446c88be993ef244b31cf4431 (diff) |
add new ciphertexts
Diffstat (limited to 'gen_md.py')
-rwxr-xr-x | gen_md.py | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -2,6 +2,7 @@ import sys import os import shutil +import argparse import subprocess from pprint import pprint from data_lib import load_data, decode_auto @@ -41,14 +42,19 @@ def gen_previews(): resize(img_path, img_preview_path) def main(): + parser = argparse.ArgumentParser() + parser.add_argument('--with-previews', action='store_true') + args = parser.parse_args() + data = load_data(sort='date') - print("Generating previews (don't forget to git add them)...") - gen_previews() + if args.with_previews: + print("Generating previews (don't forget to git add them)...") + gen_previews() print("Generating page...") - buf = [] + for post in data: cipher_type = post['type'] if 'type' in post else 1 if cipher_type in (1, 2): |