python-lottie  0.7.0+devd020110
A framework to work with lottie files and telegram animated stickers (tgs)
lottie.utils.funky_parser.Parser Class Reference

Public Member Functions

def __init__ (self, text, Logger logger)
 
def next (self)
 
def token (self)
 
def color (self)
 
def get_color_value (self, value, str complete_word)
 
def complete_color (self, dict word_dict, str complete_word)
 
def get_color (self, dict word_dict, str complete_word)
 
def warn (self, message)
 
def parse (self)
 
def article (self)
 
def check_words (self, *words)
 
def skip_words (self, *words)
 
def require_one_of (self, *words)
 
def check_word_sequence (self, words)
 
def possesive (self)
 
def properties (self, shape_data, callback, callback_args=[], words=["with"])
 
def simple_properties_callback (self, object, properties)
 
def animation (self)
 
def time (self, default)
 
def integer (self, default, warn=True)
 
def number (self, default)
 
def string (self, default)
 
def layers (self, composition)
 
def count (self, default=1)
 
def layer (self, composition)
 
def skip_and (self)
 
def shape_list (self, parent)
 
def size_qualifier (self)
 
def size_multiplitier (self)
 
def add_shape (self, parent, shape_object, shape_data)
 
def position (self, shapes.Group shape, float time)
 
def animation_time (self, time, required)
 
def animated_properties (self, ShapeData shape_data)
 
def animated_property_value (self, AnimatableProperty property, time)
 
def animated_property (self, ShapeData shape_data, AnimatableProperty property, time)
 
def vector_value (self)
 
def position_value (self, NVector start)
 
def shape_common_property (self, ShapeData shape_data)
 
def animated_properties_callback (self, ShapeData shape_data)
 
def shape_square (self, ShapeData shape_data)
 
def shape_circle (self, ShapeData shape_data)
 
def shape_star (self, ShapeData shape_data, int sides=None)
 
def shape_polygon (self, ShapeData shape_data, int sides=None)
 
def angle_direction (self)
 
def fraction (self)
 
def angle (self, default)
 
def rect_properties (self, ShapeData shape_data, shape)
 
def shape_rectangle (self, ShapeData shape_data)
 
def shape_ellipse (self, ShapeData shape_data)
 
def shape_text (self, ShapeData shape_data)
 

Public Attributes

 lexer
 
 logger
 
 allow_resize
 
 max_duration
 
 svg_shapes
 
 font
 
 lottie
 
 prop_time
 

Static Public Attributes

dictionary sides
 

Detailed Description

Definition at line 411 of file funky_parser.py.

Constructor & Destructor Documentation

◆ __init__()

def lottie.utils.funky_parser.Parser.__init__ (   self,
  text,
Logger  logger 
)

Definition at line 421 of file funky_parser.py.

Member Function Documentation

◆ add_shape()

def lottie.utils.funky_parser.Parser.add_shape (   self,
  parent,
  shape_object,
  shape_data 
)

Definition at line 844 of file funky_parser.py.

◆ angle()

def lottie.utils.funky_parser.Parser.angle (   self,
  default 
)

Definition at line 1205 of file funky_parser.py.

◆ angle_direction()

def lottie.utils.funky_parser.Parser.angle_direction (   self)

Definition at line 1173 of file funky_parser.py.

◆ animated_properties()

def lottie.utils.funky_parser.Parser.animated_properties (   self,
ShapeData  shape_data 
)

Definition at line 958 of file funky_parser.py.

◆ animated_properties_callback()

def lottie.utils.funky_parser.Parser.animated_properties_callback (   self,
ShapeData  shape_data 
)

Definition at line 1101 of file funky_parser.py.

◆ animated_property()

def lottie.utils.funky_parser.Parser.animated_property (   self,
ShapeData  shape_data,
AnimatableProperty  property,
  time 
)

Definition at line 1028 of file funky_parser.py.

◆ animated_property_value()

def lottie.utils.funky_parser.Parser.animated_property_value (   self,
AnimatableProperty  property,
  time 
)

