|
|
@ -59,12 +59,12 @@ def parser(subparsers, conf):
|
|
|
|
|
|
|
|
|
|
|
|
return doc_parser
|
|
|
|
return doc_parser
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def command(conf, args):
|
|
|
|
def command(conf, args):
|
|
|
|
|
|
|
|
|
|
|
|
ui = get_ui()
|
|
|
|
ui = get_ui()
|
|
|
|
rp = repo.Repository(conf)
|
|
|
|
rp = repo.Repository(conf)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# print(args)
|
|
|
|
# print(args)
|
|
|
|
# ui.exit()
|
|
|
|
# ui.exit()
|
|
|
|
|
|
|
|
|
|
|
@ -73,8 +73,10 @@ def command(conf, args):
|
|
|
|
paper = rp.pull_paper(citekey)
|
|
|
|
paper = rp.pull_paper(citekey)
|
|
|
|
|
|
|
|
|
|
|
|
if paper.docpath is not None and not args.force:
|
|
|
|
if paper.docpath is not None and not args.force:
|
|
|
|
msg = ("The publication {} has already the document {} assigned." + os.linesep +
|
|
|
|
msg = ("The publication {} has already the document {} assigned.{newline}Overwrite? "
|
|
|
|
"Overwrite? ").format(color.dye_out(paper.citekey, 'citekey'), color.dye_out(paper.docpath, 'filepath'))
|
|
|
|
).format(color.dye_out(paper.citekey, 'citekey'),
|
|
|
|
|
|
|
|
color.dye_out(paper.docpath, 'filepath'),
|
|
|
|
|
|
|
|
newline=os.linesep)
|
|
|
|
if not ui.input_yn(question=msg, default='n'):
|
|
|
|
if not ui.input_yn(question=msg, default='n'):
|
|
|
|
ui.exit(0)
|
|
|
|
ui.exit(0)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|