Initial Commit

This commit is contained in:
OmniLottie
2026-03-01 21:36:54 +08:00
commit a386c803e1
199 changed files with 42253 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
import json
import tempfile
import subprocess
from .base import importer
from ..objects import Animation
@importer("Python script", ["py"])
def import_python_script(file, *a, **kw):
out = subprocess.check_output(["python", file, "--version"])
if b"python-lottie script" not in out:
raise Exception("Not a valid script")
data = subprocess.check_output(["python", file, "--path", "", "--name", "-", "--format", "json"])
return Animation.load(json.loads(data))