Skip to content

Presentation API Proposal #712

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Kully opened this issue Mar 14, 2017 · 10 comments
Closed

Presentation API Proposal #712

Kully opened this issue Mar 14, 2017 · 10 comments
Assignees

Comments

@Kully
Copy link
Contributor

Kully commented Mar 14, 2017

cc: @jackparmer @cldougl @chriddyp

Presentation API Proposal - a wrapper that is built similarly to the Dashboard one.
-add a presentations.py file in plotly/api/v2/ for requests (https://api.plot.ly/v2/spectacle-presentations)
-make a presentations_objs file or something with a similar title
-add py.presentations_ops class to py

For visual feedback, Jack suggested something that looks like this: http://rmarkdown.rstudio.com/ioslides_presentation_format.html
and only supporting a few layouts for a first pass.

For tests, as with Dashboards, letting the backend yell at me if the JSON of the presentation is bad seems good enough for the first pass.

Any other suggestions? 😄

@Kully Kully self-assigned this Mar 14, 2017
@chriddyp
Copy link
Member

Sounds good to me. FWIW, I'm not sure if the backend has validation for presentations in yet.

@Kully
Copy link
Contributor Author

Kully commented Mar 20, 2017

Sounds good to me. FWIW, I'm not sure if the backend has validation for presentations in yet.

Okay, so I may have to add proper tests

@jackparmer
Copy link
Contributor

It might make sense to use this markdown format since it already has a precedent in technical computing:
http://rmarkdown.rstudio.com/ioslides_presentation_format.html

---
title: "Habits"
author: John Doe
date: March 22, 2005
output: ioslides_presentation
---

# In the morning

## Getting up

- Turn off alarm
- Get out of bed

## Breakfast

- Eat eggs
- Drink coffee

# In the evening

## Dinner

- Eat spaghetti
- Drink wine

----

![picture of spaghetti](images/spaghetti.jpg)

## Going to sleep

- Get in bed
- Count sheep

In Jupyter, users could write their presentation in markdown, copy that markdown to a string, then pass the string to a class that converts the markdown to Spectacle JSON and POSTs it to Plotly.

@cpsievert - you've used this ioslides module from RStudio, right? Anything you wish it had?

@cpsievert
Copy link

Yep, but I'm actually thinking of moving away from ioslides towards this remark-js based rmarkdown presentation template -- https://github.com/yihui/xaringan

I mainly want to switch because the default styling looks way better, and I'm no CSS wizard.

@jackparmer
Copy link
Contributor

jackparmer commented Apr 10, 2017 via email

@Kully
Copy link
Contributor Author

Kully commented Apr 10, 2017

In Jupyter, users could write their presentation in markdown, copy that markdown to a string, then pass the string to a class that converts the markdown to Spectacle JSON and POSTs it to Plotly.

Love this idea. Simple for users to use.

@jackparmer
Copy link
Contributor

I mainly want to switch because the default styling looks way better, and I'm no CSS wizard.

@cpsievert This seems to be the case for a lot of folks. We should ship this with a few default themes available, maybe based in these ones? Any others?

https://www.pinterest.com/pin/822540319412564320/
https://www.pinterest.com/pin/822540319412564375/
https://www.pinterest.com/pin/Af76rON1pK-eoVLRlvkm-4ccTYvB4leybh-7qCLNU-fCsPSrY1TWIos/
https://www.pinterest.com/pin/822540319412564330/

@jackparmer
Copy link
Contributor

jackparmer commented Apr 11, 2017

@Kully so maybe the workflow is something like this?

import plotly.presentation_objs as prez
import plotly.plotly as py

markdown_string = '''
# Title

---

# Agenda

1. Introduction
2. Deep-dive
3. ...

---

# Introduction
'''

my_presentation = prez.Presentation( markdown_string, theme='moods' )

url = py.presentation_ops.upload(my_presentation, 'My First Presentation with Python')

@Kully
Copy link
Contributor Author

Kully commented Apr 23, 2017

We should ship this with a few default themes available, maybe based in these ones? Any others?

I like all of these Jack. We could even allow for custom templates that get generated when you give a list of 3 or 4 colors to create the theme, eg. [#fafafa, #04aaaa, #0000ff]. ColorHunt has a lot of good schemes.

@Kully
Copy link
Contributor Author

Kully commented Oct 27, 2017

Presentation Wrapper is finished

@Kully Kully closed this as completed Oct 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants