# Path: action/base_manager.py
# class BaseManager:
#     COOKIE_PATH = '/'
#     def delete_cookie(self, name):
#     def get_cookie(self, name):
#     def get_form(self, name, strip_value=True):
#     def set_cookie(self, name, value, httponly=True, expires=None):
# 
# Path: entity/recipe.py
# class Recipe:
#     def __init__(self, categories=[], description='', id=None, info='',
#                  ingredients='', rating=None, serving_size='', title='',
#                  tags=[], urls=[], synonyms=[], images=[], author=None):
#     def __str__(self):
#     def count_all(db):
#     def delete(self, db):
#     def find_all(db):
#     def find_category(db, category):
#     def find_pk(db, id):
#     def find_random(db, num):
#     def from_row(db, row):
#     def is_new(self):
#     def title_exists(db, title):
#     def save(self, db):
#     def __delete_images(self, db, force=False):
#     def __delete_recipe_has_category(self, db):
#     def __delete_recipe_has_tag(self, db):
#     def __delete_synonyms(self, db):
#     def __delete_urls(self, db):
#     def __generic_find(db, query, params):
# 
# Path: helper/url.py
# class Url:
#     def from_category(category, absolute=None):
#     def from_css(css_file, absolute=None):
#     def from_img(img_file, absolute=None):
#     def from_js(js_file, absolute=None):
#     def from_path(path_parts, absolute=None, filter_chars=False):
#     def from_recipe(recipe, absolute=None):
#     def search(search_text, absolute=None):
#     def slugify(text):


import bottle
import io
import json
import zipfile
from action import base_manager
from entity import recipe as recipe_entity
from helper import url as url_helper
#!/usr/bin/python
# -*- coding: utf-8 -*-



class ExportManager(base_manager.BaseManager):
    """ Handles export actions.

    Member:
    db -- The database connection.
    """

    def __init__(self, db):
        self.db = db

    def action(self, static_path, image_path, id, recipe_json):
        """ Exports recipe with given id. Returns download stream. """


# Path: action/base_manager.py
# class BaseManager:
#     COOKIE_PATH = '/'
#     def delete_cookie(self, name):
#     def get_cookie(self, name):
#     def get_form(self, name, strip_value=True):
#     def set_cookie(self, name, value, httponly=True, expires=None):
# 
# Path: entity/recipe.py
# class Recipe:
#     def __init__(self, categories=[], description='', id=None, info='',
#                  ingredients='', rating=None, serving_size='', title='',
#                  tags=[], urls=[], synonyms=[], images=[], author=None):
#     def __str__(self):
#     def count_all(db):
#     def delete(self, db):
#     def find_all(db):
#     def find_category(db, category):
#     def find_pk(db, id):
#     def find_random(db, num):
#     def from_row(db, row):
#     def is_new(self):
#     def title_exists(db, title):
#     def save(self, db):
#     def __delete_images(self, db, force=False):
#     def __delete_recipe_has_category(self, db):
#     def __delete_recipe_has_tag(self, db):
#     def __delete_synonyms(self, db):
#     def __delete_urls(self, db):
#     def __generic_find(db, query, params):
# 
# Path: helper/url.py
# class Url:
#     def from_category(category, absolute=None):
#     def from_css(css_file, absolute=None):
#     def from_img(img_file, absolute=None):
#     def from_js(js_file, absolute=None):
#     def from_path(path_parts, absolute=None, filter_chars=False):
#     def from_recipe(recipe, absolute=None):
#     def search(search_text, absolute=None):
#     def slugify(text):


# Path: action/export_manager.py
import bottle
import io
import json
import zipfile
from action import base_manager
from entity import recipe as recipe_entity
from helper import url as url_helper

#!/usr/bin/python
# -*- coding: utf-8 -*-



class ExportManager(base_manager.BaseManager):
    """ Handles export actions.

    Member:
    db -- The database connection.
    """

    def __init__(self, db):
        self.db = db

    def action(self, static_path, image_path, id, recipe_json):
        """ Exports recipe with given id. Returns download stream. """


        recipe = recipe_entity.Recipe.find_pk(self.db, id)