Note: This file documents major changes visible to users; see Git history for detailed log.
- Detecting Inkscape on Windows
- Dependencies updated
- Better delimiter settings
- Comptability with Inkscape 1.1
- Simple export to pptx (slides as PNG pictures)
from elsie.ext.export import export_pptx
export_pptx(slides, "output.pptx")
- Todo placeholder
from elsie.ext.todo import todo_placehodler
todo_placeholder(box)
You can use the new Cairo backend to render slides without the need to install Inkscape
.
To use it, install elsie with the cairo
extra package:
$ pip install elsie[cairo]
And then pass CairoBackend
to SlideDeck
:
import elsie
from elsie.render.backends import CairoBackend
slides = elsie.SlideDeck(backend=CairoBackend())
Global slides were removed. You can just create instance of Slides (now SlideDeck) as follows:
Before:
elsie.slide()
def a_function(slide):
pass
Now:
slides = elsie.SlideDeck()
slides.slide()
def a_function(slide):
pass
Before you could write:
slide.box(50, 0, 100, 100)
To avoid confusion, positional arguments are disabled and all arguments have to be named:
slide.box(x=50, y=0, width=100, height=100)
- New documentation
- Large speedup in slide rendering by using Inkscape shell interface
ext
package with support for lists and markdown- Jupyter integration
- ORA support
- Method TextStyle.compose()
Text styles are no longer dictionaries. From now on, they will be instances of elsie.TextStyle
.
New methods for working with styles:
box.set_style("new-style", elsie.TextStyle(size=10))
box.update_style("new-style", elsie.TextStyle(bold=True))
Methods new_style
and derive_style
were removed.
line_box
and inline_box
(previously text_box
) can be now only used on objects returned by
the text
or code
methods.
Before:
b = ...box(...)
b.text(...)
b.line_box(...)
b.text_box(...)
Now:
b = ...box(...)
t = b.text(...)
t.line_box(...)
t.inline_box(...)
Argument lines
in line_box
was renamed to n_lines
.
Arguments above
and below
in .box(..)
method. See
documentation
for their explanation.
r = b.rect(...)
b.box(.., below=r) # The new box is drawn before rectangle