아비멜렉

2025년 11월 14일 15:15분

package com.jesusbornd.genesis;
/*
 * Genesis_20_Chapter_Lv1_V2.java
 * [KO] 새 스타일: 창세기 20장 — 대표 4절(KRV+ESV) + 요약 + 적용
 * [EN] New style: Genesis 20 — 4 Key Verses (KRV+ESV) + Summary + Practice
 *
 * Variation (Java, V2):
 * - Text Block로 타이틀 선언, Function<Verse,String> 템플릿로 일괄 포맷
 * - StringJoiner로 버퍼링, 소형 하이라이터(“꿈/dream”, “선지자/prophet”, “기도/pray”)
 */

import java.util.List;
import java.util.StringJoiner;
import java.util.function.Function;

public class Genesis_20_Chapter_Lv1_V2 {

    // ---- Domain ----
    public record Verse(String ref, String krv, String esv) {}

    // Key 4: 20:3(꿈 경고), 20:6(막으심), 20:7(선지자·기도·회복), 20:17(아브라함의 기도와 치유)
    private static final List<Verse> VERSES = List.of(
        new Verse(
            "창세기 20:3 / Genesis 20:3",
            "하나님이 밤에 꿈으로 아비멜렉에게 이르시되 ‘네가 데려간 여인으로 말미암아 네가 죽으리니…’",
            "God came to Abimelech in a dream by night: “Behold, you are a dead man because of the woman you have taken.”"
        ),
        new Verse(
            "창세기 20:6 / Genesis 20:6",
            "내가 너로 범죄치 않게 막았음이라",
            "It was I who kept you from sinning against me."
        ),
        new Verse(
            "창세기 20:7 / Genesis 20:7",
            "그의 남편은 선지자라 그가 너를 위하여 기도하리니 네가 살리라. 그 여인을 돌려보내라",
            "He is a prophet; he will pray for you, and you shall live. Now then, return the man’s wife."
        ),
        new Verse(
            "창세기 20:17 / Genesis 20:17",
            "아브라함이 하나님께 기도하매 하나님이 아비멜렉과 그의 집을 고치사 아이를 낳게 하시니라",
            "Abraham prayed to God, and God healed Abimelech, and also healed his household so that they bore children."
        )
    );

    // ---- Title (Java text block) ----
    private static final String TITLE = """
            [창세기 20장 | KRV & ESV]
            [Genesis 20 | KRV & ESV]
            Lv1: Dream Warning — Kept from Sin — Prophet’s Prayer — Healing & Restoration
            """;

    // ---- Summary & Practice (KO/EN) ----
    private static final String SUMMARY_KO =
        "하나님은 꿈으로 경고하시고(20:3), 죄를 막으시며(20:6), 선지자의 중보를 통해 회복을 이루신다(20:7,17).";
    private static final String SUMMARY_EN =
        "God warns in a dream (20:3), restrains from sin (20:6), and restores through the prophet’s intercession (20:7,17).";

    private static final String PRACTICE_KO =
        "오늘 ‘막아 주심’을 기억하며 감사 1문장, 중보 기도 대상 1명 이름 부르기, 돌려보낼 것(소유·관계)의 순종 1가지.";
    private static final String PRACTICE_EN =
        "Thank God for His restraining grace (1 line), name one person to intercede for, and return one thing you must relinquish.";

    // ---- tiny console highlighter ----
    private static String hi(String s) {
        return s.replace("꿈", "[꿈]")
                .replace("dream", "[dream]")
                .replace("선지자", "[선지자]")
                .replace("prophet", "[prophet]")
                .replace("기도", "[기도]")
                .replace("pray", "[pray]");
    }

    public static void main(String[] args) {
        final String nl = System.lineSeparator();
        StringJoiner out = new StringJoiner(nl);

        // title
        out.add(TITLE.trim()).add("");

        // verse renderer
        Function<Verse, String> tmpl = v -> String.join(nl,
                v.ref(),
                "KRV: " + hi(v.krv()),
                "ESV: " + hi(v.esv()),
                ""
        );

        VERSES.forEach(v -> out.add(tmpl.apply(v)));

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

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

        System.out.println(out);
    }
}

#### Genesis_20_Chapter_Lv1_V2.py
#### [KO] 새 스타일: dict 기반 i18n + 제너레이터 파이프 + 하이라이트(꿈/dream, 선지자/prophet, 기도/pray)
#### [EN] New style: dict i18n + generator pipeline + tiny highlight

from dataclasses import dataclass
from typing import Iterable, List

def hi(s: str) -> str:
    return (s.replace("꿈", "[꿈]")
             .replace("dream", "[dream]")
             .replace("선지자", "[선지자]")
             .replace("prophet", "[prophet]")
             .replace("기도", "[기도]")
             .replace("pray", "[pray]"))

I18N = {
    "title_ko": "[창세기 20장 | KRV & ESV]",
    "title_en": "[Genesis 20 | KRV & ESV]",
    "deck": "Lv1: Dream Warning — Kept from Sin — Prophet’s Prayer — Healing & Restoration",
    "summary_hdr": "[요약 / Summary]",
    "practice_hdr": "[적용 / Practice]",
    "summary_ko": "하나님은 꿈으로 경고하시고(20:3), 죄를 막으시며(20:6), 선지자의 중보로 회복하신다(20:7,17).",
    "summary_en": "God warns by a dream (20:3), restrains from sin (20:6), and restores through a prophet’s prayer (20:7,17).",
    "practice_ko": "막아 주심에 감사 1문장 · 중보대상 1명 이름부르기 · 돌려보낼 것 1가지 순종.",
    "practice_en": "Thank for restraining grace; name one intercession target; return what you must relinquish."
}

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

VERSES: List[Verse] = [
    Verse("창세기 20:3 / Genesis 20:3",
          "하나님이 밤에 꿈으로 아비멜렉에게 경고하심",
          "God came to Abimelech in a dream by night and warned him."),
    Verse("창세기 20:6 / Genesis 20:6",
          "내가 너로 범죄치 않게 막았음이라",
          "It was I who kept you from sinning against me."),
    Verse("창세기 20:7 / Genesis 20:7",
          "그는 선지자라 그가 너를 위하여 기도할 것이라 — 그 여인을 돌려보내라",
          "He is a prophet and will pray for you — return the man’s wife."),
    Verse("창세기 20:17 / Genesis 20:17",
          "아브라함이 기도하매 하나님이 아비멜렉과 그의 집을 고치심",
          "Abraham prayed; God healed Abimelech and his household."),
]

def section_title() -> Iterable[str]:
    yield I18N["title_ko"]
    yield I18N["title_en"]
    yield I18N["deck"]
    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 I18N["summary_hdr"]
    yield "KO: " + I18N["summary_ko"]
    yield "EN: " + I18N["summary_en"]
    yield ""

def section_practice() -> Iterable[str]:
    yield I18N["practice_hdr"]
    yield "KO: " + I18N["practice_ko"]
    yield "EN: " + I18N["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월 14일 15:20분

악해지기 전에 먼저 막아 주시고, 꿈으로 경고하시며, 선지자의 [기도]로 결국 회복까지 이끌어 가시는 하나님… 죄를 짓지 않은 것도, 회복을 누리는 것도 다 은혜였음을 다시 고백하게 됩니다. 🙏✨



Search

← 목록으로