Merge branch 'develop' into feat/better_test
Better tests, with every command except websearch and update in unit tests. Support for fake user and editor inputs in tests.
This commit is contained in:
commit
edbe1af3fa
@ -1,5 +1,4 @@
|
|||||||
import add_cmd
|
import add_cmd
|
||||||
import add_library_cmd
|
|
||||||
import import_cmd
|
import import_cmd
|
||||||
import export_cmd
|
import export_cmd
|
||||||
import init_cmd
|
import init_cmd
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
from .. import repo
|
|
||||||
from ..paper import Paper
|
|
||||||
from ..configs import config
|
|
||||||
|
|
||||||
def parser(subparsers):
|
|
||||||
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(args):
|
|
||||||
"""
|
|
||||||
:param bibfile bibtex file (in .bib, .bibml or .yaml format.
|
|
||||||
"""
|
|
||||||
|
|
||||||
ui = args.ui
|
|
||||||
bibfile = args.bibfile
|
|
||||||
|
|
||||||
rp = repo.Repository(config())
|
|
||||||
for p in Paper.many_from_bib(bibfile):
|
|
||||||
rp.add_paper(p)
|
|
@ -11,7 +11,7 @@ try:
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
DFT_EDIT_CMD = 'vi'
|
DFT_EDIT_CMD = 'vi'
|
||||||
|
|
||||||
DFT_PLUGINS = 'texnote'
|
DFT_PLUGINS = ''
|
||||||
|
|
||||||
DFT_CONFIG = {'papers_dir' : os.path.expanduser('~/.papers'),
|
DFT_CONFIG = {'papers_dir' : os.path.expanduser('~/.papers'),
|
||||||
'doc_dir' : 'doc',
|
'doc_dir' : 'doc',
|
||||||
|
@ -13,7 +13,6 @@ from . import plugins
|
|||||||
cmds = collections.OrderedDict([
|
cmds = collections.OrderedDict([
|
||||||
('init', commands.init_cmd),
|
('init', commands.init_cmd),
|
||||||
('add', commands.add_cmd),
|
('add', commands.add_cmd),
|
||||||
('add_library', commands.add_library_cmd),
|
|
||||||
('import', commands.import_cmd),
|
('import', commands.import_cmd),
|
||||||
('export', commands.export_cmd),
|
('export', commands.export_cmd),
|
||||||
('list', commands.list_cmd),
|
('list', commands.list_cmd),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user