mirror of
https://github.com/Lumither/nocturne.git
synced 2026-10-17 10:26:21 +00:00
28 lines
509 B
Python
Executable File
28 lines
509 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import argparse
|
|
|
|
import rich
|
|
|
|
from templates.post import BlogPost
|
|
from utils.cache import init_cache
|
|
from utils.index import build_post_idx
|
|
|
|
|
|
def main():
|
|
# if args.new:
|
|
# new_post()
|
|
init_cache()
|
|
build_post_idx()
|
|
bp = BlogPost()
|
|
bp.init()
|
|
|
|
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("-n", "--new", help="Create a post with build-in template", type=str)
|
|
args = parser.parse_args(namespace=rich)
|
|
# todo: cli
|
|
|
|
if __name__ == '__main__':
|
|
main()
|