import sys, json
sys.stdout.reconfigure(encoding='utf-8')
from pathlib import Path

bank_path = Path('Archivos/pose_bank/pose_bank.jsonl')

new_poses = [
    {
        'id': 'pb0057',
        'pose_line': 'leotard, fishnet_pantyhose, spread_legs, three_quarter_view, solo',
        'nivel': 'spicy',
        'tema': ['urban'],
        'provenance': 'danbooru_harvest_v3',
        'ref_png': 'refs/pb0057.png',
        'char': 'Nicole_Demara',
        'seed': 42,
        'lora_weight': 1.0,
        'fecha': '2026-11-02',
        'notas': 'cand_02 mapeada de lote grande'
    },
    {
        'id': 'pb0058',
        'pose_line': 'sitting, leg_lift, smiling, looking_at_viewer, solo',
        'nivel': 'sugerente',
        'tema': ['oficina'],
        'provenance': 'danbooru_harvest_v3',
        'ref_png': 'refs/pb0058.png',
        'char': 'Rias_Gremory',
        'seed': 42,
        'lora_weight': 1.0,
        'fecha': '2026-11-02',
        'notas': 'cand_04 mapeada de lote grande'
    },
    {
        'id': 'pb0059',
        'pose_line': 'bow, theatrical pose, looking_at_viewer, solo',
        'nivel': 'spicy',
        'tema': ['teatro', 'escenario'],
        'provenance': 'danbooru_harvest_v3',
        'ref_png': 'refs/pb0059.png',
        'char': 'Furina',
        'seed': 42,
        'lora_weight': 1.0,
        'fecha': '2026-11-02',
        'notas': 'cand_07 mapeada de lote grande'
    },
    {
        'id': 'pb0060',
        'pose_line': 'sitting, legs crossed, holding dice, confident smile, solo',
        'nivel': 'spicy',
        'tema': ['casino', 'lounge'],
        'provenance': 'danbooru_harvest_v3',
        'ref_png': 'refs/pb0060.png',
        'char': 'Yelan',
        'seed': 42,
        'lora_weight': 1.0,
        'fecha': '2026-11-02',
        'notas': 'cand_08 mapeada de lote grande'
    },
    {
        'id': 'pb0061',
        'pose_line': 'sitting, staring intently, solo',
        'nivel': 'sugerente',
        'tema': ['oficina'],
        'provenance': 'danbooru_harvest_v3',
        'ref_png': 'refs/pb0061.png',
        'char': 'Makima',
        'seed': 42,
        'lora_weight': 1.0,
        'fecha': '2026-11-02',
        'notas': 'cand_09 mapeada de lote grande'
    },
    {
        'id': 'pb0062',
        'pose_line': 'sitting on floor, sword in lap, solemn expression, solo',
        'nivel': 'spicy',
        'tema': ['misterio', 'etereo'],
        'provenance': 'danbooru_harvest_v3',
        'ref_png': 'refs/pb0062.png',
        'char': 'Raiden_Shogun',
        'seed': 42,
        'lora_weight': 1.0,
        'fecha': '2026-11-02',
        'notas': 'cand_10 mapeada de lote grande'
    },
    {
        'id': 'pb0063',
        'pose_line': 'smiling, waving hand, solo',
        'nivel': 'sugerente',
        'tema': ['funeral', 'exterior'],
        'provenance': 'danbooru_harvest_v3',
        'ref_png': 'refs/pb0063.png',
        'char': 'Hu_Tao',
        'seed': 42,
        'lora_weight': 1.0,
        'fecha': '2026-11-02',
        'notas': 'cand_11 mapeada de lote grande'
    },
    {
        'id': 'pb0064',
        'pose_line': 'standing, looking back, gentle smile, solo',
        'nivel': 'sugerente',
        'tema': ['montaña', 'nieve'],
        'provenance': 'danbooru_harvest_v3',
        'ref_png': 'refs/pb0064.png',
        'char': 'Ganyu',
        'seed': 42,
        'lora_weight': 1.0,
        'fecha': '2026-11-02',
        'notas': 'cand_12 mapeada de lote grande'
    },
    {
        'id': 'pb0065',
        'pose_line': 'dancing pose, arms raised, smiling, solo',
        'nivel': 'spicy',
        'tema': ['teatro', 'danza'],
        'provenance': 'danbooru_harvest_v3',
        'ref_png': 'refs/pb0065.png',
        'char': 'Nilou',
        'seed': 42,
        'lora_weight': 1.0,
        'fecha': '2026-11-02',
        'notas': 'cand_13 mapeada de lote grande'
    },
    {
        'id': 'pb0066',
        'pose_line': 'holding pistol, aiming, focused expression, solo',
        'nivel': 'spicy',
        'tema': ['calle', 'accion'],
        'provenance': 'danbooru_harvest_v3',
        'ref_png': 'refs/pb0066.png',
        'char': 'Clorinde',
        'seed': 42,
        'lora_weight': 1.0,
        'fecha': '2026-11-02',
        'notas': 'cand_14 mapeada de lote grande'
    },
    {
        'id': 'pb0067',
        'pose_line': 'sitting, crossing legs, intimidating aura, solo',
        'nivel': 'spicy',
        'tema': ['trono', 'oscuro'],
        'provenance': 'danbooru_harvest_v3',
        'ref_png': 'refs/pb0067.png',
        'char': 'Arlecchino',
        'seed': 42,
        'lora_weight': 1.0,
        'fecha': '2026-11-02',
        'notas': 'cand_15 mapeada de lote grande'
    },
    {
        'id': 'pb0068',
        'pose_line': 'holding parasol over shoulder, cheerful smile, solo',
        'nivel': 'sugerente',
        'tema': ['plaza', 'exterior'],
        'provenance': 'danbooru_harvest_v3',
        'ref_png': 'refs/pb0068.png',
        'char': 'Navia',
        'seed': 42,
        'lora_weight': 1.0,
        'fecha': '2026-11-02',
        'notas': 'cand_16 mapeada de lote grande'
    },
    {
        'id': 'pb0069',
        'pose_line': 'standing on rock, holding talismans, calm expression, solo',
        'nivel': 'sugerente',
        'tema': ['montaña', 'niebla'],
        'provenance': 'danbooru_harvest_v3',
        'ref_png': 'refs/pb0069.png',
        'char': 'Shenhe',
        'seed': 42,
        'lora_weight': 1.0,
        'fecha': '2026-11-02',
        'notas': 'cand_17 mapeada de lote grande'
    },
    {
        'id': 'pb0070',
        'pose_line': 'holding claymore, dynamic stance, fierce look, solo',
        'nivel': 'spicy',
        'tema': ['nieve', 'combate'],
        'provenance': 'danbooru_harvest_v3',
        'ref_png': 'refs/pb0070.png',
        'char': 'Eula',
        'seed': 42,
        'lora_weight': 1.0,
        'fecha': '2026-11-02',
        'notas': 'cand_18 mapeada de lote grande'
    },
    {
        'id': 'pb0071',
        'pose_line': 'reading documents, focused, solo',
        'nivel': 'sugerente',
        'tema': ['oficina', 'despacho'],
        'provenance': 'danbooru_harvest_v3',
        'ref_png': 'refs/pb0071.png',
        'char': 'Jean',
        'seed': 42,
        'lora_weight': 1.0,
        'fecha': '2026-11-02',
        'notas': 'cand_19 mapeada de lote grande'
    },
    {
        'id': 'pb0072',
        'pose_line': 'leaning against shelf, holding book, teasing smile, solo',
        'nivel': 'spicy',
        'tema': ['biblioteca', 'archivo'],
        'provenance': 'danbooru_harvest_v3',
        'ref_png': 'refs/pb0072.png',
        'char': 'Lisa',
        'seed': 42,
        'lora_weight': 1.0,
        'fecha': '2026-11-02',
        'notas': 'cand_20 mapeada de lote grande'
    }
]

with open(bank_path, 'a', encoding='utf-8') as f:
    for pose in new_poses:
        f.write(json.dumps(pose, ensure_ascii=False) + '\\n')

print(f'¡Se han añadido exitosamente {len(new_poses)} nuevas poses (pb0057 a pb0072) a {bank_path}!')
