def init_source():
 codename = crypto_util.genrandomid()
 filesystem_id = crypto_util.hash_codename(codename)
 journalist_filename = crypto_util.display_id()
 source = db.Source(filesystem_id, journalist_filename)
 db.db_session.add(source)
 db.db_session.commit()
 os.mkdir(store.path(source.filesystem_id))
 crypto_util.genkeypair(source.filesystem_id, codename)
 return (source, codename)

def init_source ( ) : codename = crypto_util . genrandomid ( ) filesystem_id = crypto_util . hash_codename ( codename ) journalist_filename = crypto_util . display_id ( ) source = db . Source ( filesystem_id , journalist_filename ) db . db_session . add ( source ) db . db_session . commit ( ) os . mkdir ( store . path ( source . filesystem_id ) ) crypto_util . genkeypair ( source . filesystem_id , codename ) return ( source , codename )
initialize a source: create their database record .