Skip to content

Commit 7021f90

Browse files
authored
Merge pull request #41 from apiad/develop
v0.6.5
2 parents 5794fef + d5dd494 commit 7021f90

20 files changed

+10060
-17
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,4 @@ dmypy.json
157157
*.zip
158158
*.tar.gz
159159
reveal.js-3.8.0/*
160+
.now

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ deploy:
2222
script: poetry publish --build --username $PYPI_USER --password $PYPI_PASSWORD
2323
on:
2424
tags: true
25+
python: "3.8"

README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
[<img alt="Travis (.org)" src="https://img.shields.io/travis/apiad/auditorium/master.svg">](https://travis-ci.org/apiad/auditorium)
77
[<img alt="Codecov" src="https://img.shields.io/codecov/c/github/apiad/auditorium.svg">](https://codecov.io/gh/apiad/auditorium)
88
[<img alt="Gitter" src="https://img.shields.io/gitter/room/apiad/auditorium">](https://gitter.im/auditorium-slides/community)
9-
[<img alt="Demo" src="https://img.shields.io/badge/demo-browse-blueviolet"></img>](http://auditorium-demo.apiad.net)
9+
[<img alt="Demo" src="https://img.shields.io/badge/demo-browse-blueviolet"></img>](https://auditorium-demo.now.sh)
1010

1111
> A Python-powered slideshow creator with steroids.
1212
13-
See the demo at [auditorium-demo.apiad.net](http://auditorium-demo.apiad.net) (sorry, no HTTPS yet).
13+
See the demo at [auditorium-demo.now.sh](https://auditorium-demo.now.sh).
1414

1515
## What's this about
1616

@@ -244,6 +244,11 @@ Staying away from `eval` and `exec` should keep you safe in most scenarios, but
244244

245245
## History
246246

247+
### v0.6.5
248+
249+
* Improved compatibility for [Now](https://now.sh) static deployments.
250+
* The demo has now been moved to [auditorium-demo.now.sh](https://auditorium-demo.now.sh).
251+
247252
### v0.6.4
248253

249254
* New development environment completely based on Docker.

auditorium/__main__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def demo(host="127.0.0.1", port=6789, debug=False, launch=True):
3434
def render(path, theme="white", instance_name="show"):
3535
"Renders a slideshow into a single HTML with all resources embedded."
3636

37-
show = load(path, instance_name)
37+
show = Show.load(path, instance_name)
3838
print(show.render(theme))
3939

4040
@staticmethod

auditorium/demo.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from auditorium import Show
88

99
show = Show("Auditorium Demo")
10+
app = show.app
1011

1112

1213
@show.slide
@@ -464,6 +465,6 @@ def append(ctx):
464465
ctx.code("show.append('auditorium/static/md/demo.md')")
465466

466467

467-
from .utils import path
468+
from auditorium.markdown import load_markdown_demo
468469

469-
show.append(path("./static/md/demo.md"))
470+
show.append(load_markdown_demo())

auditorium/markdown.py

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
from auditorium import Show
44
from typing import List
5+
from auditorium.utils import path
6+
7+
8+
def load_markdown_demo():
9+
return Show.load(path("./static/md/demo.md"))
510

611

712
class MarkdownLoader:

auditorium/show.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,11 @@ def __init__(self, title="", theme="white", code_style="monokai"):
5555
def run(self, host: str, port: int, launch: bool, *args, **kwargs) -> None:
5656
self._content = self._render_content()
5757

58-
if launch:
58+
# if launch:
59+
# def launch_server():
60+
# webbrowser.open_new_tab(f"http://{host}:{port}")
5961

60-
def launch_server():
61-
webbrowser.open_new_tab(f"http://{host}:{port}")
62-
63-
self.app.add_task(launch_server)
62+
# self.app.add_task(launch_server)
6463

6564
self.app.run(host=host, port=port, *args, **kwargs)
6665

0 commit comments

Comments
 (0)