From eb10c0dff1816fc3020bd4c640d07465743d360a Mon Sep 17 00:00:00 2001 From: Fabien Benureau Date: Thu, 27 Jun 2013 12:00:09 +0200 Subject: [PATCH] FIX s/label/tags/ in add_cmd --- papers/commands/add_cmd.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/papers/commands/add_cmd.py b/papers/commands/add_cmd.py index bea1d6c..5da2d02 100644 --- a/papers/commands/add_cmd.py +++ b/papers/commands/add_cmd.py @@ -10,7 +10,7 @@ def parser(subparsers, config): parser.add_argument('-b', '--bibfile', help='bibtex, bibtexml or bibyaml file', default=None) parser.add_argument('-d', '--docfile', help='pdf or ps file', default=None) - parser.add_argument('-l', '--label', help='label associated to the paper', + parser.add_argument('-t', '--tags', help='tags associated to the paper, separated by commas', default=None) parser.add_argument('-c', '--copy', action='store_true', default=None, help="copy document files into library directory (default)") @@ -19,7 +19,7 @@ def parser(subparsers, config): return parser -def command(config, ui, bibfile, docfile, label, copy): +def command(config, ui, bibfile, docfile, tags, copy): """ :param bibfile: bibtex file (in .bib, .bibml or .yaml format. :param docfile: path (no url yet) to a pdf or ps file @@ -44,8 +44,8 @@ def command(config, ui, bibfile, docfile, label, copy): p = Paper(bibentry=bib, citekey=key) else: p = Paper.load(bibfile) - if label is not None: - p.tags = set(label.split()) + if tags is not None: + p.tags = set(tags.split(',')) # Check if another doc file is specified in bibtex docfile2 = extract_doc_path_from_bibdata(p, ui) if docfile is None: