aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-06-08 21:01:47 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-06-08 21:01:47 +0200
commit417b1529cb83f3ff078b0cbb7509d1efd4d565ec (patch)
treec9882d6669f143c5af34c6ac81e05cbdfa72d790
parent040fbf0d2306e38dc1ec216064918c157a438de7 (diff)
downloadrefcat-417b1529cb83f3ff078b0cbb7509d1efd4d565ec.tar.gz
refcat-417b1529cb83f3ff078b0cbb7509d1efd4d565ec.zip
consider parameters in ls output
-rw-r--r--python/refcat/cli.py9
-rw-r--r--python/refcat/tasks.py1
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
# ------------------