diff options
-rw-r--r-- | python/refcat/cli.py | 9 | ||||
-rw-r--r-- | python/refcat/tasks.py | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/python/refcat/cli.py b/python/refcat/cli.py index 892ad87..db6eb62 100644 --- a/python/refcat/cli.py +++ b/python/refcat/cli.py @@ -24,13 +24,14 @@ import tempfile import gluish import luigi +from luigi.cmdline_parser import CmdlineParser from luigi.parameter import MissingParameterException from luigi.task import Register from luigi.task_register import TaskClassNotFoundException from refcat import __version__ -from refcat.settings import LOGGING_CONF_FILE, settings from refcat.deps import dump_deps +from refcat.settings import LOGGING_CONF_FILE, settings from refcat.tasks import * from refcat.utils import columnize @@ -108,8 +109,10 @@ def ls(*args): """ if len(args) == 0: raise ValueError("ls failed: task name required") - task_class = find_task_class(args[0]) - print(task_class().output().path) + parser = CmdlineParser(sys.argv[1:]) + output = parser.get_task_obj().output() + # task_class = find_task_class(args[0]) + print(output.path) def ll(*args): diff --git a/python/refcat/tasks.py b/python/refcat/tasks.py index ac870e0..8320da9 100644 --- a/python/refcat/tasks.py +++ b/python/refcat/tasks.py @@ -1051,6 +1051,7 @@ class BrefOpenLibraryZipISBN(Refcat): def output(self): return luigi.LocalTarget(path=self.path(ext="json.zst"), format=Zstd) + # # Open Library Fuzzy # ------------------ |