xberg 1.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- xberg-1.1.0/Cargo.toml +138 -0
- xberg-1.1.0/LICENSE +21 -0
- xberg-1.1.0/PKG-INFO +16 -0
- xberg-1.1.0/crates/xberg-py/Cargo.lock +12123 -0
- xberg-1.1.0/crates/xberg-py/Cargo.toml +96 -0
- xberg-1.1.0/crates/xberg-py/src/LICENSE +21 -0
- xberg-1.1.0/crates/xberg-py/src/lib.rs +40045 -0
- xberg-1.1.0/crates/xberg-py/src/pyproject.toml +56 -0
- xberg-1.1.0/crates/xberg-py/src/uv.lock +316 -0
- xberg-1.1.0/crates/xberg-py/src/xberg/py.typed +0 -0
- xberg-1.1.0/pyproject.toml +75 -0
- xberg-1.1.0/xberg/__init__.py +856 -0
- xberg-1.1.0/xberg/_xberg.pyi +6073 -0
- xberg-1.1.0/xberg/api.py +3081 -0
- xberg-1.1.0/xberg/exceptions.py +78 -0
- xberg-1.1.0/xberg/options.py +6943 -0
- xberg-1.1.0/xberg/py.typed +0 -0
xberg-1.1.0/Cargo.toml
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
[workspace]
|
|
2
|
+
resolver = "2"
|
|
3
|
+
members = ["crates/xberg-py"]
|
|
4
|
+
|
|
5
|
+
[workspace.package]
|
|
6
|
+
version = "1.1.0"
|
|
7
|
+
edition = "2024"
|
|
8
|
+
rust-version = "1.92"
|
|
9
|
+
authors = ["Na'aman Hirschfeld <naaman@xberg.io>"]
|
|
10
|
+
license = "MIT"
|
|
11
|
+
repository = "https://github.com/xberg-io/xberg"
|
|
12
|
+
homepage = "https://xberg.io"
|
|
13
|
+
|
|
14
|
+
[workspace.dependencies]
|
|
15
|
+
ahash = { version = "0.8.12", features = ["serde"] }
|
|
16
|
+
anyhow = "1.0"
|
|
17
|
+
async-trait = "0.1.92"
|
|
18
|
+
base64 = "0.23.1"
|
|
19
|
+
blake3 = "1"
|
|
20
|
+
bytes = { version = "1", features = ["serde"] }
|
|
21
|
+
candle-core = { version = "0.11", default-features = false }
|
|
22
|
+
candle-nn = { version = "0.11", default-features = false }
|
|
23
|
+
candle-transformers = { version = "0.11", default-features = false }
|
|
24
|
+
cc = "1.4"
|
|
25
|
+
cfb = "0.14"
|
|
26
|
+
chrono = "0.4"
|
|
27
|
+
clap = { version = "4.6", features = ["derive", "color", "suggestions"] }
|
|
28
|
+
comrak = { version = "0.54", default-features = false }
|
|
29
|
+
console_error_panic_hook = "0.1"
|
|
30
|
+
crawlberg = { version = "1.5.2", default-features = false }
|
|
31
|
+
criterion = { version = "0.8", features = ["html_reports"] }
|
|
32
|
+
dbase = "0.8"
|
|
33
|
+
flate2 = "1.1"
|
|
34
|
+
fs2 = "0.4.3"
|
|
35
|
+
futures = "0.3"
|
|
36
|
+
getrandom = { version = "0.4.3", features = ["wasm_js"] }
|
|
37
|
+
hex = "0.4.3"
|
|
38
|
+
html-to-markdown-rs = { version = "3.12", default-features = false }
|
|
39
|
+
image = { version = "0.25.10", default-features = false }
|
|
40
|
+
itertools = "0.15"
|
|
41
|
+
js-sys = "0.3"
|
|
42
|
+
|
|
43
|
+
lazy_static = "1.5.0"
|
|
44
|
+
libc = "0.2.189"
|
|
45
|
+
# Builds a bundled zlib from source (`static`) for the target, so the vendored
|
|
46
|
+
# librevenge RVNGZipStream.cpp can `#include <zlib.h>` and link zlib even under
|
|
47
|
+
# cross-compilation (zigbuild aarch64/musl) where no host libz is usable.
|
|
48
|
+
# Only consumed by crates/xberg-libwpd. ~keep
|
|
49
|
+
libz-sys = { version = "1.1", features = ["static"] }
|
|
50
|
+
liter-llm = { version = "1.19.2", default-features = false }
|
|
51
|
+
# `std` is NOT a default feature of `log`. `pdf::render`'s glyph-drop warning capture
|
|
52
|
+
# calls `log::set_boxed_logger`, which only exists behind it, so a feature set that
|
|
53
|
+
# happens not to pull `log/std` in transitively fails to compile (`pdf` without `ocr`
|
|
54
|
+
# did exactly that). Requesting it here makes the requirement explicit instead of
|
|
55
|
+
# leaving it to whichever unrelated crate enables it first.
|
|
56
|
+
log = { version = "0.4", features = ["std"] }
|
|
57
|
+
memmap2 = "0.9"
|
|
58
|
+
mime = "0.3.17"
|
|
59
|
+
minijinja = "2"
|
|
60
|
+
nom-exif = { version = "3.7", default-features = false }
|
|
61
|
+
num_cpus = "1.17.0"
|
|
62
|
+
once_cell = "1.21.4"
|
|
63
|
+
|
|
64
|
+
ort = { version = "2.0.0-rc.13", default-features = false, features = ["std", "api-18"] }
|
|
65
|
+
parking_lot = "0.12.5"
|
|
66
|
+
# Our fork of pdfium-render. `package =` keeps the extern crate name `pdfium_render`
|
|
67
|
+
# (matches the `[lib] name = "pdfium_render"` in crates/xberg-pdfium-render/Cargo.toml),
|
|
68
|
+
# so any `use pdfium_render::...` call site is unaffected. Path dependency inside the
|
|
69
|
+
# workspace; needs no [patch.crates-io] entry (see the note above that block).
|
|
70
|
+
pdfium-render = { package = "xberg-pdfium-render", version = "1.1.0" }
|
|
71
|
+
rayon = "1.12.0"
|
|
72
|
+
reqwest = { version = "0.13.4", default-features = false }
|
|
73
|
+
# SVG rendering (resvg re-exports tiny_skia and usvg; default-features = false
|
|
74
|
+
# drops text, system-fonts, memmap-fonts, raster-images — all pure-Rust, WASM-safe).
|
|
75
|
+
resvg = { version = "0.48", default-features = false }
|
|
76
|
+
rusqlite = { version = "0.40", default-features = false, features = ["bundled", "hooks", "serialize"] }
|
|
77
|
+
same-file = "1.0.6"
|
|
78
|
+
sceptre = { version = "0.7.2", default-features = false }
|
|
79
|
+
|
|
80
|
+
serde = { version = "1.0.229", features = ["derive"] }
|
|
81
|
+
serde_json = { version = "1.0.151" }
|
|
82
|
+
serde_toon_format = "0.1"
|
|
83
|
+
sha2 = "0.11"
|
|
84
|
+
similar = "3"
|
|
85
|
+
sqlite-vec = "0.1"
|
|
86
|
+
tar = "0.4"
|
|
87
|
+
tempfile = "3.27.0"
|
|
88
|
+
thiserror = "2.0.20"
|
|
89
|
+
# `process`, `fs`, and `rt-multi-thread` are deliberately excluded from this baseline: tokio's
|
|
90
|
+
# own wasm32 gate (tokio-1.x src/lib.rs) hard-`compile_error!`s unless only
|
|
91
|
+
# sync/macros/io-util/rt/time are active (`process` additionally pulls mio's
|
|
92
|
+
# `net`/`os-poll`/`os-ext`, which fails to build on wasm32 regardless). These OS-dependent
|
|
93
|
+
# features are re-added only on consuming crates' `[target.'cfg(not(target_arch =
|
|
94
|
+
# "wasm32"))'.dependencies]` blocks (see crates/xberg/Cargo.toml and crates/xberg-cli/Cargo.toml).
|
|
95
|
+
tokio = { version = "1.53.1", features = [
|
|
96
|
+
"rt",
|
|
97
|
+
"macros",
|
|
98
|
+
"sync",
|
|
99
|
+
"time",
|
|
100
|
+
"io-util",
|
|
101
|
+
] }
|
|
102
|
+
toml = "1.1.5"
|
|
103
|
+
tracing = "0.1"
|
|
104
|
+
# Pure-Rust ONNX inference engine (Sonos). Alternative InferenceBackend to `ort` on
|
|
105
|
+
# no-ORT targets (wasm32, x86_64-linux-android). The ONNX frontend crate is CPU-only
|
|
106
|
+
# and WASM-safe; the top-level `tract` facade instead defaults to CUDA and bundles
|
|
107
|
+
# GPU backends, so it is unusable here. See issue #1275.
|
|
108
|
+
tract-onnx = { version = "0.23.6", default-features = false }
|
|
109
|
+
tree-sitter-language-pack = { version = "1.16.2", default-features = false, features = ["serde"] }
|
|
110
|
+
url = "2.5.8"
|
|
111
|
+
# usvg (re-exported by resvg) with only the `writer` feature so `Tree::to_string`
|
|
112
|
+
# / `WriteOptions` are available for SVG sanitize re-serialization. `writer` pulls
|
|
113
|
+
# just xmlwriter + base64 — pure-Rust, WASM-safe, no fonts. resvg 0.48 forwards no
|
|
114
|
+
# `writer` feature of its own, so usvg is enabled directly; versions unify at 0.48.
|
|
115
|
+
usvg = { version = "0.48", default-features = false, features = ["writer"] }
|
|
116
|
+
wasm-bindgen = { version = "0.2", features = ["enable-interning"] }
|
|
117
|
+
wasm-bindgen-futures = "0.4"
|
|
118
|
+
web-sys = { version = "0.3", features = [
|
|
119
|
+
"Blob",
|
|
120
|
+
"File",
|
|
121
|
+
"FileReader",
|
|
122
|
+
"console",
|
|
123
|
+
"TextDecoder",
|
|
124
|
+
"ImageData",
|
|
125
|
+
"Window",
|
|
126
|
+
"Response",
|
|
127
|
+
] }
|
|
128
|
+
xberg = { version = "1.1.0", default-features = false }
|
|
129
|
+
xberg-gliner = { version = "1.1.0", default-features = false }
|
|
130
|
+
# The native PDF engine, vendored into this workspace at crates/xberg-native-pdf. It began as
|
|
131
|
+
# a fork of a third-party project; see ATTRIBUTIONS.md, which is now the ONLY place in this
|
|
132
|
+
# repo that names the upstream. There is deliberately no `package =` alias: the extern crate
|
|
133
|
+
# name is the real one, so `use xberg_native_pdf::...` at every call site, and the tracing log
|
|
134
|
+
# target (`module_path!()`, rooted at `[lib] name`) matches the crate you are reading. An alias
|
|
135
|
+
# hiding a different lib name is what cost twelve days of dropped font warnings in GH#697.
|
|
136
|
+
# Path dependency inside the workspace; needs no [patch.crates-io] entry.
|
|
137
|
+
xberg-native-pdf = { version = "1.1.0" }
|
|
138
|
+
|
xberg-1.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 Kreuzberg, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
xberg-1.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: xberg
|
|
3
|
+
Version: 1.1.0
|
|
4
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
5
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
6
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
7
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Summary: High-performance document intelligence library
|
|
12
|
+
Keywords: document,extraction,ocr,pdf,text
|
|
13
|
+
Author: Na'aman Hirschfeld <naaman@xberg.io>
|
|
14
|
+
License-Expression: MIT
|
|
15
|
+
Requires-Python: >=3.10
|
|
16
|
+
Project-URL: repository, https://github.com/xberg-io/xberg
|