tahweel 0.1.5 → 0.1.6

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: 8cb3d1bf1d0d59df923c5e053495365686b801ead838b1c5ad0a041dd7d41680
4
- data.tar.gz: 217f9c4cb6c1b80c9b6e2e1339017118db0267da1658b92c838ba8c27068c704
3
+ metadata.gz: 4aba834a61afe72366c247f01c2a8bfd3272cb5eccc874d1027b2475e7d21922
4
+ data.tar.gz: 25c70ef59f27fd6f0c347652e92435ea90c5654aa0c7b30b94fee24b82d785ae
5
5
  SHA512:
6
- metadata.gz: 065fe83ee58f3971854e806f83e2a0704e4eb1c93b65d69794b9a4c96965dc83aca89e49cb597cd36a030f282b6fb9a3b2cb1be52d32bf829182f822a6ab13b7
7
- data.tar.gz: 4da39bb05db82d55b46ad1758719b60a0757d0a32eee320b72e0a8a583db8f2689b4baecf10f11a16cacef310ab339d16cd11114727dbf7ccf32f90788ec2ba9
6
+ metadata.gz: 40893b5480ca1bf7ab80b962a8e2199dcb64989ffa3cb0ff26642973ea3c8634011a549364a8a344975201d0aaee57997ff08da6acc3383c8052972bf3c9cb66
7
+ data.tar.gz: 2a779306a16c38a475a899d0742e729469e08c7eb091cc03a1280f9bd5e386bbe8d20936f665376fa1898f373c1fa47be644d06a8baca6af331609c866041148
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.6] - 2026-03-28
4
+
5
+ ### Fixed
6
+
7
+ - Fix OAuth callback to handle `code` as non-first query parameter (e.g., `?iss=...&code=...&scope=...`)
8
+
3
9
  ## [0.1.5] - 2026-01-07
4
10
 
5
11
  ### Changed
@@ -143,10 +143,10 @@ module Tahweel
143
143
  # @return [String, nil] The authorization code if the request matches the callback pattern.
144
144
  def handle_request(socket, request_line)
145
145
  # Match GET requests containing the 'code' parameter
146
- # Works for /?code=... or /oauth2callback?code=...
147
- if request_line =~ /GET .*\?code=(.*) HTTP/
146
+ # Works for /?code=..., /oauth2callback?code=..., or ?iss=...&code=...&scope=...
147
+ if request_line =~ /GET .*[?&]code=([^&\s]+).* HTTP/
148
148
  respond_with_success(socket)
149
- Regexp.last_match(1).split.first
149
+ Regexp.last_match(1)
150
150
  else
151
151
  respond_with_not_found(socket)
152
152
  end
@@ -29,13 +29,10 @@ module Tahweel
29
29
  # remaining_pages: Integer
30
30
  # }
31
31
  # @return [Array<String>] An array containing the text of each page.
32
- def self.convert(
33
- pdf_path,
34
- dpi: PdfSplitter::DEFAULT_DPI,
35
- processor: :google_drive,
36
- concurrency: DEFAULT_CONCURRENCY,
37
- &
38
- ) = new(pdf_path, dpi:, processor:, concurrency:).convert(&)
32
+ def self.convert(pdf_path, dpi: PdfSplitter::DEFAULT_DPI, processor: :google_drive,
33
+ concurrency: DEFAULT_CONCURRENCY, &)
34
+ new(pdf_path, dpi:, processor:, concurrency:).convert(&)
35
+ end
39
36
 
40
37
  # Initializes the Converter.
41
38
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tahweel
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.6"
5
5
  end
data/lib/tahweel.rb CHANGED
@@ -25,13 +25,11 @@ module Tahweel # rubocop:disable Style/Documentation
25
25
  # @param processor [Symbol] OCR processor to use (default: :google_drive).
26
26
  # @param concurrency [Integer] Max concurrent OCR operations (default: 12).
27
27
  # @return [Array<String>] An array containing the text of each page.
28
- def self.convert(
29
- pdf_path,
30
- dpi: PdfSplitter::DEFAULT_DPI,
31
- processor: :google_drive,
32
- concurrency: Converter::DEFAULT_CONCURRENCY,
33
- &
34
- ) = Converter.convert(pdf_path, dpi:, processor:, concurrency:, &)
28
+ def self.convert(pdf_path, dpi: PdfSplitter::DEFAULT_DPI, processor: :google_drive,
29
+ concurrency: Converter::DEFAULT_CONCURRENCY, &)
30
+ Converter.convert(pdf_path,
31
+ dpi:, processor:, concurrency:, &)
32
+ end
35
33
 
36
34
  # Extracts text from an image file using the specified OCR processor.
37
35
  #
data/website/index.html CHANGED
@@ -508,8 +508,8 @@
508
508
  <div class="videos-grid">
509
509
  <div class="video-card">
510
510
  <div class="video-wrapper">
511
- <!-- TODO: Add video URL --> <iframe
512
- src=""
511
+ <iframe
512
+ src="https://www.youtube.com/embed/BlLBo6ApBII"
513
513
  title="Desktop App Preview"
514
514
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
515
515
  allowfullscreen>
@@ -518,7 +518,8 @@
518
518
  <h3 id="video1Title">عرض تطبيق سطح المكتب</h3>
519
519
  </div>
520
520
  <div class="video-card">
521
- <div class="video-wrapper">> <iframe
521
+ <div class="video-wrapper">
522
+ <iframe
522
523
  src="https://www.youtube.com/embed/e7s4aukDs48"
523
524
  title="CLI Usage Preview"
524
525
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tahweel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ali Hamdi Ali Fadel