Definition at line 1010 of file funky_parser.py.

◆ animation()

def lottie.utils.funky_parser.Parser.animation (   self)

Definition at line 578 of file funky_parser.py.

◆ animation_time()

def lottie.utils.funky_parser.Parser.animation_time (   self,
  time,
  required 
)

Definition at line 945 of file funky_parser.py.

◆ article()

def lottie.utils.funky_parser.Parser.article (   self)

Definition at line 501 of file funky_parser.py.

◆ check_word_sequence()

def lottie.utils.funky_parser.Parser.check_word_sequence (   self,
  words 
)

Definition at line 526 of file funky_parser.py.

◆ check_words()

def lottie.utils.funky_parser.Parser.check_words (   self,
words 
)

Definition at line 507 of file funky_parser.py.

◆ color()

def lottie.utils.funky_parser.Parser.color (   self)

Definition at line 437 of file funky_parser.py.

◆ complete_color()

def lottie.utils.funky_parser.Parser.complete_color (   self,
dict  word_dict,
str  complete_word 
)

Definition at line 450 of file funky_parser.py.

◆ count()

def lottie.utils.funky_parser.Parser.count (   self,
  default = 1 
)

Definition at line 677 of file funky_parser.py.

◆ fraction()

def lottie.utils.funky_parser.Parser.fraction (   self)

Definition at line 1184 of file funky_parser.py.

◆ get_color()

def lottie.utils.funky_parser.Parser.get_color (   self,
dict  word_dict,
str  complete_word 
)

Definition at line 457 of file funky_parser.py.

◆ get_color_value()

def lottie.utils.funky_parser.Parser.get_color_value (   self,
  value,
str  complete_word 
)

Definition at line 440 of file funky_parser.py.

◆ integer()

def lottie.utils.funky_parser.Parser.integer (   self,
  default,
  warn = True 
)

Definition at line 625 of file funky_parser.py.

◆ layer()

def lottie.utils.funky_parser.Parser.layer (   self,
  composition 
)

Definition at line 682 of file funky_parser.py.

◆ layers()

def lottie.utils.funky_parser.Parser.layers (   self,
  composition 
)

Definition at line 654 of file funky_parser.py.

◆ next()

def lottie.utils.funky_parser.Parser.next (   self)

Definition at line 430 of file funky_parser.py.

◆ number()

def lottie.utils.funky_parser.Parser.number (   self,
  default 
)

Definition at line 635 of file funky_parser.py.

◆ parse()

def lottie.utils.funky_parser.Parser.parse (   self)

Definition at line 488 of file funky_parser.py.

◆ position()

def lottie.utils.funky_parser.Parser.position (   self,
shapes.Group  shape,
float  time 
)

Definition at line 882 of file funky_parser.py.

◆ position_value()

def lottie.utils.funky_parser.Parser.position_value (   self,
NVector  start 
)

Definition at line 1048 of file funky_parser.py.

◆ possesive()

def lottie.utils.funky_parser.Parser.possesive (   self)

Definition at line 539 of file funky_parser.py.

◆ properties()

def lottie.utils.funky_parser.Parser.properties (   self,
  shape_data,
  callback,
  callback_args = [],
  words = ["with"] 
)

Definition at line 542 of file funky_parser.py.

◆ rect_properties()

def lottie.utils.funky_parser.Parser.rect_properties (   self,
ShapeData  shape_data,
  shape 
)

Definition at line 1231 of file funky_parser.py.

◆ require_one_of()

def lottie.utils.funky_parser.Parser.require_one_of (   self,
words 
)

Definition at line 519 of file funky_parser.py.

◆ shape_circle()

def lottie.utils.funky_parser.Parser.shape_circle (   self,
ShapeData  shape_data 
)

Definition at line 1119 of file funky_parser.py.

◆ shape_common_property()

def lottie.utils.funky_parser.Parser.shape_common_property (   self,
ShapeData  shape_data 
)

Definition at line 1072 of file funky_parser.py.

◆ shape_ellipse()

