Tags have to be printed in alphabetical order.
This commit is contained in:
parent
0479636393
commit
f2125b4c19
@ -83,12 +83,12 @@ def command(args):
|
|||||||
rp = Repository(config())
|
rp = Repository(config())
|
||||||
|
|
||||||
if citekeyOrTag is None:
|
if citekeyOrTag is None:
|
||||||
ui.print_(color.dye(' '.join(rp.get_tags()), color=color.blue))
|
ui.print_(color.dye(' '.join(sorted(rp.get_tags())), color=color.blue))
|
||||||
else:
|
else:
|
||||||
if rp.databroker.exists(citekeyOrTag):
|
if rp.databroker.exists(citekeyOrTag):
|
||||||
p = rp.pull_paper(citekeyOrTag)
|
p = rp.pull_paper(citekeyOrTag)
|
||||||
if tags == []:
|
if tags == []:
|
||||||
ui.print_(color.dye(' '.join(p.tags),
|
ui.print_(color.dye(' '.join(sorted(p.tags)),
|
||||||
color=color.blue))
|
color=color.blue))
|
||||||
else:
|
else:
|
||||||
add_tags, remove_tags = _tag_groups(_parse_tags(tags))
|
add_tags, remove_tags = _tag_groups(_parse_tags(tags))
|
||||||
|
@ -56,6 +56,6 @@ def paper_oneliner(p, citekey_only = False):
|
|||||||
return u'[{citekey}] {descr} {tags}'.format(
|
return u'[{citekey}] {descr} {tags}'.format(
|
||||||
citekey=color.dye(p.citekey, color.purple),
|
citekey=color.dye(p.citekey, color.purple),
|
||||||
descr=bibdesc,
|
descr=bibdesc,
|
||||||
tags=color.dye(' '.join(p.tags),
|
tags=color.dye(' '.join(sorted(p.tags)),
|
||||||
color.tag, bold=False),
|
color.tag, bold=False),
|
||||||
)
|
)
|
||||||
|
@ -246,13 +246,13 @@ class TestList(DataCommandTestCase):
|
|||||||
class TestUsecase(DataCommandTestCase):
|
class TestUsecase(DataCommandTestCase):
|
||||||
|
|
||||||
def test_first(self):
|
def test_first(self):
|
||||||
correct = [b'Initializing pubs in /paper_first\n',
|
correct = ['Initializing pubs in /paper_first\n',
|
||||||
b'',
|
'',
|
||||||
b'[Page99] Page, Lawrence et al. "The PageRank Citation Ranking: Bringing Order to the Web." (1999) \n',
|
'[Page99] Page, Lawrence et al. "The PageRank Citation Ranking: Bringing Order to the Web." (1999) \n',
|
||||||
b'\n',
|
'\n',
|
||||||
b'',
|
'',
|
||||||
b'search network\n',
|
'network search\n',
|
||||||
b'[Page99] Page, Lawrence et al. "The PageRank Citation Ranking: Bringing Order to the Web." (1999) search network\n'
|
'[Page99] Page, Lawrence et al. "The PageRank Citation Ranking: Bringing Order to the Web." (1999) network search\n'
|
||||||
]
|
]
|
||||||
|
|
||||||
cmds = ['pubs init -p paper_first/',
|
cmds = ['pubs init -p paper_first/',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user