]> git.phdru.name Git - m_librarian.git/commitdiff
Print the file date, language and file extension
authorOleg Broytman <phd@phdru.name>
Sat, 21 May 2016 14:36:26 +0000 (17:36 +0300)
committerOleg Broytman <phd@phdru.name>
Sat, 21 May 2016 14:36:26 +0000 (17:36 +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 6f3c94b5b5f5c97e6734d2dd308e10e918dd9a0b..457338f8417f7b1c450d9131e4cfc25743f997dd 100644 (file)
@@ -116,7 +116,8 @@ ml-search.py
 По умолчанию программы выводит список заголовков найденных книг. При
 использовании опции `-d` также выводится список авторов и жанров, а
 также серия, к которой принадлежит книга (если принадлежит) и порядковый
 По умолчанию программы выводит список заголовков найденных книг. При
 использовании опции `-d` также выводится список авторов и жанров, а
 также серия, к которой принадлежит книга (если принадлежит) и порядковый
-номер книги в этой серии.
+номер книги в этой серии. С двумя опциями `-d` (`-d -d` или просто
+`-dd`) программа выводит дату файла, язык и расширение имени файла.
 
 Поиск расширений
 ^^^^^^^^^^^^^^^^
 
 Поиск расширений
 ^^^^^^^^^^^^^^^^
index fdc5f97373126555cfdb9773fe3a03ab20b9e5a8..1e3adc64f5e342315edc7e8382ac538b9e8cd0d5 100644 (file)
@@ -114,7 +114,8 @@ Options::
 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
 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.
+the series. With two options `-d` (`-d -d` or simply `-dd`) it also
+prints the file date, language and file extension.
 
 Extension search
 ^^^^^^^^^^^^^^^^
 
 Extension search
 ^^^^^^^^^^^^^^^^
index 07aa518fe667c6a83ae4315e507ea36021d9e4b6..a9db70191a7fbd79424774c63a14f7ac1146c6a1 100644 (file)
Binary files a/m_librarian/translations/ru_RU.mo and b/m_librarian/translations/ru_RU.mo differ
index 1b81f6c432163cf11e3febe18167f9e55de399e1..7937bdbfafe1bd3ff932f3f8318f0130eecb541f 100644 (file)
@@ -20,6 +20,15 @@ msgstr "Автор(ы)"
 msgid "Genre(s)"
 msgstr "Жанр(ы)"
 
 msgid "Genre(s)"
 msgstr "Жанр(ы)"
 
+msgid "Date"
+msgstr "Дата"
+
+msgid "Extension"
+msgstr "Расширение"
+
+msgid "Language"
+msgstr "Язык"
+
 msgid "Series"
 msgstr "Серия"
 
 msgid "Series"
 msgstr "Серия"
 
index bdb1d9dd6d63817cc05a7ec4a323a61181800888..66606f9b236d9249972067f9a22935a3d801ea51 100755 (executable)
@@ -62,7 +62,7 @@ def _search_books(case_sensitive, search_type, args):
     for book in search_books(search_type, case_sensitive, values,
                              orderBy='title'):
         print book.title.encode(default_encoding)
     for book in search_books(search_type, case_sensitive, values,
                              orderBy='title'):
         print book.title.encode(default_encoding)
-        if args.details > 0:
+        if args.details >= 1:
             print " ", _("Author(s)"), ":",
             for author in book.authors:
                 names = filter(None,
             print " ", _("Author(s)"), ":",
             for author in book.authors:
                 names = filter(None,
@@ -78,6 +78,10 @@ def _search_books(case_sensitive, search_type, args):
                 print " ", _("Series"), ":",
                 print book.series.encode(default_encoding), \
                     "(%d)" % book.ser_no
                 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
+            print " ", _("Extension"), ":", book.extension.name
 
 
 def _search_extensions(case_sensitive, search_type, args):
 
 
 def _search_extensions(case_sensitive, search_type, args):