parsekit-bin 0.1.2.1-aarch64-linux → 0.2.0.1-aarch64-linux

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 404eb9b95e0761a8ee748f3901b6a772edeff38809c3f72c7115e73a1719dbf3
4
- data.tar.gz: 48deae1776e4640d07ce959a9fb7530fc2bbaa793f72ec5b03634ee1c92518ca
3
+ metadata.gz: 2bf6239f703df75df420aed1aec9acdb7d22b9fc98bf575f2375836444fb07ba
4
+ data.tar.gz: 2304e3bfdf91e300836883be4933cbdf0980ccc69c0488c13926c4035a171a43
5
5
  SHA512:
6
- metadata.gz: a70a5bf2546b911589f205147f3a3ecc2fa55fea4e686d36f67cc99b2003c4ac37495e371e6b918946a451b80842cf6523050f727cf7680f78d5d946009f9a4d
7
- data.tar.gz: 593628349740ad75a28bb693acf3ad6c056662ba0906bd24d49adc6b20c86d7ffb12eaee17625c0fe66956c6b333dccfe86cda71119d7a0943a92676eb76991c
6
+ metadata.gz: 640bbee023275973183d78c52b7ae3dda4334d1b568045beeaa6dee2f6f05bcdce3dac0f005fb810ece9f79ddc096abbfaf25b12c54dc58e1eef32602cb26b07
7
+ data.tar.gz: 00012caf0497df01d251bbf63645645df4441dc1e5360befca3ae2c94290d6da33912a46cbaa3e7a82eb40e723c36342d2f1d264a301ba56211345f597643ce5
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <img src="/docs/assets/parsekit-wide.png" alt="parsekit" height="80px">
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/parsekit-bin.svg)](https://badge.fury.io/rb/parsekit-bin)
3
+ [![Gem Version](https://badge.fury.io/rb/parsekit.svg)](https://badge.fury.io/rb/parsekit)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
5
 
6
6
  Native Ruby bindings for the [parser-core](https://crates.io/crates/parser-core) Rust crate, providing high-performance document parsing and text extraction capabilities through Magnus. This gem wraps parser-core to extract text from PDFs, Office documents (DOCX, XLSX), images (with OCR), and more. Part of the ruby-nlp ecosystem.
@@ -19,7 +19,7 @@ Native Ruby bindings for the [parser-core](https://crates.io/crates/parser-core)
19
19
  Add this line to your application's Gemfile:
20
20
 
21
21
  ```ruby
22
- gem 'parsekit-bin'
22
+ gem 'parsekit'
23
23
  ```
24
24
 
25
25
  And then execute:
@@ -29,7 +29,7 @@ And then execute:
29
29
  Or install it yourself as:
30
30
 
31
31
  ```bash
32
- gem install parsekit-bin
32
+ gem install parsekit
33
33
  ```
34
34
 
35
35
  ### Requirements
@@ -158,7 +158,7 @@ By default, ParseKit bundles Tesseract for zero-dependency OCR support. Advanced
158
158
 
159
159
  **Using system Tesseract during installation:**
160
160
  ```bash
161
- gem install parsekit-bin -- --no-default-features
161
+ gem install parsekit -- --no-default-features
162
162
  ```
163
163
 
164
164
  **For development with system Tesseract:**
@@ -14,14 +14,14 @@ name = "parsekit"
14
14
  magnus = { version = "0.8", features = ["rb-sys"] }
15
15
  # Document parsing - testing embedded C libraries
16
16
  # MuPDF builds from source and statically links
17
- mupdf = { version = "0.5", default-features = false, features = [] }
17
+ mupdf = { version = "0.7", default-features = false, features = [] }
18
18
  # OCR - Using tesseract-rs for both system and bundled modes
19
- tesseract-rs = "0.1" # Tesseract with optional bundling
19
+ tesseract-rs = "0.2" # Tesseract with optional bundling
20
20
  image = "0.25" # Image processing library (match rusty-tesseract's version)
21
- calamine = "0.31" # Excel parsing
21
+ calamine = "0.35" # Excel parsing
22
22
  docx-rs = "0.4" # Word document parsing
23
- quick-xml = "0.38" # XML parsing
24
- zip = "5.0" # ZIP archive handling for PPTX
23
+ quick-xml = "0.40" # XML parsing
24
+ zip = "8.2" # ZIP archive handling for PPTX
25
25
  serde_json = "1.0" # JSON parsing
26
26
  regex = "1.10" # Text parsing
27
27
  encoding_rs = "0.8" # Encoding detection
@@ -242,7 +242,7 @@ impl Parser {
242
242
  // Continue on page errors rather than failing entirely
243
243
  if let Ok(page) = doc.load_page(page_num) {
244
244
  // Extract text from the page
245
- if let Ok(text) = page.to_text() {
245
+ if let Ok(text) = page.to_text_page(mupdf::TextPageFlags::empty()).and_then(|tp| tp.to_text()) {
246
246
  all_text.push_str(&text);
247
247
  all_text.push('\n');
248
248
  }
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ParseKit
4
- VERSION = "0.1.2.1"
4
+ VERSION = "0.2.0.1"
5
5
  end
data/lib/parsekit.rb CHANGED
@@ -2,9 +2,15 @@
2
2
 
3
3
  require_relative "parsekit/version"
4
4
 
5
- # Load the native extension
5
+ # Load the compiled Rust extension. Precompiled (platform) gems install it into a
6
+ # Ruby-ABI-versioned subdir (lib/parsekit/<major.minor>/parsekit.{so,bundle}) so a
7
+ # single fat gem can carry a binary per Ruby version; source/dev builds place it flat
8
+ # at lib/parsekit/parsekit.{so,bundle}. Try the versioned path first, fall back to the
9
+ # flat one. Resolution goes through $LOAD_PATH (`require`, never `require_relative`)
10
+ # because RubyGems installs native extensions outside the gem's lib/ dir.
6
11
  begin
7
- require_relative "parsekit/parsekit"
12
+ RUBY_VERSION =~ /(\d+\.\d+)/
13
+ require "parsekit/#{Regexp.last_match(1)}/parsekit"
8
14
  rescue LoadError
9
15
  require "parsekit/parsekit"
10
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parsekit-bin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2.1
4
+ version: 0.2.0.1
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Chris Petersen
@@ -16,6 +16,9 @@ dependencies:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
18
  version: '0.9'
19
+ - - ">="
20
+ - !ruby/object:Gem::Version
21
+ version: 0.9.129
19
22
  type: :runtime
20
23
  prerelease: false
21
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -23,6 +26,9 @@ dependencies:
23
26
  - - "~>"
24
27
  - !ruby/object:Gem::Version
25
28
  version: '0.9'
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: 0.9.129
26
32
  - !ruby/object:Gem::Dependency
27
33
  name: rake
28
34
  requirement: !ruby/object:Gem::Requirement
@@ -127,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
133
  - !ruby/object:Gem::Version
128
134
  version: '0'
129
135
  requirements: []
130
- rubygems_version: 4.0.3
136
+ rubygems_version: 4.0.20
131
137
  specification_version: 4
132
138
  summary: Ruby document parsing toolkit with PDF and OCR support
133
139
  test_files: []