mirror of
https://github.com/iluvcapra/ptulsconv.git
synced 2025-12-31 08:50:48 +00:00
Progress with tqdm
This commit is contained in:
@@ -4,6 +4,7 @@ import sys
|
|||||||
from xml.etree.ElementTree import TreeBuilder, tostring
|
from xml.etree.ElementTree import TreeBuilder, tostring
|
||||||
import ptulsconv
|
import ptulsconv
|
||||||
|
|
||||||
|
from tqdm import tqdm
|
||||||
|
|
||||||
def fmp_dump(data, input_file_name, output):
|
def fmp_dump(data, input_file_name, output):
|
||||||
doc = TreeBuilder(element_factory=None)
|
doc = TreeBuilder(element_factory=None)
|
||||||
|
|||||||
@@ -3,8 +3,7 @@ from parsimonious.nodes import NodeVisitor, Node
|
|||||||
|
|
||||||
class DictionaryParserVisitor(NodeVisitor):
|
class DictionaryParserVisitor(NodeVisitor):
|
||||||
|
|
||||||
@staticmethod
|
def visit_document(self, node: Node, visited_children) -> dict:
|
||||||
def visit_document(node: Node, visited_children) -> dict:
|
|
||||||
files = next(iter(visited_children[1]), None)
|
files = next(iter(visited_children[1]), None)
|
||||||
clips = next(iter(visited_children[2]), None)
|
clips = next(iter(visited_children[2]), None)
|
||||||
plugins = next(iter(visited_children[3]), None)
|
plugins = next(iter(visited_children[3]), None)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ from parsimonious.exceptions import IncompleteParseError
|
|||||||
import math
|
import math
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from tqdm import tqdm
|
||||||
|
|
||||||
class Transformation:
|
class Transformation:
|
||||||
def transform(self, input_dict) -> dict:
|
def transform(self, input_dict) -> dict:
|
||||||
@@ -131,7 +132,8 @@ class TagInterpreter(Transformation):
|
|||||||
title_tags = self.parse_tags(input_dict['header']['session_name'], "<Session Name>")
|
title_tags = self.parse_tags(input_dict['header']['session_name'], "<Session Name>")
|
||||||
markers = sorted(input_dict['markers'], key=lambda m: m['location_decoded']['frame_count'])
|
markers = sorted(input_dict['markers'], key=lambda m: m['location_decoded']['frame_count'])
|
||||||
|
|
||||||
for track in input_dict['tracks']:
|
|
||||||
|
for track in tqdm(input_dict['tracks'], desc="Reading tracks...", unit='Track'):
|
||||||
if 'Muted' in track['state'] and self.ignore_muted:
|
if 'Muted' in track['state'] and self.ignore_muted:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user