]> git.phdru.name Git - m_librarian.git/commitdiff
Output (list of) genres for a book
authorOleg Broytman <phd@phdru.name>
Thu, 19 May 2016 18:45:20 +0000 (21:45 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 19 May 2016 18:45:20 +0000 (21:45 +0300)
docs-ru/command_line.rst
docs/command_line.rst
m_librarian/translations/ru_RU.mo
m_librarian/translations/ru_RU.po
scripts/ml-search.py

index 90990cf9a2bae94b3bd43e28c0d9c8eddb4c96c4..6e36cbe5cc8e827abed0a56ef26dd406bb1783d0 100644 (file)
@@ -114,7 +114,7 @@ ml-search.py
                            получить ещё больше деталей
 
 По умолчанию программы выводит список заголовков найденных книг. При
                            получить ещё больше деталей
 
 По умолчанию программы выводит список заголовков найденных книг. При
-использовании опции `-d` также выводится список авторов.
+использовании опции `-d` также выводится список авторов и жанров.
 
 Поиск расширений
 ^^^^^^^^^^^^^^^^
 
 Поиск расширений
 ^^^^^^^^^^^^^^^^
index 42bae7e858a0f0049eee64ba5e19dfc67c2d75bc..c65e11b3aa0d76248dcda18144dca85d2f2f40e4 100644 (file)
@@ -112,7 +112,7 @@ Options::
                            repeat for even more details
 
 By default the program prints only titles of the found book. With one
                            repeat for even more details
 
 By default the program prints only titles of the found book. With one
-option `-d` it also prints the list of authors.
+option `-d` it also prints the list of authors and genres.
 
 Extension search
 ^^^^^^^^^^^^^^^^
 
 Extension search
 ^^^^^^^^^^^^^^^^
index 6fa4c1b28ae4bebe0f915af03b0488b97b71fc2a..473cfac6b614ff941b4311b5da87e03cde97288a 100644 (file)
Binary files a/m_librarian/translations/ru_RU.mo and b/m_librarian/translations/ru_RU.mo differ
index 4a9f9047df272b26aa9124e042dc4dcaeea791e1..4f084980bb4ef81a5f76a94e2f0d8c313d2d7a7f 100644 (file)
@@ -17,5 +17,8 @@ msgstr ""
 msgid "Author(s)"
 msgstr "Автор(ы)"
 
 msgid "Author(s)"
 msgstr "Автор(ы)"
 
+msgid "Genre(s)"
+msgstr "Жанр(ы)"
+
 msgid "books"
 msgstr "книг"
 msgid "books"
 msgstr "книг"
index 81d74f9a2cdb1a35fa396880b6ba767a3817166e..debfee52aa0ccae1261e8f2426ae7883225d3806 100755 (executable)
@@ -70,6 +70,10 @@ def _search_books(case_sensitive, search_type, args):
                 fullname = u' '.join(names)
                 print fullname.encode(default_encoding),
             print
                 fullname = u' '.join(names)
                 print fullname.encode(default_encoding),
             print
+            print " ", _("Genre(s)"), ":",
+            for genre in book.genres:
+                print (genre.title or genre.name).encode(default_encoding),
+            print
 
 
 def _search_extensions(case_sensitive, search_type, args):
 
 
 def _search_extensions(case_sensitive, search_type, args):