Permalink
Browse files

Remove 'The Contributors' as name of the Author

  • Loading branch information...
1 parent 82aa83c commit 6fa864bda0c9dd1008fdf59036b1632a09ddce06 @aerkalov aerkalov committed Jun 12, 2013
Showing with 11 additions and 2 deletions.
  1. +11 −2 lib/booki/editor/common.py
View
@@ -315,11 +315,20 @@ def _format_metadata(book):
else:
lastmod = mods[0].strftime("%Y.%m.%d-%H.%M")
+ author = 'Author'
+ if book.owner:
+ if book.owner.first_name:
+ author = book.owner.first_name
+
+ language = 'en'
+ if book.language:
+ language = getattr(book.language, 'abbrevation', 'en')
+
# add some default values if values are not otherwise specified
for namespace, keyword, scheme, value in (
(DC, "publisher", "", DEFAULT_PUBLISHER),
- (DC, "language", "", "en"),
- (DC, "creator", "", "The Contributors"),
+ (DC, "language", "", language),
+ (DC, "creator", "", author),
(DC, "title", "", book.title),
(DC, "date", "start", created),
(DC, "date", "last-modified", lastmod),

0 comments on commit 6fa864b

Please sign in to comment.