모리아땅

2025년 11월 18일 11:19분

package com.jesusbornd.genesis;
/*
 * Genesis_22_Chapter_Lv1_V2.java
 * [KO] 새 스타일: 창세기 22장 — 대표 4절(KRV+ESV) + 요약 + 적용
 * [EN] New style: Genesis 22 — 4 Key Verses (KRV+ESV) + Summary + Practice
 *
 * Variation (Java, V2):
 * 1) Mini DSL: builder 스타일 Formatter로 일관 출력 (Title → Verses → Summary → Practice)
 * 2) 하이라이트: 여호와 이레 / The LORD will provide, 네 아들 독자 / your only son
 * 3) POJO + StringBuilder (JDK17 호환, 의존성 無)
 */
import java.util.ArrayList;
import java.util.List;
import java.util.function.UnaryOperator;

public class Genesis_22_Chapter_Lv1_V2 {

    // ---- Domain ----
    static final class Verse {
        final String ref, krv, esv;
        Verse(String ref, String krv, String esv) { this.ref = ref; this.krv = krv; this.esv = esv; }
    }

    // ---- Data (4 key verses): 22:2 / 22:8 / 22:12 / 22:14 ----
    private static final List<Verse> VERSES = new ArrayList<>();
    static {
        VERSES.add(new Verse(
            "창세기 22:2 / Genesis 22:2",
            "네 아들 곧 네 사랑하는 [독자] 이삭을 데리고 모리아 땅으로 가서… 번제로 드리라",
            "Take your son, your [only son] Isaac, whom you love, and go to the land of Moriah… offer him there as a burnt offering."
        ));
        VERSES.add(new Verse(
            "창세기 22:8 / Genesis 22:8",
            "아브라함이 이르되 ‘아들아 번제할 어린 양은 [하나님이 자기를 위하여 친히 준비하시리라]’",
            "Abraham said, “God will [provide] for himself the lamb for a burnt offering, my son.”"
        ));
        VERSES.add(new Verse(
            "창세기 22:12 / Genesis 22:12",
            "이제야 네가 하나님을 [경외]하는 줄을 내가 아노라 — 네 아들 [독자]도 아끼지 아니하였도다",
            "Now I know that you [fear] God, seeing you have not withheld your [only son] from me."
        ));
        VERSES.add(new Verse(
            "창세기 22:14 / Genesis 22:14",
            "아브라함이 그 곳 이름을 [여호와 이레]라 하였으므로… 오늘날까지 ‘여호와의 산에서 준비되리라’ 하더라",
            "So Abraham called the name of that place, “[The LORD will provide]”; as it is said to this day, “On the mount of the LORD it shall be provided.”"
        ));
    }

    // ---- Labels & Texts ----
    private static final String TITLE = """
            [창세기 22장 | KRV & ESV]
            [Genesis 22 | KRV & ESV]
            Lv1: Only Son — God Will Provide — Fear of God — Jehovah Jireh
            """.trim();

    private static final String SUMMARY_KO =
        "하나님은 ‘독자 이삭’의 바침을 요구하시나(22:2) 아브라함은 ‘하나님이 친히 준비하심’을 신뢰한다(22:8). "
      + "시험을 통과함으로 하나님을 경외함이 드러나고(22:12), ‘여호와 이레’의 이름이 선포된다(22:14).";
    private static final String SUMMARY_EN =
        "God commands the offering of the ‘only son’ (22:2); Abraham trusts that ‘God will provide’ (22:8). "
      + "His fear of God is proven (22:12), and ‘Jehovah Jireh’ is proclaimed (22:14).";

    private static final String PRACTICE_KO =
        "가장 소중한 것 1가지를 하나님께 ‘내려놓는’ 기도, ‘여호와 이레’ 신뢰 고백 1문장, 오늘 순종 1걸음.";
    private static final String PRACTICE_EN =
        "Pray to lay down your dearest one thing; confess ‘The LORD will provide’ once; take one step of obedience today.";

    // ---- Highlighter ----
    private static final UnaryOperator<String> HI = s -> s
        .replace("여호와 이레", "[여호와 이레]")
        .replace("provide", "[provide]")
        .replace("The LORD will provide", "[The LORD will provide]")
        .replace("독자", "[독자]")
        .replace("only son", "[only son]")
        .replace("경외", "[경외]")
        .replace("fear", "[fear]");

    // ---- Mini DSL Formatter ----
    static final class Out {
        private final String nl = System.lineSeparator();
        private final StringBuilder sb = new StringBuilder(2048);
        Out add(String s) { sb.append(s).append(nl); return this; }
        Out blank() { sb.append(nl); return this; }
        @Override public String toString() { return sb.toString(); }
    }

