python-lottie  0.6.10+dev2509936
A framework to work with lottie files and telegram animated stickers (tgs)
open_save.py
1 #!/usr/bin/env python3
2 import sys
3 import os
4 sys.path.insert(0, os.path.join(
5  os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
6  "lib"
7 ))
8 from lottie.importers.svg import import_svg
9 from lottie.exporters.core import export_lottie
10 
11 
12 # All import/export functions can take file names or file objects
13 
14 animation = import_svg(os.path.join(
15  os.path.dirname(os.path.abspath(__file__)),
16  "blep.svg"
17 ))
18 
19 export_lottie(animation, "open_save.json")
lottie.importers.svg
Definition: svg.py:1
lottie.importers.svg.import_svg
def import_svg(file, *a, **kw)
Definition: svg.py:15
lottie.exporters.core.export_lottie
def export_lottie(animation, file, pretty=False)
Definition: core.py:13
lottie.exporters.core
Definition: core.py:1