Capafy
시작하기
Link Setting Notes with Lore Cards

Link Setting Notes with Lore Cards

Turn structured world setting notes into one literal card per entry. Get a line-numbered list of mentions between entries while each source line is preserved. #글쓰기

평점
더 많은 평가가 필요합니다
판매
0
사용 방법
다운로드

Turn structured world setting notes into one literal card per entry.
Get a line-numbered list of mentions between entries while each source line is preserved.

Lore Cards — Paste Setting Notes, Get Linked Entry Cards

Paste structured world setting notes and get one literal card per entry plus a line-numbered list of mentions between entries. The tool preserves each source line and does not invent missing lore.

What it recognizes

  • # People / # Characters: following entries are categorized as person.
  • # Places / # Locations: following entries are categorized as place.
  • # Terms / # Glossary: following entries are categorized as term.
  • # 人物 / # 場所 / # 用語: following entries are categorized as person / place / term.
  • Name: description: one entry; category is unknown unless under a recognized heading.
  • - Name: description or - **Name**: description: one bullet entry.
  • 1. Name: description, 1) Name: description, ・Name: description, or – Name: description: list markers are removed before parsing.
  • Name:description, Name — description, or Name - description: full-width colon and spaced dash separators are accepted.
  • Output formats: Markdown (human-readable cards and links), JSON (structured cards and links), CSV (spreadsheet-friendly cards and links).

Names mentioned in another entry's description create directed links with source and target line numbers plus the original evidence line. Names are matched case-insensitively after Unicode NFC normalization. Latin, Greek, and Cyrillic letters and digits use word boundaries, preventing partial matches inside longer words; other scripts match character by character. Repeated mentions produce repeated links. An unrecognized Markdown heading resets the category to unknown.

Indented continuation lines are appended to the previous entry's description, including lines that begin with #. Nonblank rows that cannot be classified are preserved in an Unreadable lines section with their source line, text, and a count. Names longer than 160 characters and URL or time-like names are listed there instead of being parsed as cards. URLs and times are preserved as ordinary description text when the row has a valid entry structure. When names overlap, the longest name is linked at that text position. Markdown output flattens embedded line breaks for readable cards and tables; JSON and CSV preserve the original line breaks. Links to duplicate names include a same_name_count marker. CSV formula protection covers =, +, @, and a leading - immediately followed by text; normal - list markers in source evidence are preserved. If the terminal cannot encode output text, the command returns one error: line with code 2 and asks you to use --output.

Run

Python 3.9+; standard library only.

python3 scripts/lore_cards.py examples/setting_notes.md
python3 scripts/lore_cards.py examples/setting_notes.md --format json
python3 scripts/lore_cards.py examples/setting_notes.md --format csv --output result.csv

The Markdown output for the included example is in the package's examples folder. Save notes as UTF-8. Empty files, malformed notes, unsupported encodings, oversized inputs, and unwritable output paths return one error: line and exit code 2. An explicit output path must differ from the input path.

Limits

Up to 200,000 input bytes, 500 entries, 160 characters per name, and 2,000 characters per line. Blank descriptions remain blank. Unrecognized categories are unknown. Nothing is inferred from text outside the listed entry names.

Tests

python3 -m unittest discover tests