python-lottie  0.7.0+devab1d901
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")
def export_lottie(animation, file, pretty=False)
Definition: core.py:13
def import_svg(file, *a, **kw)
Definition: svg.py:11