self.default = kwargs.get('default', [] if multiple else [None])
def validate_value(self, val, strict=False):
+ val = [v.strip() if v is not None else v for v in val]
if strict and self.strict is not None:
validator = self.strict
else:
Field( DCNS('date.pd'), 'released_to_public_domain_at', as_date, required=False),
Field( DCNS('publisher'), 'publisher'),
+ Field( DCNS('subject.competence'), 'competences', multiple=True, required=False),
+ Field( DCNS('subject.curriculum'), 'curriculum', multiple=True, required=False),
+
Field( DCNS('language'), 'language'),
Field( DCNS('description'), 'description', required=False),
#
from librarian import ValidationError, NoDublinCore, ParseError, NoProvider
from librarian import RDFNS, IOFile
-from librarian.styles.wolnelektury.cover import WLCover
from librarian import dcparser
from xml.parsers.expat import ExpatError
def as_cover(self, cover_class=None, *args, **kwargs):
if cover_class is None:
+ from librarian.cover import WLCover
cover_class = WLCover
return cover_class(self.book_info, *args, **kwargs).output_file()
maintainer_email='radoslaw.czajka@nowoczesnapolska.org.pl',
url='http://github.com/fnp/librarian',
packages=['librarian'],
- package_data={'librarian': ['xslt/*.xslt', 'epub/*', 'mobi/*', 'pdf/*', 'fb2/*', 'fonts/*', 'res/*'] +
- whole_tree(os.path.join(os.path.dirname(__file__), 'librarian'), 'font-optimizer')},
+ package_data={'librarian': ['xslt/*.xslt', 'epub/*', 'mobi/*', 'pdf/*', 'fb2/*', 'fonts/*'] +
+ whole_tree(os.path.join(os.path.dirname(__file__), 'librarian'), 'font-optimizer') +
+ whole_tree(os.path.join(os.path.dirname(__file__), 'librarian'), 'res')},
include_package_data=True,
install_requires=['lxml>=2.2'],
scripts=['scripts/book2html',