python-lottie  0.6.11+devcecd248
A framework to work with lottie files and telegram animated stickers (tgs)
sif.py
Go to the documentation of this file.
1 
2 from .base import exporter
3 from ..parsers.sif.builder import to_sif
4 from ..utils.file import open_file
5 
6 
7 @exporter("Synfig", ["sif"], [], {"pretty"})
8 def export_sif(animation, file, pretty=True):
9  with open_file(file) as fp:
10  dom = to_sif(animation).to_xml()
11  dom.writexml(fp, "", " " if pretty else "", "\n" if pretty else "")
lottie.utils.file.open_file
def open_file(file_or_name, mode="w")
Definition: file.py:5
lottie.exporters.sif.export_sif
def export_sif(animation, file, pretty=True)
Definition: sif.py:8
lottie.exporters.base.exporter
exporter
Definition: base.py:32
lottie.parsers.sif.builder.to_sif
def to_sif(animation)
Definition: builder.py:408