parameters: (file_name)
return_statement: return json.dumps(modify_final_dump(settings.lottie_format))
docstring: Driver function for parsing .sif to lottie(.json) format
  
      Args:
          file_name (str) : Synfig file name that needs to be parsed to Lottie format
  
      Returns:
          (str) : File name in json format
docstring_summary: Driver function for parsing .sif to lottie(.json) format
docstring_tokens: Driver function for parsing . sif to lottie ( . json ) format
function: def parse(file_name):
      """
      Driver function for parsing .sif to lottie(.json) format
  
      Args:
          file_name (str) : Synfig file name that needs to be parsed to Lottie format
  
      Returns:
          (str) : File name in json format
      """
      tree = etree.parse(file_name)
      root = tree.getroot()  # canvas
      gen_canvas(settings.lottie_format, root)
  
      # Storing the file name
      settings.file_name["fn"] = file_name
  
      # Storing the file directory
      settings.file_name["fd"] = os.path.dirname(file_name)
  
      # Initialize the logging
      init_logs()
  
      settings.lottie_format["layers"] = []
      canvas = Canvas(root)
      gen_layers(settings.lottie_format["layers"], canvas, canvas.get_num_layers() - 1)
  
      return json.dumps(modify_final_dump(settings.lottie_format))
function_tokens: def parse ( file_name ) : tree = etree . parse ( file_name ) root = tree . getroot ( ) # canvas gen_canvas ( settings . lottie_format , root ) # Storing the file name settings . file_name [ "fn" ] = file_name # Storing the file directory settings . file_name [ "fd" ] = os . path . dirname ( file_name ) # Initialize the logging init_logs ( ) settings . lottie_format [ "layers" ] = [ ] canvas = Canvas ( root ) gen_layers ( settings . lottie_format [ "layers" ] , canvas , canvas . get_num_layers ( ) - 1 ) return json . dumps ( modify_final_dump ( settings . lottie_format ) )