cd "$HOME/mnt/PixelstoMotors/ハコブくん/4コママンガ作成データ/縦長試作_20261030"; python3 - <<'EOF' T_LIST="- Nurse Takasugi — SHORT chin-length straight black BOB with bangs, no glasses (her labelled reference sheet)" O_LIST="- Nurse Oshiro — black hair pulled back tight into a BUN at the back of the head, NOT a bob (her labelled reference sheet)" HAIR_BLOCK="""WHO IS WHO — HAIR IS THE KEY, NEVER SWAP: - every reference image is labelled with the character's name. Match each character ONLY to her own labelled sheet - Takasugi: SHORT chin-length black BOB, the hair ends at the jaw line. Her hair NEVER reaches her shoulders. NO long hair, NO ponytail, NO bun - Oshiro: hair pulled back into a BUN at the back of her head, forehead and ears visible. NEVER a bob, NEVER hair hanging down """ TAKA_ONLY_BLOCK="""TAKASUGI'S HAIR — MATCH HER LABELLED SHEET: - Takasugi has SHORT chin-length straight black BOB hair with bangs, the hair ends at the jaw line. Her hair NEVER reaches her shoulders. NO long hair, NO ponytail, NO bun """ HAKO_SHAPE="""HAKOBUKUN SHAPE — AS ON ITS LABELLED SHEET: - a NARROWER head unit carrying the screen sits on TOP of a WIDER body. The screen faces the SAME direction as the front of the body - the circular ring panel is on its SIDE, never on the face side. Do NOT draw it as a box with the screen on its side, NOT like a TV or microwave - the body is complete from the head unit down to the black band and the dotted base; it is NOT squashed short """ def fix(n, s): s=s.replace("- Nurse Takasugi (hair worn down, no glasses)\n", T_LIST+"\n") s=s.replace("- Nurse Takasugi\n", T_LIST+"\n") s=s.replace("- Nurse Oshiro (bun)\n", O_LIST+"\n") s=s.replace("- Hakobukun\n", "- Hakobukun (its labelled orthographic sheet: front, side, rear)\n",1) s=s.replace("Her hair is worn down, as dark as on the sheet","Her hair is a SHORT chin-length black BOB exactly as on her sheet, as dark as on the sheet") s=s.replace("- her hair is worn down at the length shown on her reference sheet, as dark as on the sheet","- her hair is a SHORT chin-length black BOB exactly as on her reference sheet, as dark as on the sheet") i=s.index("COSTUME CONSISTENCY") if "COSTUME CONSISTENCY" in s else s.index("HAKOBUKUN — TEXT-FREE") s=s[:i]+(HAIR_BLOCK if n in (3,4) else TAKA_ONLY_BLOCK)+"\n"+s[i:] if n==4: old="- Hakobukun's body is rotated about 45° to face camera-LEFT, toward Takasugi — the viewer sees its screen in three-quarter view and its LEFT side with the circular ring panel\n" assert old in s s=s.replace(old, old+"- in the picture the screen is on the LEFT part of the robot, angled toward Takasugi; its side with the circular ring panel shows to the RIGHT of the screen\n") j=s.index("HAKOBUKUN ORIENTATION") s=s[:j]+HAKO_SHAPE+"\n"+s[j:] old="- draw each line ONCE." s=s.replace(old,"- Takasugi's bubble holds exactly three short lines: 押していいって、 / どこにも / 書いてないのよ — the kanji 書 appears ONLY ONCE\n"+old,1) return s for n in (2,3,4): s=fix(n, open(f"第61話_P{n}_プロンプト.txt",encoding='utf-8').read()) assert "worn down" not in s, n open(f"第61話_P{n}_プロンプト_v2.txt",'w',encoding='utf-8').write(s) print(n, len(s.encode())) EOF