add dumping support
This commit is contained in:
parent
f89a3d8601
commit
825d912e7c
6
bink
6
bink
@ -5,6 +5,7 @@ from glob import glob
|
||||
from time import time_ns
|
||||
import os
|
||||
from collections import OrderedDict
|
||||
from sys import argv
|
||||
|
||||
home = os.path.expanduser("~/.bink")
|
||||
my_user = home.split("/")[2]
|
||||
@ -51,3 +52,8 @@ def create_post(title, body):
|
||||
}
|
||||
with open(f"{home}/{time_ns()}", "w") as f:
|
||||
json.dump(thread, f, indent=2)
|
||||
|
||||
if "dump" in argv:
|
||||
with open("/dev/stdout", "w") as f:
|
||||
json.dump(generate_feed(), f)
|
||||
exit()
|
Loading…
x
Reference in New Issue
Block a user