From: Oleg Broytman Date: Thu, 19 May 2016 18:45:20 +0000 (+0300) Subject: Output (list of) genres for a book X-Git-Tag: 0.0.6~5 X-Git-Url: https://git.phdru.name/?p=m_librarian.git;a=commitdiff_plain;h=f085c8a64b9d9bee394234ee4a03296b5a1206bd Output (list of) genres for a book --- diff --git a/docs-ru/command_line.rst b/docs-ru/command_line.rst index 90990cf..6e36cbe 100644 --- a/docs-ru/command_line.rst +++ b/docs-ru/command_line.rst @@ -114,7 +114,7 @@ ml-search.py получить ещё больше деталей По умолчанию программы выводит список заголовков найденных книг. При -использовании опции `-d` также выводится список авторов. +использовании опции `-d` также выводится список авторов и жанров. Поиск расширений ^^^^^^^^^^^^^^^^ diff --git a/docs/command_line.rst b/docs/command_line.rst index 42bae7e..c65e11b 100644 --- a/docs/command_line.rst +++ b/docs/command_line.rst @@ -112,7 +112,7 @@ Options:: 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 ^^^^^^^^^^^^^^^^ diff --git a/m_librarian/translations/ru_RU.mo b/m_librarian/translations/ru_RU.mo index 6fa4c1b..473cfac 100644 Binary files a/m_librarian/translations/ru_RU.mo and b/m_librarian/translations/ru_RU.mo differ diff --git a/m_librarian/translations/ru_RU.po b/m_librarian/translations/ru_RU.po index 4a9f904..4f08498 100644 --- a/m_librarian/translations/ru_RU.po +++ b/m_librarian/translations/ru_RU.po @@ -17,5 +17,8 @@ msgstr "" msgid "Author(s)" msgstr "Автор(ы)" +msgid "Genre(s)" +msgstr "Жанр(ы)" + msgid "books" msgstr "книг" diff --git a/scripts/ml-search.py b/scripts/ml-search.py index 81d74f9..debfee5 100755 --- a/scripts/ml-search.py +++ b/scripts/ml-search.py @@ -70,6 +70,10 @@ def _search_books(case_sensitive, search_type, args): 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):