import sys
sys.path.insert(0, 'src')
sys.stdout.reconfigure(encoding='utf-8')

from unify_feedback import *

file_path = r'.claude\memory\class\发现世界-周四19点\梁昕乔\feedback\20260514_DISC-011.md'
file_info = extract_file_info(file_path)
print('文件信息:', file_info)
print('---')

with open(file_path, 'r', encoding='utf-8') as f:
    text = f.read()
print('原始内容前200字:')
print(text[:200])
print('...')

parsed = parse_feedback_content(text, file_info)
print('解析结果:')
for k, v in parsed.items():
    if isinstance(v, list):
        print(f'  {k}: {v}')
    else:
        display = v[:100] if len(v) > 100 else v
        print(f'  {k}: {display}')

print('---')
new_text = format_feedback(file_info, parsed)
print('新格式:')
print(new_text)