GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — python-hwpx/docs/index.md at main · Ko-TTae/python-hwpx

Expand file tree

/

index.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
75 lines (57 loc) · 2.04 KB
/

index.md

Copy path

File metadata and controls

75 lines (57 loc) · 2.04 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

python-hwpx 문서

python-hwpx는 HWPX 문서를 읽고 편집하고 생성하는 파이썬 도구 모음입니다. 이 사이트는 파이썬 코드 예제를 중심으로 빠르게 실무에 적용할 수 있는 사용법을 안내합니다. 먼저 "5분 안에 문서 열기" 예제를 따라 한 뒤, 필요에 따라 설치, 사용 가이드, 참조 문서를 살펴보세요.

:maxdepth: 2
:hidden:
:caption: 시작하기

quickstart
installation
usage
examples
:maxdepth: 2
:hidden:
:caption: 심화 주제

schema-overview
faq
changelog
:maxdepth: 1
:hidden:
:caption: API 참조

api_reference

지금 바로 시작하기

아래는 python-hwpx의 대표적인 패턴 네 가지입니다.

  1. 로컬 HWPX 문서를 열어 문단을 읽어오기
  2. 빈 템플릿에서 새 문서를 만들고 표 및 메모를 추가하기
  3. 단락 삭제·섹션 추가 등 문서 구조 변경하기
  4. 완성된 문서를 파일로 저장하기

자세한 단계별 설명은 {doc}quickstart에서 확인할 수 있습니다.

from hwpx import HwpxDocument

# 1) 문서 열기
document = HwpxDocument.open("sample.hwpx")
print("문단 수:", len(document.paragraphs))

# 2) 새 문단과 메모 추가
section = document.sections[0]
paragraph = document.add_paragraph("자동으로 추가된 문단", section=section)

memo, _, field_id = document.add_memo_with_anchor(
    "검토 의견은 여기에 적으세요.",
    paragraph=paragraph,
    memo_shape_id_ref="0",
)

# 3) 단락 삭제 · 섹션 추가
document.remove_paragraph(document.paragraphs[-1])
new_sec = document.add_section()
new_sec.add_paragraph("새 섹션의 첫 문단")

# 4) 저장 (원자적 쓰기 + ZIP 무결성 검증)
document.save_to_path("updated-sample.hwpx")
- {doc}`quickstart` — 설치부터 첫 번째 문서를 편집하기까지 따라 하는 튜토리얼
- {doc}`usage` — 패키지 전반의 핵심 개념과 고급 편집 패턴
- {doc}`api_reference` — 세부 클래스와 함수 시그니처 모음
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.