summaryrefslogtreecommitdiff
path: root/subplot.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-06-08 07:58:46 +0300
committerLars Wirzenius <liw@liw.fi>2020-06-08 08:06:12 +0300
commitb16749ca50ced58631e79aadf0f74152c24435de (patch)
treee8b04ec94c1ba0a05b900297dfee67c1984d74dd /subplot.py
parent163ec445c2474698ba073333c11140be6bb4fddc (diff)
downloadsubplot-b16749ca50ced58631e79aadf0f74152c24435de.tar.gz
feat: add sp-extract for extracting data files from subplots
Diffstat (limited to 'subplot.py')
-rw-r--r--subplot.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/subplot.py b/subplot.py
index fa3d502..1bb42d7 100644
--- a/subplot.py
+++ b/subplot.py
@@ -61,6 +61,12 @@ def run_meta_json(ctx, filename=None):
exit_code_is(ctx, 0)
+def run_extract(ctx, filename=None, embedded=None, dirname=None):
+ extract = binary("sp-extract")
+ runcmd(ctx, [extract, filename, embedded, "-o", dirname])
+ exit_code_is(ctx, 0)
+
+
def run_pandoc_with_filter(ctx, filename=None, output=None):
sp_filter = binary("sp-filter")
runcmd(ctx, ["pandoc", "--filter", sp_filter, filename, "-o", output])