author = fullname count
# Full list of book columns:
# book = title series ser_no archive file size lib_id deleted date
-# author1
+# author1 author_list
# author1 is just one author from the list if there are more than 1
+# author_list is a comma-separated list of full names
# Default column is just title
book = ser_no title
[download]
# Download formats:
-# %a - author1 (one of)
+# %A - authors (comma-separated fullnames)
+# %a - author1 (one of, fullname)
# %e - file extension
# %f - file name in archive
# %G - genre (one of), name
def author1(self):
return self.authors[0].fullname
+ @property
+ def author_list(self):
+ return u', '.join([a.fullname for a in self.authors])
+
class BookGenre(SQLObject):
class sqlmeta:
got_percent = False
if c == 'a':
new_format = u'%(author1)s'
+ elif c == 'A':
+ new_format = u'%(authors)s'
elif c == 'e':
new_format = u'%(extension)s'
elif c == 'f':
raise ValueError('Bad format: "%s"' % compiled_format)
bdict = {}
bdict['author1'] = book.author1
+ bdict['authors'] = book.author_list
bdict['extension'] = book.extension.name
bdict['file'] = book.file
genre = book.genres[0]