    public static void main(String[] args) {
        Out out = new Out();

        // Title
        out.add(TITLE).blank();

        // Verses
        for (Verse v : VERSES) {
            out.add(v.ref)
               .add("KRV: " + HI.apply(v.krv))
               .add("ESV: " + HI.apply(v.esv))
               .blank();
        }

        // Summary
        out.add("[요약 / Summary]")
           .add("KO: " + SUMMARY_KO)
           .add("EN: " + SUMMARY_EN)
           .blank();

        // Practice
        out.add("[적용 / Practice]")
           .add("KO: " + PRACTICE_KO)
           .add("EN: " + PRACTICE_EN);

        System.out.print(out);
    }
}

#### Genesis_22_Chapter_Lv1_V2.py
#### [KO] Lv1 변주: 작은 템플릿 + 하이라이트 + 제너레이터 파이프
#### [EN] Lv1 variation: tiny template + highlight + generator pipeline

from dataclasses import dataclass
from typing import Iterable, List

def hi(s: str) -> str:
    return (s.replace("여호와 이레", "[여호와 이레]")
             .replace("The LORD will provide", "[The LORD will provide]")
             .replace("provide", "[provide]")
             .replace("독자", "[독자]")
             .replace("only son", "[only son]")
             .replace("경외", "[경외]")
             .replace("fear", "[fear]"))

@dataclass(frozen=True)
class Verse:
    ref: str
    krv: str
    esv: str

# 22:2 / 22:8 / 22:12 / 22:14
VERSES: List[Verse] = [
    Verse("창세기 22:2 / Genesis 22:2",
          "네 사랑하는 [독자] 이삭을 모리아로 데리고 가 번제로 드리라",
          "Take your [only son] Isaac to Moriah… offer him there."),
    Verse("창세기 22:8 / Genesis 22:8",
          "번제할 어린양은 하나님이 친히 [준비]하시리라",
          "God will [provide] for himself the lamb for a burnt offering."),
    Verse("창세기 22:12 / Genesis 22:12",
          "이제야 네가 하나님을 [경외]하는 줄을 내가 아노라 — 네 [독자]도 아끼지 아니하였도다",
          "Now I know that you [fear] God, seeing you have not withheld your [only son]."),
    Verse("창세기 22:14 / Genesis 22:14",
          "그 곳 이름을 [여호와 이레]라 하니… ‘여호와의 산에서 준비되리라’",
          "He called that place “[The LORD will provide]”… ‘On the mount of the LORD it shall be provided.’"),
]

TITLE = (
    "[창세기 22장 | KRV & ESV]",
    "[Genesis 22 | KRV & ESV]",
    "Lv1: Only Son — God Will Provide — Fear of God — Jehovah Jireh"
)

SUMMARY_KO = ("하나님은 ‘독자’를 요구하시나(22:2) 아브라함은 ‘여호와 이레’를 신뢰한다(22:8). "
              "시험을 통해 경외가 증명되고(22:12), ‘준비하시는 하나님’이 선포된다(22:14).")
SUMMARY_EN = ("God commands the ‘only son’ (22:2); Abraham trusts ‘The LORD will provide’ (22:8). "
              "His fear of God is proven (22:12), and the God-who-provides is proclaimed (22:14).")

PRACTICE_KO = "내려놓음의 기도 1가지 · ‘여호와 이레’ 고백 1문장 · 순종 1걸음."
PRACTICE_EN = "One prayer of surrender; one ‘The LORD will provide’ confession; one step of obedience."

def section_title() -> Iterable[str]:
    yield TITLE[0]; yield TITLE[1]; yield TITLE[2]; yield ""

def section_verses() -> Iterable[str]:
    for v in VERSES:
        yield v.ref
        yield "KRV: " + hi(v.krv)
        yield "ESV: " + hi(v.esv)
        yield ""

def section_summary() -> Iterable[str]:
    yield "[요약 / Summary]"
    yield "KO: " + SUMMARY_KO
    yield "EN: " + SUMMARY_EN
    yield ""

def section_practice() -> Iterable[str]:
    yield "[적용 / Practice]"
    yield "KO: " + PRACTICE_KO
    yield "EN: " + PRACTICE_EN

def main() -> None:
    for sec in (section_title, section_verses, section_summary, section_practice):
        for line in sec():
            print(line)

if __name__ == "__main__":
    main()

Comments

Avatar
 2025년 11월 18일 11:21분

“믿음의 절정이 한 장에 응축된 느낌. 준비하시는 주님이 이미 모든 문장에 배어 있어요.”



Search

← 목록으로