From: Oleg Broytman Date: Sat, 21 May 2016 14:54:31 +0000 (+0300) Subject: Print archive, file, extension, size and deleted flag X-Git-Tag: 0.0.6~1 X-Git-Url: https://git.phdru.name/?p=m_librarian.git;a=commitdiff_plain;h=6bae69f038f792834c7ac11f944aa7760bff5ee6;ds=sidebyside Print archive, file, extension, size and deleted flag --- diff --git a/docs-ru/command_line.rst b/docs-ru/command_line.rst index 457338f..a6f226b 100644 --- a/docs-ru/command_line.rst +++ b/docs-ru/command_line.rst @@ -94,6 +94,7 @@ ml-search.py Искать и печатать список авторов, чья фамилия начинается на "друг" и имя начинается на "в", без учёта регистра. + Поиск книг ^^^^^^^^^^ @@ -117,7 +118,10 @@ ml-search.py использовании опции `-d` также выводится список авторов и жанров, а также серия, к которой принадлежит книга (если принадлежит) и порядковый номер книги в этой серии. С двумя опциями `-d` (`-d -d` или просто -`-dd`) программа выводит дату файла, язык и расширение имени файла. +`-dd`) программа выводит дату файла и язык. С тремя `-d` выводятся имя +архива, имя файла, расширение и размер файла, и признак, была ли книга +помечена как удалённая. + Поиск расширений ^^^^^^^^^^^^^^^^ @@ -128,6 +132,7 @@ ml-search.py Искать и печатать список расширений имён файлов по имени. + Поиск жанров ^^^^^^^^^^^^ @@ -142,6 +147,7 @@ ml-search.py -n, --name имя Искать по названию -t, --title заголовок Искать по заголовку + Поиск языков ^^^^^^^^^^^^ diff --git a/docs/command_line.rst b/docs/command_line.rst index 1e3adc6..97c0648 100644 --- a/docs/command_line.rst +++ b/docs/command_line.rst @@ -93,6 +93,7 @@ Example:: Search and print a list of authors whose surname starts with "duck", and name starts with "mack", case insensitive. + Book search ^^^^^^^^^^^ @@ -115,7 +116,10 @@ By default the program prints only titles of the found book. With one option `-d` it also prints the list of authors and genres, and also series the book belongs to (if any) and the serial number of the book in the series. With two options `-d` (`-d -d` or simply `-dd`) it also -prints the file date, language and file extension. +prints the file date and language. With three `-d` it prints archive +name, file name, extension and size, and flag if the book is marked to +be deleted. + Extension search ^^^^^^^^^^^^^^^^ @@ -126,6 +130,7 @@ Usage:: Search and print a list of extensions by name. + Genres search ^^^^^^^^^^^^^ @@ -140,6 +145,7 @@ Options:: -n, --name name Search by name -t, --title title Search by title + Language search ^^^^^^^^^^^^^^^ diff --git a/m_librarian/translations/ru_RU.mo b/m_librarian/translations/ru_RU.mo index a9db701..26de52c 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 7937bdb..6c56700 100644 --- a/m_librarian/translations/ru_RU.po +++ b/m_librarian/translations/ru_RU.po @@ -14,23 +14,44 @@ msgstr "" "Content-Transfer-Encoding: 8-bit\n" "Generated-By: pygettext.py 1.5\n" +msgid "Archive" +msgstr "Архив" + msgid "Author(s)" msgstr "Автор(ы)" -msgid "Genre(s)" -msgstr "Жанр(ы)" - msgid "Date" msgstr "Дата" +msgid "Deleted" +msgstr "Удалена" + msgid "Extension" msgstr "Расширение" +msgid "File" +msgstr "Файл" + +msgid "False" +msgstr "Нет" + +msgid "Genre(s)" +msgstr "Жанр(ы)" + msgid "Language" msgstr "Язык" msgid "Series" msgstr "Серия" +msgid "Size" +msgstr "Размер" + +msgid "True" +msgstr "Да" + msgid "books" msgstr "книг" + +msgid "bytes" +msgstr "байт" diff --git a/scripts/ml-search.py b/scripts/ml-search.py index 66606f9..985e6d7 100755 --- a/scripts/ml-search.py +++ b/scripts/ml-search.py @@ -78,10 +78,17 @@ def _search_books(case_sensitive, search_type, args): print " ", _("Series"), ":", print book.series.encode(default_encoding), \ "(%d)" % book.ser_no + if args.details >= 2: print " ", _("Date"), ":", book.date print " ", _("Language"), ":", book.language.name + + if args.details >= 3: + print " ", _("Archive"), ":", book.archive + print " ", _("File"), ":", book.file print " ", _("Extension"), ":", book.extension.name + print " ", _("Size"), ":", book.size, _("bytes") + print " ", _("Deleted"), ":", _(str(book.deleted)) def _search_extensions(case_sensitive, search_type, args):