pubs/papers/commands/add_library_cmd.py
Olivier Mangin 655fb25bfa Adds command to add multiple reference at once.
Also fixes a few bugs.
2012-11-02 19:48:13 +01:00

16 lines
427 B
Python

from .. import repo
def parser(subparsers, config):
parser = subparsers.add_parser('add_library',
help='add a set of papers to the repository')
parser.add_argument('bibfile', help='bibtex, bibtexml or bibyaml file')
return parser
def command(config, bibfile):
"""
:param bibtex bibtex file (in .bib, .bibml or .yaml format.
"""
rp = repo.Repository()
rp.add_papers(bibfile)