def lottie.utils.funky_parser.Parser.shape_ellipse (   self,
ShapeData  shape_data 
)

Definition at line 1301 of file funky_parser.py.

◆ shape_list()

def lottie.utils.funky_parser.Parser.shape_list (   self,
  parent 
)

Definition at line 704 of file funky_parser.py.

◆ shape_polygon()

def lottie.utils.funky_parser.Parser.shape_polygon (   self,
ShapeData  shape_data,
int   sides = None 
)

Definition at line 1166 of file funky_parser.py.

◆ shape_rectangle()

def lottie.utils.funky_parser.Parser.shape_rectangle (   self,
ShapeData  shape_data 
)

Definition at line 1292 of file funky_parser.py.

◆ shape_square()

def lottie.utils.funky_parser.Parser.shape_square (   self,
ShapeData  shape_data 
)

Definition at line 1109 of file funky_parser.py.

◆ shape_star()

def lottie.utils.funky_parser.Parser.shape_star (   self,
ShapeData  shape_data,
int   sides = None 
)

Definition at line 1128 of file funky_parser.py.

◆ shape_text()

def lottie.utils.funky_parser.Parser.shape_text (   self,
ShapeData  shape_data 
)

Definition at line 1307 of file funky_parser.py.

◆ simple_properties_callback()

def lottie.utils.funky_parser.Parser.simple_properties_callback (   self,
  object,
  properties 
)

Definition at line 566 of file funky_parser.py.

◆ size_multiplitier()

def lottie.utils.funky_parser.Parser.size_multiplitier (   self)

Definition at line 824 of file funky_parser.py.

◆ size_qualifier()

def lottie.utils.funky_parser.Parser.size_qualifier (   self)

Definition at line 806 of file funky_parser.py.

◆ skip_and()

def lottie.utils.funky_parser.Parser.skip_and (   self)

Definition at line 697 of file funky_parser.py.

◆ skip_words()

def lottie.utils.funky_parser.Parser.skip_words (   self,
words 
)

Definition at line 513 of file funky_parser.py.

◆ string()

def lottie.utils.funky_parser.Parser.string (   self,
  default 
)

Definition at line 645 of file funky_parser.py.

◆ time()

def lottie.utils.funky_parser.Parser.time (   self,
  default 
)

Definition at line 606 of file funky_parser.py.

◆ token()

def lottie.utils.funky_parser.Parser.token (   self)

Definition at line 434 of file funky_parser.py.

◆ vector_value()

def lottie.utils.funky_parser.Parser.vector_value (   self)

Definition at line 1040 of file funky_parser.py.

◆ warn()

def lottie.utils.funky_parser.Parser.warn (   self,
  message 
)

Definition at line 484 of file funky_parser.py.

Member Data Documentation

◆ allow_resize

lottie.utils.funky_parser.Parser.allow_resize

Definition at line 425 of file funky_parser.py.

◆ font

lottie.utils.funky_parser.Parser.font

Definition at line 428 of file funky_parser.py.

◆ lexer

lottie.utils.funky_parser.Parser.lexer

Definition at line 422 of file funky_parser.py.

◆ logger

lottie.utils.funky_parser.Parser.logger

Definition at line 424 of file funky_parser.py.

◆ lottie

lottie.utils.funky_parser.Parser.lottie

Definition at line 489 of file funky_parser.py.

◆ max_duration

lottie.utils.funky_parser.Parser.max_duration

Definition at line 426 of file funky_parser.py.

◆ prop_time

lottie.utils.funky_parser.Parser.prop_time

Definition at line 994 of file funky_parser.py.

◆ sides

dictionary lottie.utils.funky_parser.Parser.sides
static
Initial value:
= {
"penta": 5,
"hexa": 6,
"hepta": 7,
"octa": 8,
"ennea": 9,
"deca": 10,
}

Definition at line 412 of file funky_parser.py.

◆ svg_shapes

lottie.utils.funky_parser.Parser.svg_shapes

Definition at line 427 of file funky_parser.py.


The documentation for this class was generated from the following file: