27 lines
648 B
Python
Executable file
27 lines
648 B
Python
Executable file
#!/usr/bin/env python3.4
|
|
|
|
import os, re
|
|
from flask.ext.mongoengine import MongoEngine
|
|
import datetime
|
|
import base64
|
|
|
|
from bookie import *
|
|
|
|
app.config["MONGODB_DB"] = "bookie"
|
|
db = MongoEngine(app)
|
|
|
|
for b in Bookmark.objects(archived_text_needed = True):
|
|
print("Archiving text for " + b.short)
|
|
try:
|
|
update_archived_text(b)
|
|
print("Text archived.")
|
|
except:
|
|
print("Text archive failed.")
|
|
|
|
for b in Bookmark.objects(archived_image_needed = True):
|
|
print("Archiving image for " + b.short)
|
|
try:
|
|
update_archived_image(b)
|
|
print("image archived.")
|
|
except:
|
|
print("image archive failed.")
|