From f085c8a64b9d9bee394234ee4a03296b5a1206bd Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 19 May 2016 21:45:20 +0300 Subject: [PATCH] Output (list of) genres for a book --- docs-ru/command_line.rst | 2 +- docs/command_line.rst | 2 +- m_librarian/translations/ru_RU.mo | Bin 417 -> 455 bytes m_librarian/translations/ru_RU.po | 3 +++ scripts/ml-search.py | 4 ++++ 5 files changed, 9 insertions(+), 2 deletions(-) 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 6fa4c1b28ae4bebe0f915af03b0488b97b71fc2a..473cfac6b614ff941b4311b5da87e03cde97288a 100644 GIT binary patch delta 160 zcmZ3;e4M%do)F7a1|VPoVi_Q|0b*7ljsap2C;(zkAT9)A4j`@uVvu|b5Q{T1FmwTF zJ|JEMWb**&jX)ZtZXb{aA_gWPW(H!A`C#B!T9T1pq*1KN;GUXS#F)A<-H1_i+Jy}l X_FinzxY(`9aADVly%%;|*vtR`q!}Do delta 121 zcmX@kypTElo)F7a1|VPtVi_Pd0b*7l_5orLNC09^AWj5gka#u_i!(AX6ar~JAnpXR mIe_#GAPqzeOh61W3l1DhOEU6{HZ~YBa_qXW_ri_~n;8Js{SY<) 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): -- 2.39.5