Commit af26ec7a authored by Niels-Oliver Walkowski's avatar Niels-Oliver Walkowski
Browse files

feat(module): Show available diagrams in corpus

Add a file crawler for *.png files in the `_report` method of the Corpus
class which adds the availalbe diagrams for specific contrasts.
parent caab3092
......@@ -37,12 +37,15 @@ class Corpus(object):
movie =
status[movie] = {}
# get info about movie file
video = m / ('movie/' + movie + '.mkv')
status[movie]['video'] = video if video.is_file() else None
# get info about frame images
frames = len(list((m / 'frames/240p30/').glob('*')))
status[movie]['frames'] = frames if frames > 0 else None
# get info about data pickles
status[movie].setdefault('data', {})
data_files = (m / ('data/')).glob('*.pkl')
for d in data_files:
......@@ -52,7 +55,15 @@ class Corpus(object):
d[-3], {}).update(
{d[-2]: True})
status[movie]['visual'] = 'NEEDS IMPLEMENTATION'
# get info about diagram *.png files
status[movie].setdefault('visuals', {})
vis_files = (m.glob('*.png'))
for v in vis_files:
v ='_')
v[-4], {}).setdefault(
v[-3], {}).update(
{v[-2]: True})
return status
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment