Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sean Fitzgibbon
SlideR 🍔
Commits
07b14343
Commit
07b14343
authored
Jun 23, 2021
by
Sean Fitzgibbon
Browse files
Added CHART support to BATCH
parent
0c4baf32
Changes
1
Hide whitespace changes
Inline
Side-by-side
slider/batch.py
View file @
07b14343
...
...
@@ -17,6 +17,7 @@
import
pandas
as
pd
from
slider.slide_reg
import
register_slide_to_slide
from
slider.chart_reg
import
register_chart_to_slide
def
run_batch
(
csv
):
...
...
@@ -26,10 +27,19 @@ def run_batch(csv):
if
all
(
item
in
list
(
df
)
for
item
in
[
'moving'
,
'moving_res'
,
'fixed'
,
'fixed_res'
]):
print
(
'Batch slider_app.py SLIDE'
)
# csv is SLIDE
print
(
'Batch slider_app.py SLIDE'
)
for
idx
,
row
in
df
.
iterrows
():
register_slide_to_slide
(
**
row
)
else
:
raise
RuntimeError
(
'Unknown CSV column names'
)
\ No newline at end of file
elif
all
(
item
in
list
(
df
)
for
item
in
[
'chart'
,
'slide'
,
'slide_res'
]):
# csv is CHART
print
(
'Batch slider_app.py CHART'
)
for
idx
,
row
in
df
.
iterrows
():
register_chart_to_slide
(
**
row
)
else
:
raise
RuntimeError
(
'Unknown CSV column names'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment