示例#1
0
文件: views.py 项目: Foxboron/FoxBlog
def init():
    global profile_link
    global s
    global t
    global vc
    global viewcount
    with open("config.conf", "r") as j:
        n = json.loads(j.read())
        profile_link = hashlib.md5(n["mail"]).hexdigest()
    profile_link = "http://www.gravatar.com/avatar/%s?s=250" % profile_link
    s = GitHandler(n["Github"], n["Repo"], n["client_id"], n["client_secret"])
    s.fetch_posts()
    s.fetch_sites()
    t = time.time()
    viewcount = {}