-
Notifications
You must be signed in to change notification settings - Fork 0
[EPIC-6378] Prepare/restructure for stable RC #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… sync across Java/Python/C wrappers
Add snippets for nodejs wrapper
… commens and separated functions
…s for scanner/result/etc.
examples/c/src/snippets/datacapture/medical_certificate_scanner.c
Outdated
Show resolved
Hide resolved
examples/java/src/main/java/io/scanbot/sdk/snippets/barcode/DetectBarcodesSnippet.java
Outdated
Show resolved
Hide resolved
examples/java/src/main/java/io/scanbot/sdk/snippets/barcode/DetectBarcodesSnippet.java
Show resolved
Hide resolved
examples/java/src/main/java/io/scanbot/sdk/snippets/barcode/DetectBarcodesSnippet.java
Show resolved
Hide resolved
examples/java/src/main/java/io/scanbot/sdk/snippets/datacapture/CheckScannerSnippet.java
Show resolved
Hide resolved
examples/java/src/main/java/io/scanbot/sdk/snippets/datacapture/CreditCardScannerSnippet.java
Show resolved
Hide resolved
examples/java/src/main/java/io/scanbot/sdk/snippets/license/FloatingLicenseSnippet.java
Outdated
Show resolved
Hide resolved
examples/java/src/main/java/io/scanbot/sdk/snippets/license/FloatingLicenseSnippet.java
Outdated
Show resolved
Hide resolved
examples/python/minimal/snippets/barcode/barcode_document_parser.py
Outdated
Show resolved
Hide resolved
examples/python/minimal/snippets/document/analyse_multi_page.py
Outdated
Show resolved
Hide resolved
examples/nodejs/src/snippets/datacapture/text-pattern-scanner.ts
Outdated
Show resolved
Hide resolved
examples/nodejs/README.md
Outdated
|
||
### Install the Scanbot SDK | ||
Replace `<SCANBOT_SDK_VERSION>` with the actual version number of the SDK you want to install. | ||
```bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually in examples we do this like
export SCANBOT_SDK_VERSION=<SCANBOT_SDK_VERSION>
npm install https://github.com/doo/scanbot-sdk-example-linux/releases/download/standalone-sdk%2Fv$SCANBOT_SDK_VERSION/nodejs-scanbotsdk-$SCANBOT_SDK_VERSION.tgz
So that you have to replace the version only in one place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replaced with export SCANBOT_SDK_VERSION=<SCANBOT_SDK_VERSION>
examples/nodejs/package.json
Outdated
"typescript": "^5.9.2" | ||
}, | ||
"dependencies": { | ||
"scanbotsdk": "https://github.com/doo/scanbot-sdk-example-linux/releases/download/standalone-sdk%2Fv0.800.3/nodejs-scanbotsdk-0.800.3.tgz" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you specify url here, then there is no need to install package manually as it is specified in the readme
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed to completely remove url from dependencies
|
||
if (images && images.length > 0) { | ||
for (let imageIndex = 0; imageIndex < images.length; imageIndex++) { | ||
const extractedImage = images[imageIndex]?.image; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no explanation why this inner await using is needed. In java examples we explain that the images are initially stored in a compressed way and we do this in order to prevent a lot of decompressed images to be stored in memory
export async function applyBinarizationFilter(image: ScanbotSDK.ImageRef, path: string): Promise<void> { | ||
await using imageProcessor = await ScanbotSDK.ImageProcessor.create(); | ||
const filter = new ScanbotSDK.CustomBinarizationFilter({ preset: "PRESET_4" }); | ||
await using filtered_img = await imageProcessor.applyFilter(image, filter); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filteredImg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed
examples/python/README.md
Outdated
Replace `<SCANBOT_SDK_VERSION>` with the actual version number of the SDK you want to install. | ||
* **On ARM64 (Raspberry Pi, Jetson Nano, etc.):** | ||
```bash | ||
pip install https://github.com/doo/scanbot-sdk-example-linux/releases/download/standalone-sdk%2Fv<SCANBOT_SDK_VERSION>/scanbotsdk-<SCANBOT_SDK_VERSION>-py3-none-linux_aarch64.whl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the old example we had
export SCANBOT_SDK_VERSION=<SCANBOT_SDK_VERSION>
and then used this variable in installation scripts, it allows to specify this version only once. Relates to all the readmes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replaced with export SCANBOT_SDK_VERSION=<SCANBOT_SDK_VERSION>
} | ||
|
||
// TODO Add your SCANBOTSDK_API_TOKEN and SCANBOTSDK_VERSION here. | ||
// They are available on request via [email protected] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are available on request via [email protected]
Probably no need to remove this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed [email protected] in all places
) | ||
# Configure other parameters as needed. | ||
|
||
file_access_source = RandomAccessSource(file_path=file_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to do like this:
with RandomAccessSource(file_path=file_path) as file_access_source: ...
The file will in any case be automatically closed when the variable goes out of scope (as we override __del__
for the class but standard practise in python when dealing with files to use context managers and for this we also implement context manager functions for the class
No description provided.