Skip to content

Commit

Permalink
Output HTML file to disk as part of example
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaudcolas committed Oct 6, 2016
1 parent 5d0bb27 commit 9254613
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ core/static/images/
core/jinja2/svg.html

*.sql
example.html
6 changes: 6 additions & 0 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,4 +257,10 @@
}

markup = exporter.render(content_state)

# Display in console.
print(DOM.pretty_print(markup))

# Output to a file
with open('example.html', 'w') as file:
file.write(markup)

0 comments on commit 9254613

Please sign in to comment.