From 6bae69f038f792834c7ac11f944aa7760bff5ee6 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 21 May 2016 17:54:31 +0300 Subject: [PATCH] Print archive, file, extension, size and deleted flag --- docs-ru/command_line.rst | 8 +++++++- docs/command_line.rst | 8 +++++++- m_librarian/translations/ru_RU.mo | Bin 624 -> 896 bytes m_librarian/translations/ru_RU.po | 27 ++++++++++++++++++++++++--- scripts/ml-search.py | 7 +++++++ 5 files changed, 45 insertions(+), 5 deletions(-) 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 a9db70191a7fbd79424774c63a14f7ac1146c6a1..26de52cfe407f2bc5ed213b2a02586f4f6685e4a 100644 GIT binary patch delta 553 zcmZ9Iy-Pw-7{*`CvJW!|NeZFCMTr_(n*^2CsIf)sfR{u`Z{LF#AqZM34O)btXiY8q zGNY-f;l2Mr5VY4{P(APMOg-@2-}`aSd(J&y9?M&L8}=L%Gz5p>DjbA;E_|R2=mib1 z4_pO3;Et|ay1oZ?qkg3OCtxq~n&t)AgZxtWZ~j=KHUioBtoZ^4;a9jH^$$0ZAN&Mm z;J41bT|@!oBcKeP0Hr?-`oI~T&w?^%PS+Pf`2oY}mxyvsK(qnkOlKI*a3q671F*cp zf60qroAU!QR3w*>1LZ|Ua`{0CVuhuQv92h#W@hq*NHI$B)VQfAuCmHh%aqtORjz2{ zbCgVFi;9v)Rvo^N1?G)yMGJ*BMd^HgrAX;5Q#F1H&FBk==wF!hSKAj z49q|b0wBXd4geVr0zhdnU= 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): -- 2.39.2