-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path_rhwp.pyi
More file actions
55 lines (47 loc) · 1.79 KB
/
_rhwp.pyi
File metadata and controls
55 lines (47 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
"""rhwp._rhwp — PyO3 Rust 확장의 타입 스텁.
``_Document`` 는 Rust thin core 로, 직접 사용하지 않는다. 사용자-대면 API 는
:class:`rhwp.Document` (Python wrapper) 와 :func:`rhwp.parse` 이다.
``rhwp.document`` 가 본 타입을 ``_inner`` 로 감싸고 메서드를 위임한다.
"""
from rhwp.ir.nodes import HwpDocument
__all__ = [
"_Document",
"rhwp_core_version",
"version",
]
def version() -> str:
"""rhwp Python 패키지 버전."""
...
def rhwp_core_version() -> str:
"""rhwp Rust 코어 버전."""
...
class _Document:
"""Rust thin core — Python wrapper 전용. 사용자는 :class:`rhwp.Document` 사용."""
source_uri: str | None
section_count: int
paragraph_count: int
page_count: int
def __init__(self, path: str) -> None: ...
@classmethod
def from_bytes(cls, data: bytes, *, source_uri: str | None = None) -> _Document: ...
def extract_text(self) -> str: ...
def paragraphs(self) -> list[str]: ...
def render_svg(self, page: int) -> str: ...
def render_all_svg(self) -> list[str]: ...
def export_svg(self, output_dir: str, prefix: str | None = None) -> list[str]: ...
def render_pdf(self) -> bytes: ...
def export_pdf(self, output_path: str) -> int: ...
def render_png(
self,
page: int,
*,
scale: float | None = None,
dpi: float | None = None,
max_pixels: int | None = None,
) -> bytes: ...
def render_all_png(self) -> list[bytes]: ...
def export_png(self, output_dir: str, *, prefix: str | None = None) -> list[str]: ...
def to_ir(self) -> HwpDocument: ...
def to_ir_json(self, *, indent: int | None = None) -> str: ...
def bytes_for_image_id(self, bin_data_id: int) -> bytes | None: ...
def __repr__(self) -> str: ...