# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from os.path import abspath, dirname, join
import tempfile
from traceback import extract_stack
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from os.path import abspath, dirname, join
import tempfile
from traceback import extract_stack
- CATALOGUE_DONT_BUILD=set(['pdf', 'mobi', 'epub', 'txt', 'fb2', 'cover']),
+ CATALOGUE_DONT_BUILD={'pdf', 'mobi', 'epub', 'txt', 'fb2', 'cover'},
def __init__(self, first_names, last_name):
self.first_names = first_names
def __init__(self, first_names, last_name):
self.first_names = first_names
_empty_fields = ['cover_url', 'variant_of']
# allow single definition for multiple-value fields
_salias = {
_empty_fields = ['cover_url', 'variant_of']
# allow single definition for multiple-value fields
_salias = {
def info_args(title, language=None):
""" generate some keywords for comfortable BookInfoCreation """
def info_args(title, language=None):
""" generate some keywords for comfortable BookInfoCreation """
mod_path = extract_stack(limit=2)[0][0]
f_path = join(dirname(abspath(mod_path)), 'files', path)
return f_path
mod_path = extract_stack(limit=2)[0][0]
f_path = join(dirname(abspath(mod_path)), 'files', path)
return f_path