You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
660 B

11 years ago
from .. import repo
from .. import content
from ..configs import config
from ..uis import get_ui
def parser(subparsers):
parser = subparsers.add_parser('note',
help='edit the note attached to a paper')
parser.add_argument('citekey',
help='citekey of the paper')
return parser
def command(args):
"""
"""
ui = get_ui()
rp = repo.Repository(config())
if not rp.databroker.exists(args.citekey):
ui.error("citekey {} not found".format(args.citekey))
ui.exit(1)
notepath = rp.databroker.real_notepath(args.citekey)
11 years ago
content.edit_file(config().edit_cmd, notepath, temporary=False)