Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
""" % value
elif action=='build_group':
fb = FB(cherrypy.session['access_token'])
fb.rebuild_group(value, do_snaps=True)
content = """
Step 3: You're done!
--------------------
You can now see the archive [here](/group/%s)
""" % value
return html(markdown2.markdown(content))
# Starting things up
if __name__ == '__main__':
conf = {
'/'+PATH_IMAGES: {'tools.staticdir.on': True, 'tools.staticdir.dir': '/Users/dddd/Documents/dev/social-archives/archives'},
'/css': {'tools.staticdir.on': True, 'tools.staticdir.dir': '/Users/dddd/Documents/dev/social-archives/css'},
}
cherrypy.config.update({
'tools.sessions.on': True
})
app = cherrypy.tree.mount(ArchiveServer(), '/')
# for Facebook authentication
fb_auth = cherrypy.tree.mount(FBAuth(), '/auth/fb/')
cherrypy.quickstart(app,config=conf)
def application(environ, start_response):
conf = {
'/'+PATH_IMAGES: {'tools.staticdir.on': True, 'tools.staticdir.dir': SERVER_IMAGES},
'/css': {'tools.staticdir.on': True, 'tools.staticdir.dir': SERVER_CSS},
}
cherrypy.config.update({
'tools.sessions.on': True,
'tools.sessions.storage_type': 'file',
'tools.sessions.storage_path': SERVER_SESSIONS,
'server.socket_port': SERVER_PORT
})
app = cherrypy.tree.mount(ArchiveServer(), '/', config=conf)
return cherrypy.tree(environ, start_response)
def tnurl(path):
path = tn(path)
return re.sub('^'+DIR_BASE+'/', '/'+PATH_IMAGES+'/', path)