From: Oleg Broytman Date: Mon, 9 May 2016 21:04:29 +0000 (+0300) Subject: Fix: misc => misc-name X-Git-Tag: 0.0.4~9 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=b1657c852615f0deac00c879d4f69a3166d6fcdf;p=m_librarian.git Fix: misc => misc-name --- diff --git a/docs-ru/command_line.rst b/docs-ru/command_line.rst index c29098d..7a24bbc 100644 --- a/docs-ru/command_line.rst +++ b/docs-ru/command_line.rst @@ -67,16 +67,16 @@ ml-search.py Использование:: - ml-search.py [-i] [-I] [-t ...] author [-s surname] [-n name] [-m misc] + ml-search.py [-i] [-I] [-t ...] author [-s surname] [-n name] [-m misc-name] Искать и печатать список авторов по фамилии, имени и доп. имени (обычно отчеству). Опции:: - -s, --surname фамилия Искать по фамилии - -n, --name имя Искать по имени - -m, --misc доп. имени Искать по доп. имени + -s, --surname фамилия Искать по фамилии + -n, --name имя Искать по имени + -m, --misc-name доп. имени Искать по доп. имени Пример:: diff --git a/docs/command_line.rst b/docs/command_line.rst index 3542054..6347dff 100644 --- a/docs/command_line.rst +++ b/docs/command_line.rst @@ -66,15 +66,15 @@ Author search Usage:: - ml-search.py [-i] [-I] [-t ...] author [-s surname] [-n name] [-m misc] + ml-search.py [-i] [-I] [-t ...] author [-s surname] [-n name] [-m misc-name] Search and print a list of authors by surname/name/misc name. Options:: - -s, --surname surname Search by surname - -n, --name name Search by name - -m, --misc misc. name Search by misc. name + -s, --surname surname Search by surname + -n, --name name Search by name + -m, --misc-name misc. name Search by misc. name Example:: diff --git a/scripts/ml-search.py b/scripts/ml-search.py index e0f126b..e163daf 100755 --- a/scripts/ml-search.py +++ b/scripts/ml-search.py @@ -18,7 +18,7 @@ def _guess_case_sensitivity(values): def _search_authors(case_sensitive, args): values = {} - for column in 'surname', 'name', 'misc': + for column in 'surname', 'name', 'misc_name': value = getattr(args, column) if value: values[column] = unicode(value, default_encoding) @@ -52,7 +52,7 @@ if __name__ == '__main__': parser = subparsers.add_parser('authors', help='Search authors') parser.add_argument('-s', '--surname', help='search by surname') parser.add_argument('-n', '--name', help='search by name') - parser.add_argument('-m', '--misc', help='search by misc. name') + parser.add_argument('-m', '--misc-name', help='search by misc. name') parser.set_defaults(func=_search_authors) args = main_parser.parse_args()