@ -91,6 +91,18 @@ def init():
# init db
db.create_tables([Post, Profile, Comment, Notification, Moderator])
@app.cli.command("post_reddit")
@click.argument('last_hours')
def post_reddit(last_hours):
posts = Post.select().where(
Post.approved==True,
Post.to_reddit==False
).order_by(Post.timestamp.asc())
for p in posts:
if p.hours_elapsed() < int(last_hours):
make_post(p)
return
@app.cli.command("create_accounts")
def create_accounts():
wallet = wownero.Wallet()