|
|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
import os
|
|
|
|
|
import sys
|
|
|
|
|
import glob
|
|
|
|
|
import re
|
|
|
|
|
from lxml import etree
|
|
|
|
|
|
|
|
|
|
def parse_xml(file_path):
|
|
|
|
|
@ -26,6 +27,7 @@ def update_target_file(source_tree, target_tree):
|
|
|
|
|
def process_files(source_dir, target_dir):
|
|
|
|
|
"""Process all .nfo files in source_dir and update matching files in target_dir."""
|
|
|
|
|
source_files = glob.glob(os.path.join(source_dir, "*.nfo"))
|
|
|
|
|
target_files = re.sub(r'(\[|\])', r'[\1]', target_files)
|
|
|
|
|
target_files = glob.glob(os.path.join(target_dir, "*.nfo"))
|
|
|
|
|
|
|
|
|
|
for src_file in source_files:
|
|
|
|
|
|