-
-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathwriter.pyi
More file actions
97 lines (84 loc) · 2.8 KB
/
writer.pyi
File metadata and controls
97 lines (84 loc) · 2.8 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
from __future__ import annotations
import datetime
import enum
import pathlib
import types
from collections.abc import Callable, Generator
from typing import Self
class Compression(enum.Enum):
none: Self
zstd: Self
class Hint(enum.Enum):
COMPRESS: Self
FRONT_ARTICLE: Self
class Blob:
def __init__(self, content: str | bytes) -> None: ...
def size(self) -> int: ...
ref_content: bytes
class ContentProvider:
def feed(self) -> Blob: ...
def get_size(self) -> int: ...
def gen_blob(self) -> Generator[Blob, None, None]: ...
generator: Generator[Blob, None, None]
class StringProvider(ContentProvider):
def __init__(self, content: str | bytes) -> None: ...
class FileProvider(ContentProvider):
def __init__(self, filepath: pathlib.Path | str) -> None: ...
class Item:
def get_path(self) -> str: ...
def get_title(self) -> str: ...
def get_mimetype(self) -> str: ...
def get_contentprovider(self) -> ContentProvider: ...
def get_hints(self) -> dict[Hint, int]: ...
def __repr__(self) -> str: ...
get_indexdata: Callable[[], IndexData | None] | None
_blob: Blob
class IndexData:
def has_indexdata(self) -> bool: ...
def get_title(self) -> str: ...
def get_content(self) -> str: ...
def get_keywords(self) -> str: ...
def get_wordcount(self) -> int: ...
def get_geoposition(self) -> tuple[float, float] | None: ...
class Creator:
def __init__(self, filename: pathlib.Path) -> None: ...
def config_verbose(self, verbose: bool) -> Self: ...
def config_compression(self, compression: Compression | str) -> Self: ...
def config_clustersize(self, size: int) -> Self: ...
def config_indexing(self, indexing: bool, language: str) -> Self: ...
def config_nbworkers(self, nb_workers: int) -> Self: ...
def set_mainpath(self, main_path: str) -> Self: ...
def add_illustration(self, size: int, content: bytes) -> None: ...
def add_item(self, writer_item: Item) -> None: ...
def add_metadata(
self,
name: str,
content: str | bytes | datetime.date | datetime.datetime,
mimetype: str = "text/plain;charset=UTF-8",
) -> None: ...
def add_redirection(
self,
path: str,
title: str,
target_path: str,
hints: dict[Hint, int],
) -> None: ...
def add_alias(
self,
path: str,
title: str,
target_path: str,
hints: dict[Hint, int],
) -> None: ...
def __enter__(self) -> Self: ...
def __exit__(
self,
exc_type: type[BaseException] | None,
exc_val: BaseException | None,
exc_tb: types.TracebackType | None,
) -> None: ...
@property
def filename(self) -> pathlib.Path: ...
def __repr__(self) -> str: ...
_filename: pathlib.Path
_started: bool