xberg 1.1.4 → 1.2.1
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.
- checksums.yaml +4 -4
- data/ext/xberg_rb/native/Cargo.lock +201 -245
- data/ext/xberg_rb/native/Cargo.toml +6 -6
- data/ext/xberg_rb/src/lib.rs +40 -11
- data/lib/xberg/native.rb +46 -25
- data/lib/xberg/version.rb +2 -2
- data/sig/types.rbs +3 -2
- metadata +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:abef1befb10dea1a9036aba75dbba09f6fb1acfc3936b4f5212e08a58e9aeea3
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
|
|
6
6
|
[package]
|
|
7
7
|
name = "xberg-rb"
|
|
8
|
-
version = "1.1
|
|
8
|
+
version = "1.2.1"
|
|
9
9
|
edition = "2024"
|
|
10
10
|
license = "MIT"
|
|
11
11
|
description = "High-performance document intelligence library"
|
|
@@ -72,7 +72,7 @@ xml = ["xberg/xml"]
|
|
|
72
72
|
|
|
73
73
|
[dependencies]
|
|
74
74
|
async-trait = "0.1"
|
|
75
|
-
crawlberg = { default-features = false, version = "1.
|
|
75
|
+
crawlberg = { default-features = false, version = "1.6.3" }
|
|
76
76
|
html-to-markdown-rs = { default-features = false, version = "3.12" }
|
|
77
77
|
magnus = "0.8"
|
|
78
78
|
rb-sys = ">=0.9.130, <0.10"
|
|
@@ -82,13 +82,13 @@ tokio = { version = "1", features = ["rt-multi-thread"] }
|
|
|
82
82
|
tracing = "0.1"
|
|
83
83
|
|
|
84
84
|
[target.'cfg(all(target_os = "macos", target_arch = "x86_64"))'.dependencies]
|
|
85
|
-
xberg = { version = "1.1
|
|
85
|
+
xberg = { version = "1.2.1", default-features = false, features = ["macos-intel-target", "simd-utf8"] }
|
|
86
86
|
|
|
87
87
|
[target.'cfg(not(any(target_os = "windows", all(target_os = "macos", target_arch = "x86_64"))))'.dependencies]
|
|
88
|
-
xberg = { version = "1.1
|
|
88
|
+
xberg = { version = "1.2.1", features = ["full", "pdf", "ocr", "paddle-ocr", "paddle-ocr-types", "layout-detection", "layout-types", "embeddings", "embedding-presets", "reranker", "reranker-presets", "sparse-embeddings", "sparse-embedding-presets", "late-interaction", "late-interaction-presets", "chunking", "keywords-yake", "keywords-rake", "language-detection", "html", "tree-sitter", "office", "email", "archives", "stopwords", "auto-rotate", "auto-rotate-types", "tokio-runtime", "api", "api-types", "mcp", "liter-llm", "quality", "svg", "transcription", "transcription-types", "classification", "captioning", "ner-onnx", "ner-llm", "diff", "markdown-footnotes", "redaction", "enrichment", "heuristics", "presets", "structured", "url-ingestion"] }
|
|
89
89
|
|
|
90
90
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
91
|
-
xberg = { version = "1.1
|
|
91
|
+
xberg = { version = "1.2.1", default-features = false, features = ["windows-gnu-target", "simd-utf8"] }
|
|
92
92
|
|
|
93
93
|
# This crate deliberately does not use `[lints]` / `workspace = true`: its C-ABI /
|
|
94
94
|
# PyO3 / napi / ext-php-rs / NIF boundary requires `unsafe` code, and the workspace's
|
data/ext/xberg_rb/src/lib.rs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is auto-generated by alef. DO NOT EDIT.
|
|
2
|
-
// alef:hash:
|
|
2
|
+
// alef:hash:de450ef973994691374dc94094e0cabe1cfd6a4d37af690bd2009a59cd8251e3
|
|
3
3
|
// Re-generate with: alef generate
|
|
4
4
|
#![allow(dead_code, unused_imports, unused_variables)]
|
|
5
5
|
#![allow(
|
|
@@ -30380,6 +30380,7 @@ pub struct ServerConfig {
|
|
|
30380
30380
|
cors_origins: Vec<String>,
|
|
30381
30381
|
max_request_body_bytes: usize,
|
|
30382
30382
|
max_multipart_field_bytes: usize,
|
|
30383
|
+
job_timeout_secs: u64,
|
|
30383
30384
|
}
|
|
30384
30385
|
|
|
30385
30386
|
#[cfg(feature = "api-types")]
|
|
@@ -30482,6 +30483,15 @@ impl ServerConfig {
|
|
|
30482
30483
|
})?,
|
|
30483
30484
|
None => 104857600,
|
|
30484
30485
|
},
|
|
30486
|
+
job_timeout_secs: match kwargs.get(ruby.to_symbol("job_timeout_secs")) {
|
|
30487
|
+
Some(v) => u64::try_convert(v).map_err(|e| {
|
|
30488
|
+
magnus::Error::new(
|
|
30489
|
+
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
30490
|
+
format!("invalid value for `job_timeout_secs`: {}", e),
|
|
30491
|
+
)
|
|
30492
|
+
})?,
|
|
30493
|
+
None => 600,
|
|
30494
|
+
},
|
|
30485
30495
|
})
|
|
30486
30496
|
}
|
|
30487
30497
|
|
|
@@ -30505,6 +30515,10 @@ impl ServerConfig {
|
|
|
30505
30515
|
self.max_multipart_field_bytes
|
|
30506
30516
|
}
|
|
30507
30517
|
|
|
30518
|
+
fn job_timeout_secs(&self) -> u64 {
|
|
30519
|
+
self.job_timeout_secs
|
|
30520
|
+
}
|
|
30521
|
+
|
|
30508
30522
|
fn listen_addr(&self) -> String {
|
|
30509
30523
|
#[allow(clippy::needless_update)]
|
|
30510
30524
|
let core_self = xberg::ServerConfig {
|
|
@@ -30518,6 +30532,8 @@ impl ServerConfig {
|
|
|
30518
30532
|
|
|
30519
30533
|
max_multipart_field_bytes: self.max_multipart_field_bytes,
|
|
30520
30534
|
|
|
30535
|
+
job_timeout_secs: self.job_timeout_secs,
|
|
30536
|
+
|
|
30521
30537
|
..Default::default()
|
|
30522
30538
|
};
|
|
30523
30539
|
core_self.listen_addr().into()
|
|
@@ -30536,6 +30552,8 @@ impl ServerConfig {
|
|
|
30536
30552
|
|
|
30537
30553
|
max_multipart_field_bytes: self.max_multipart_field_bytes,
|
|
30538
30554
|
|
|
30555
|
+
job_timeout_secs: self.job_timeout_secs,
|
|
30556
|
+
|
|
30539
30557
|
..Default::default()
|
|
30540
30558
|
};
|
|
30541
30559
|
core_self.cors_allows_all()
|
|
@@ -30554,6 +30572,8 @@ impl ServerConfig {
|
|
|
30554
30572
|
|
|
30555
30573
|
max_multipart_field_bytes: self.max_multipart_field_bytes,
|
|
30556
30574
|
|
|
30575
|
+
job_timeout_secs: self.job_timeout_secs,
|
|
30576
|
+
|
|
30557
30577
|
..Default::default()
|
|
30558
30578
|
};
|
|
30559
30579
|
core_self.is_origin_allowed(&origin)
|
|
@@ -30572,6 +30592,8 @@ impl ServerConfig {
|
|
|
30572
30592
|
|
|
30573
30593
|
max_multipart_field_bytes: self.max_multipart_field_bytes,
|
|
30574
30594
|
|
|
30595
|
+
job_timeout_secs: self.job_timeout_secs,
|
|
30596
|
+
|
|
30575
30597
|
..Default::default()
|
|
30576
30598
|
};
|
|
30577
30599
|
core_self.max_request_body_mb()
|
|
@@ -30590,6 +30612,8 @@ impl ServerConfig {
|
|
|
30590
30612
|
|
|
30591
30613
|
max_multipart_field_bytes: self.max_multipart_field_bytes,
|
|
30592
30614
|
|
|
30615
|
+
job_timeout_secs: self.job_timeout_secs,
|
|
30616
|
+
|
|
30593
30617
|
..Default::default()
|
|
30594
30618
|
};
|
|
30595
30619
|
core_self.max_multipart_field_mb()
|
|
@@ -36767,7 +36791,7 @@ pub enum EntityCategory {
|
|
|
36767
36791
|
Email,
|
|
36768
36792
|
Phone,
|
|
36769
36793
|
Url,
|
|
36770
|
-
Custom
|
|
36794
|
+
Custom(String),
|
|
36771
36795
|
}
|
|
36772
36796
|
|
|
36773
36797
|
impl Default for EntityCategory {
|
|
@@ -39039,7 +39063,7 @@ pub enum OutputFormat {
|
|
|
39039
39063
|
Html,
|
|
39040
39064
|
Json,
|
|
39041
39065
|
DocTags,
|
|
39042
|
-
Custom
|
|
39066
|
+
Custom(String),
|
|
39043
39067
|
}
|
|
39044
39068
|
|
|
39045
39069
|
impl Default for OutputFormat {
|
|
@@ -39576,7 +39600,7 @@ pub enum PiiCategory {
|
|
|
39576
39600
|
Person,
|
|
39577
39601
|
Organization,
|
|
39578
39602
|
Location,
|
|
39579
|
-
Custom
|
|
39603
|
+
Custom(String),
|
|
39580
39604
|
}
|
|
39581
39605
|
|
|
39582
39606
|
impl Default for PiiCategory {
|
|
@@ -40458,7 +40482,7 @@ impl magnus::TryConvert for StructuredDataType {
|
|
|
40458
40482
|
match s.as_str() {
|
|
40459
40483
|
"json-ld" | "json_ld" | "JsonLd" => Ok(StructuredDataType::JsonLd),
|
|
40460
40484
|
"microdata" | "Microdata" => Ok(StructuredDataType::Microdata),
|
|
40461
|
-
"rdfa" | "
|
|
40485
|
+
"rdfa" | "RDFa" => Ok(StructuredDataType::RDFa),
|
|
40462
40486
|
other => Err(magnus::Error::new(
|
|
40463
40487
|
unsafe { Ruby::get_unchecked() }.exception_arg_error(),
|
|
40464
40488
|
format!("invalid StructuredDataType value: {other}"),
|
|
@@ -51154,6 +51178,7 @@ impl From<ServerConfig> for xberg::ServerConfig {
|
|
|
51154
51178
|
cors_origins: val.cors_origins.into_iter().collect(),
|
|
51155
51179
|
max_request_body_bytes: val.max_request_body_bytes,
|
|
51156
51180
|
max_multipart_field_bytes: val.max_multipart_field_bytes,
|
|
51181
|
+
job_timeout_secs: val.job_timeout_secs,
|
|
51157
51182
|
..Default::default()
|
|
51158
51183
|
}
|
|
51159
51184
|
}
|
|
@@ -51168,6 +51193,7 @@ impl From<xberg::ServerConfig> for ServerConfig {
|
|
|
51168
51193
|
cors_origins: val.cors_origins.into_iter().collect(),
|
|
51169
51194
|
max_request_body_bytes: val.max_request_body_bytes,
|
|
51170
51195
|
max_multipart_field_bytes: val.max_multipart_field_bytes,
|
|
51196
|
+
job_timeout_secs: val.job_timeout_secs,
|
|
51171
51197
|
}
|
|
51172
51198
|
}
|
|
51173
51199
|
}
|
|
@@ -52740,7 +52766,7 @@ impl From<EntityCategory> for xberg::EntityCategory {
|
|
|
52740
52766
|
EntityCategory::Email => Self::Email,
|
|
52741
52767
|
EntityCategory::Phone => Self::Phone,
|
|
52742
52768
|
EntityCategory::Url => Self::Url,
|
|
52743
|
-
EntityCategory::Custom
|
|
52769
|
+
EntityCategory::Custom(_0) => Self::Custom(_0),
|
|
52744
52770
|
}
|
|
52745
52771
|
}
|
|
52746
52772
|
}
|
|
@@ -52758,7 +52784,7 @@ impl From<xberg::EntityCategory> for EntityCategory {
|
|
|
52758
52784
|
xberg::EntityCategory::Email => Self::Email,
|
|
52759
52785
|
xberg::EntityCategory::Phone => Self::Phone,
|
|
52760
52786
|
xberg::EntityCategory::Url => Self::Url,
|
|
52761
|
-
xberg::EntityCategory::Custom(_0) => Self::Custom
|
|
52787
|
+
xberg::EntityCategory::Custom(_0) => Self::Custom(_0),
|
|
52762
52788
|
}
|
|
52763
52789
|
}
|
|
52764
52790
|
}
|
|
@@ -53740,7 +53766,7 @@ impl From<OutputFormat> for xberg::OutputFormat {
|
|
|
53740
53766
|
OutputFormat::Html => Self::Html,
|
|
53741
53767
|
OutputFormat::Json => Self::Json,
|
|
53742
53768
|
OutputFormat::DocTags => Self::DocTags,
|
|
53743
|
-
OutputFormat::Custom
|
|
53769
|
+
OutputFormat::Custom(_0) => Self::Custom(_0),
|
|
53744
53770
|
}
|
|
53745
53771
|
}
|
|
53746
53772
|
}
|
|
@@ -53754,7 +53780,7 @@ impl From<xberg::OutputFormat> for OutputFormat {
|
|
|
53754
53780
|
xberg::OutputFormat::Html => Self::Html,
|
|
53755
53781
|
xberg::OutputFormat::Json => Self::Json,
|
|
53756
53782
|
xberg::OutputFormat::DocTags => Self::DocTags,
|
|
53757
|
-
xberg::OutputFormat::Custom(_0) => Self::Custom
|
|
53783
|
+
xberg::OutputFormat::Custom(_0) => Self::Custom(_0),
|
|
53758
53784
|
}
|
|
53759
53785
|
}
|
|
53760
53786
|
}
|
|
@@ -53949,7 +53975,7 @@ impl From<PiiCategory> for xberg::PiiCategory {
|
|
|
53949
53975
|
PiiCategory::Person => Self::Person,
|
|
53950
53976
|
PiiCategory::Organization => Self::Organization,
|
|
53951
53977
|
PiiCategory::Location => Self::Location,
|
|
53952
|
-
PiiCategory::Custom
|
|
53978
|
+
PiiCategory::Custom(_0) => Self::Custom(_0),
|
|
53953
53979
|
}
|
|
53954
53980
|
}
|
|
53955
53981
|
}
|
|
@@ -53969,7 +53995,7 @@ impl From<xberg::PiiCategory> for PiiCategory {
|
|
|
53969
53995
|
xberg::PiiCategory::Person => Self::Person,
|
|
53970
53996
|
xberg::PiiCategory::Organization => Self::Organization,
|
|
53971
53997
|
xberg::PiiCategory::Location => Self::Location,
|
|
53972
|
-
xberg::PiiCategory::Custom(_0) => Self::Custom
|
|
53998
|
+
xberg::PiiCategory::Custom(_0) => Self::Custom(_0),
|
|
53973
53999
|
}
|
|
53974
54000
|
}
|
|
53975
54001
|
}
|
|
@@ -58800,6 +58826,9 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
|
|
|
58800
58826
|
method!(ServerConfig::max_multipart_field_bytes, 0),
|
|
58801
58827
|
)?;
|
|
58802
58828
|
|
|
58829
|
+
#[cfg(feature = "api-types")]
|
|
58830
|
+
class.define_method("job_timeout_secs", method!(ServerConfig::job_timeout_secs, 0))?;
|
|
58831
|
+
|
|
58803
58832
|
#[cfg(feature = "api-types")]
|
|
58804
58833
|
class.define_method("listen_addr", method!(ServerConfig::listen_addr, 0))?;
|
|
58805
58834
|
|
data/lib/xberg/native.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:b601f7d55a851a4a2a4c1091cea1c4b2d174b2f1786c29889b0611fbf0d5c5d7
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
# frozen_string_literal: true
|
|
@@ -1098,7 +1098,7 @@ module Xberg
|
|
|
1098
1098
|
# @return [self]
|
|
1099
1099
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
1100
1100
|
def self.from_hash(hash)
|
|
1101
|
-
new(value: hash[:
|
|
1101
|
+
new(value: hash[:text] || hash["text"])
|
|
1102
1102
|
end
|
|
1103
1103
|
end
|
|
1104
1104
|
## Line added in the "after" version.
|
|
@@ -1120,7 +1120,7 @@ module Xberg
|
|
|
1120
1120
|
# @return [self]
|
|
1121
1121
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
1122
1122
|
def self.from_hash(hash)
|
|
1123
|
-
new(value: hash[:
|
|
1123
|
+
new(value: hash[:text] || hash["text"])
|
|
1124
1124
|
end
|
|
1125
1125
|
end
|
|
1126
1126
|
## Line removed from the "before" version.
|
|
@@ -1142,7 +1142,7 @@ module Xberg
|
|
|
1142
1142
|
# @return [self]
|
|
1143
1143
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
1144
1144
|
def self.from_hash(hash)
|
|
1145
|
-
new(value: hash[:
|
|
1145
|
+
new(value: hash[:text] || hash["text"])
|
|
1146
1146
|
end
|
|
1147
1147
|
end
|
|
1148
1148
|
end
|
|
@@ -1422,7 +1422,8 @@ module Xberg
|
|
|
1422
1422
|
# @return [self]
|
|
1423
1423
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
1424
1424
|
def self.from_hash(hash)
|
|
1425
|
-
|
|
1425
|
+
payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
|
|
1426
|
+
new(value: PdfMetadata.new(payload))
|
|
1426
1427
|
end
|
|
1427
1428
|
end
|
|
1428
1429
|
## Metadata extracted from a DOCX Word document.
|
|
@@ -1480,7 +1481,8 @@ module Xberg
|
|
|
1480
1481
|
# @return [self]
|
|
1481
1482
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
1482
1483
|
def self.from_hash(hash)
|
|
1483
|
-
|
|
1484
|
+
payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
|
|
1485
|
+
new(value: DocxMetadata.new(payload))
|
|
1484
1486
|
end
|
|
1485
1487
|
end
|
|
1486
1488
|
## Metadata extracted from an Excel spreadsheet.
|
|
@@ -1538,7 +1540,8 @@ module Xberg
|
|
|
1538
1540
|
# @return [self]
|
|
1539
1541
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
1540
1542
|
def self.from_hash(hash)
|
|
1541
|
-
|
|
1543
|
+
payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
|
|
1544
|
+
new(value: ExcelMetadata.new(payload))
|
|
1542
1545
|
end
|
|
1543
1546
|
end
|
|
1544
1547
|
## Metadata extracted from an email message (EML/MSG).
|
|
@@ -1596,7 +1599,8 @@ module Xberg
|
|
|
1596
1599
|
# @return [self]
|
|
1597
1600
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
1598
1601
|
def self.from_hash(hash)
|
|
1599
|
-
|
|
1602
|
+
payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
|
|
1603
|
+
new(value: EmailMetadata.new(payload))
|
|
1600
1604
|
end
|
|
1601
1605
|
end
|
|
1602
1606
|
## Metadata extracted from a PowerPoint presentation.
|
|
@@ -1654,7 +1658,8 @@ module Xberg
|
|
|
1654
1658
|
# @return [self]
|
|
1655
1659
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
1656
1660
|
def self.from_hash(hash)
|
|
1657
|
-
|
|
1661
|
+
payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
|
|
1662
|
+
new(value: PptxMetadata.new(payload))
|
|
1658
1663
|
end
|
|
1659
1664
|
end
|
|
1660
1665
|
## Metadata extracted from an archive (ZIP, TAR, 7Z, etc.).
|
|
@@ -1712,7 +1717,8 @@ module Xberg
|
|
|
1712
1717
|
# @return [self]
|
|
1713
1718
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
1714
1719
|
def self.from_hash(hash)
|
|
1715
|
-
|
|
1720
|
+
payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
|
|
1721
|
+
new(value: ArchiveMetadata.new(payload))
|
|
1716
1722
|
end
|
|
1717
1723
|
end
|
|
1718
1724
|
## Metadata extracted from a raster or vector image.
|
|
@@ -1770,7 +1776,8 @@ module Xberg
|
|
|
1770
1776
|
# @return [self]
|
|
1771
1777
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
1772
1778
|
def self.from_hash(hash)
|
|
1773
|
-
|
|
1779
|
+
payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
|
|
1780
|
+
new(value: ImageMetadata.new(payload))
|
|
1774
1781
|
end
|
|
1775
1782
|
end
|
|
1776
1783
|
## Metadata extracted from an XML document.
|
|
@@ -1828,7 +1835,8 @@ module Xberg
|
|
|
1828
1835
|
# @return [self]
|
|
1829
1836
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
1830
1837
|
def self.from_hash(hash)
|
|
1831
|
-
|
|
1838
|
+
payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
|
|
1839
|
+
new(value: XmlMetadata.new(payload))
|
|
1832
1840
|
end
|
|
1833
1841
|
end
|
|
1834
1842
|
## Metadata extracted from a plain-text file.
|
|
@@ -1886,7 +1894,8 @@ module Xberg
|
|
|
1886
1894
|
# @return [self]
|
|
1887
1895
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
1888
1896
|
def self.from_hash(hash)
|
|
1889
|
-
|
|
1897
|
+
payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
|
|
1898
|
+
new(value: TextMetadata.new(payload))
|
|
1890
1899
|
end
|
|
1891
1900
|
end
|
|
1892
1901
|
## Metadata extracted from an HTML document.
|
|
@@ -1944,7 +1953,8 @@ module Xberg
|
|
|
1944
1953
|
# @return [self]
|
|
1945
1954
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
1946
1955
|
def self.from_hash(hash)
|
|
1947
|
-
|
|
1956
|
+
payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
|
|
1957
|
+
new(value: HtmlMetadata.new(payload))
|
|
1948
1958
|
end
|
|
1949
1959
|
end
|
|
1950
1960
|
## Metadata produced by an OCR pipeline.
|
|
@@ -2002,7 +2012,8 @@ module Xberg
|
|
|
2002
2012
|
# @return [self]
|
|
2003
2013
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
2004
2014
|
def self.from_hash(hash)
|
|
2005
|
-
|
|
2015
|
+
payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
|
|
2016
|
+
new(value: OcrMetadata.new(payload))
|
|
2006
2017
|
end
|
|
2007
2018
|
end
|
|
2008
2019
|
## Metadata extracted from a CSV or TSV file.
|
|
@@ -2060,7 +2071,8 @@ module Xberg
|
|
|
2060
2071
|
# @return [self]
|
|
2061
2072
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
2062
2073
|
def self.from_hash(hash)
|
|
2063
|
-
|
|
2074
|
+
payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
|
|
2075
|
+
new(value: CsvMetadata.new(payload))
|
|
2064
2076
|
end
|
|
2065
2077
|
end
|
|
2066
2078
|
## Metadata extracted from a BibTeX bibliography file.
|
|
@@ -2118,7 +2130,8 @@ module Xberg
|
|
|
2118
2130
|
# @return [self]
|
|
2119
2131
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
2120
2132
|
def self.from_hash(hash)
|
|
2121
|
-
|
|
2133
|
+
payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
|
|
2134
|
+
new(value: BibtexMetadata.new(payload))
|
|
2122
2135
|
end
|
|
2123
2136
|
end
|
|
2124
2137
|
## Metadata extracted from a citation file (RIS, PubMed, EndNote).
|
|
@@ -2176,7 +2189,8 @@ module Xberg
|
|
|
2176
2189
|
# @return [self]
|
|
2177
2190
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
2178
2191
|
def self.from_hash(hash)
|
|
2179
|
-
|
|
2192
|
+
payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
|
|
2193
|
+
new(value: CitationMetadata.new(payload))
|
|
2180
2194
|
end
|
|
2181
2195
|
end
|
|
2182
2196
|
## Metadata extracted from a FictionBook (FB2) e-book.
|
|
@@ -2234,7 +2248,8 @@ module Xberg
|
|
|
2234
2248
|
# @return [self]
|
|
2235
2249
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
2236
2250
|
def self.from_hash(hash)
|
|
2237
|
-
|
|
2251
|
+
payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
|
|
2252
|
+
new(value: FictionBookMetadata.new(payload))
|
|
2238
2253
|
end
|
|
2239
2254
|
end
|
|
2240
2255
|
## Metadata extracted from a dBASE (DBF) database file.
|
|
@@ -2292,7 +2307,8 @@ module Xberg
|
|
|
2292
2307
|
# @return [self]
|
|
2293
2308
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
2294
2309
|
def self.from_hash(hash)
|
|
2295
|
-
|
|
2310
|
+
payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
|
|
2311
|
+
new(value: DbfMetadata.new(payload))
|
|
2296
2312
|
end
|
|
2297
2313
|
end
|
|
2298
2314
|
## Metadata extracted from a JATS (Journal Article Tag Suite) XML file.
|
|
@@ -2350,7 +2366,8 @@ module Xberg
|
|
|
2350
2366
|
# @return [self]
|
|
2351
2367
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
2352
2368
|
def self.from_hash(hash)
|
|
2353
|
-
|
|
2369
|
+
payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
|
|
2370
|
+
new(value: JatsMetadata.new(payload))
|
|
2354
2371
|
end
|
|
2355
2372
|
end
|
|
2356
2373
|
## Metadata extracted from an EPUB e-book.
|
|
@@ -2408,7 +2425,8 @@ module Xberg
|
|
|
2408
2425
|
# @return [self]
|
|
2409
2426
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
2410
2427
|
def self.from_hash(hash)
|
|
2411
|
-
|
|
2428
|
+
payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
|
|
2429
|
+
new(value: EpubMetadata.new(payload))
|
|
2412
2430
|
end
|
|
2413
2431
|
end
|
|
2414
2432
|
## Metadata extracted from an Outlook PST archive.
|
|
@@ -2466,7 +2484,8 @@ module Xberg
|
|
|
2466
2484
|
# @return [self]
|
|
2467
2485
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
2468
2486
|
def self.from_hash(hash)
|
|
2469
|
-
|
|
2487
|
+
payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
|
|
2488
|
+
new(value: PstMetadata.new(payload))
|
|
2470
2489
|
end
|
|
2471
2490
|
end
|
|
2472
2491
|
## Metadata extracted from an audio or video file.
|
|
@@ -2524,7 +2543,8 @@ module Xberg
|
|
|
2524
2543
|
# @return [self]
|
|
2525
2544
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
2526
2545
|
def self.from_hash(hash)
|
|
2527
|
-
|
|
2546
|
+
payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
|
|
2547
|
+
new(value: AudioMetadata.new(payload))
|
|
2528
2548
|
end
|
|
2529
2549
|
end
|
|
2530
2550
|
## Code (tree-sitter analyzable source). Carries the structural chunks (function,
|
|
@@ -2592,7 +2612,8 @@ module Xberg
|
|
|
2592
2612
|
# @return [self]
|
|
2593
2613
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
2594
2614
|
def self.from_hash(hash)
|
|
2595
|
-
|
|
2615
|
+
payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
|
|
2616
|
+
new(value: CodeMetadata.new(payload))
|
|
2596
2617
|
end
|
|
2597
2618
|
end
|
|
2598
2619
|
end
|
data/lib/xberg/version.rb
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:52920323505a2dea3a1ae30866f6dc38a60c385cd626e87838df35b29a8a8d2b
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
# frozen_string_literal: true
|
|
6
6
|
|
|
7
7
|
module Xberg
|
|
8
8
|
## The version string for this package.
|
|
9
|
-
VERSION = "1.1
|
|
9
|
+
VERSION = "1.2.1"
|
|
10
10
|
end
|
data/sig/types.rbs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:8289545a6790f7d5396e33a6a78488d5e49b7009f873d25b9af3ab07ee9867aa
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
|
|
@@ -2339,8 +2339,9 @@ def initialize: (?content: Array[DiffLine], ?table_changes: Array[CellChange], ?
|
|
|
2339
2339
|
attr_reader cors_origins: Array[String]
|
|
2340
2340
|
attr_reader max_request_body_bytes: Integer
|
|
2341
2341
|
attr_reader max_multipart_field_bytes: Integer
|
|
2342
|
+
attr_reader job_timeout_secs: Integer
|
|
2342
2343
|
|
|
2343
|
-
def initialize: (?host: String, ?port: Integer, ?cors_origins: Array[String], ?max_request_body_bytes: Integer, ?max_multipart_field_bytes: Integer) -> void
|
|
2344
|
+
def initialize: (?host: String, ?port: Integer, ?cors_origins: Array[String], ?max_request_body_bytes: Integer, ?max_multipart_field_bytes: Integer, ?job_timeout_secs: Integer) -> void
|
|
2344
2345
|
def listen_addr: () -> String
|
|
2345
2346
|
def cors_allows_all: () -> bool
|
|
2346
2347
|
def is_origin_allowed: (String origin) -> bool
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: xberg
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1
|
|
4
|
+
version: 1.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Na'aman Hirschfeld <naaman@xberg.io>
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-09-
|
|
11
|
+
date: 2026-09-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rb_sys
|