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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/tahweel/authorizer.rb +3 -3
- data/lib/tahweel/converter.rb +4 -7
- data/lib/tahweel/version.rb +1 -1
- data/lib/tahweel.rb +5 -7
- data/website/index.html +4 -3
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4aba834a61afe72366c247f01c2a8bfd3272cb5eccc874d1027b2475e7d21922
|
|
4
|
+
data.tar.gz: 25c70ef59f27fd6f0c347652e92435ea90c5654aa0c7b30b94fee24b82d785ae
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 40893b5480ca1bf7ab80b962a8e2199dcb64989ffa3cb0ff26642973ea3c8634011a549364a8a344975201d0aaee57997ff08da6acc3383c8052972bf3c9cb66
|
|
7
|
+
data.tar.gz: 2a779306a16c38a475a899d0742e729469e08c7eb091cc03a1280f9bd5e386bbe8d20936f665376fa1898f373c1fa47be644d06a8baca6af331609c866041148
|
data/CHANGELOG.md
CHANGED
data/lib/tahweel/authorizer.rb
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
|
|
147
|
-
if request_line =~ /GET
|
|
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)
|
|
149
|
+
Regexp.last_match(1)
|
|
150
150
|
else
|
|
151
151
|
respond_with_not_found(socket)
|
|
152
152
|
end
|
data/lib/tahweel/converter.rb
CHANGED
|
@@ -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
|
-
|
|
34
|
-
dpi:
|
|
35
|
-
|
|
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
|
#
|
data/lib/tahweel/version.rb
CHANGED
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
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"
|
|
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"
|