projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1169947
)
4042: add "extract"
author
Peter Amstutz <peter.amstutz@curoverse.com>
Thu, 2 Oct 2014 18:49:58 +0000
(14:49 -0400)
committer
Peter Amstutz <peter.amstutz@curoverse.com>
Thu, 2 Oct 2014 18:49:58 +0000
(14:49 -0400)
crunch_scripts/run-command
patch
|
blob
|
history
diff --git
a/crunch_scripts/run-command
b/crunch_scripts/run-command
index 57bf3c7ff0fa7afde3616989816d6bad56740441..23cb0e603bf90db017e79136f243a0b119a2b211 100755
(executable)
--- a/
crunch_scripts/run-command
+++ b/
crunch_scripts/run-command
@@
-122,9
+122,13
@@
def get_items(p, value):
p = pattern.match(i)
if p:
add_to_group(groups, p)
- print groups
return [groups[k] for k in groups]
+ if "extract" in value and "regex" in value:
+ pattern = re.compile(value["regex"])
+ items = get_items(p, value["group"])
+ return [p.groups() for i in items if p = pattern.match(i)]
+
if isinstance(value, list):
return expand_list(p, value)