Fixes alias plugins and adds it to packages.
This commit is contained in:
parent
16aa0163f6
commit
ba48941d93
@ -16,6 +16,7 @@ class Alias(object):
|
|||||||
p = parser.add_parser(self.name, help='user defined command')
|
p = parser.add_parser(self.name, help='user defined command')
|
||||||
p.add_argument('arguments', nargs='*',
|
p.add_argument('arguments', nargs='*',
|
||||||
help="arguments to be passed to the user defined command")
|
help="arguments to be passed to the user defined command")
|
||||||
|
return p
|
||||||
|
|
||||||
def command(self, conf, args):
|
def command(self, conf, args):
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
@ -67,5 +68,5 @@ class AliasPlugin(PapersPlugin):
|
|||||||
def update_parser(self, subparsers):
|
def update_parser(self, subparsers):
|
||||||
"""Add subcommand to the provided subparser"""
|
"""Add subcommand to the provided subparser"""
|
||||||
for alias in self.aliases:
|
for alias in self.aliases:
|
||||||
alias_parser = alias.parser(parser)
|
alias_parser = alias.parser(subparsers)
|
||||||
alias_parser.set_defaults(func=alias.command)
|
alias_parser.set_defaults(func=alias.command)
|
||||||
|
2
setup.py
2
setup.py
@ -16,7 +16,7 @@ setup(
|
|||||||
packages = ['pubs', 'pubs.config',
|
packages = ['pubs', 'pubs.config',
|
||||||
'pubs.commands',
|
'pubs.commands',
|
||||||
'pubs.templates',
|
'pubs.templates',
|
||||||
'pubs.plugs'],
|
'pubs.plugs', 'pubs.plugs.alias'],
|
||||||
scripts = ['pubs/pubs'],
|
scripts = ['pubs/pubs'],
|
||||||
|
|
||||||
install_requires = ['pyyaml', 'bibtexparser', 'python-dateutil', 'requests', 'configobj',
|
install_requires = ['pyyaml', 'bibtexparser', 'python-dateutil', 'requests', 'configobj',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user