Handprint

Latest version: v1.6.0

Safety actively analyzes 682361 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

1.5.1

Not secure
There are no functional changes in this release; all of the code changes are internal, to speed up Handprint startup times and further clean up some code dependencies.

All changes in this release:

* To speed up initial application startup time, `import` statements have been moved from (usually) the tops of files, to where the packages are actually used in the code. Profiling using the Python `-X importtime` option helped identify expensive packages to make this efficiency gain possible.
* The user interface code in `ui.py` has been replaced with importing [Bun](https://github.com/caltechlibrary/bun).
* The version of `commonpy` needed is now 1.3.9.
* The dependency on [dateparser](https://github.com/scrapinghub/dateparser) has been removed because Handprint doesn't depend on that package. (It's a transitive dependency coming from something else, but by itself, it doesn't belong in Handprint's requirements.)

1.5.0

Not secure
This version contains many additions and some important bugs in the extended output (i.e., using the `-e` flag) for Google and Amazon. If you use Handprint, you should definitely update to this version.

All changes in this release:

* The default branch on GitHub has been changed from `master` to `main`. **If you have clones or forks of this repo**, please see GitHub's [instructions for updating a local clone after a branch name change](https://docs.github.com/en/github/administering-a-repository/managing-branches-in-your-repository/renaming-a-branch#updating-a-local-clone-after-a-branch-name-changes).
* The styling of text annotations has changed: the text boxes overlaid on images no longer have borders, so that they are easier to read, especially when bounding boxes are displayed using the `-d` option (see below).
* A new command-line option, `-d` (short for `--display`), lets users choose to display the bounding boxes of text, lines, and paragraphs (if the service supports these), in addition to or instead of the recognized text.
* A new command-line option, `-n` (short for `--confidence`), allows users to apply a threshold to the confidence values returned for individual results, such that only results having confidence scores above a given value are shown in the output.
* A new command-line option, `-j`, (short for `--reuse-json`) tells Handprint to look for the extended results produced by a previous run using `-e`, and use that instead of contacting a service again.
* A new command-line option, `-m`, (short for `--text-move`) lets users adjust the position of the text annotations overlaid on input images. This takes two numbers separated by a comma in the form `x,y`. Positive numbers move the text rightward and upward compared to the default position.
* A new command-line option, `-x`, (short for `--text-color`) allows users to change the color of the text annotations overlaid on input images.
* A new command-line option, `-z`, (short for `--text-size`) lets users change the font size of the text annotations overlaid on input images.
* The extended data (via option `-e`) from Google now includes the confidence scores enabled using the option [`enable_text_detection_confidence_score`](https://googleapis.github.io/google-cloud-dotnet/docs/Google.Cloud.Vision.V1/api/Google.Cloud.Vision.V1.TextDetectionParams.html) in the Google Vision API.
* Handprint no longer leaves resized versions of input images when the `-e` option is being used. Previously, images of the form `somefile.handprint.png` were left around for `somefile.png` so that subsequent runs were saved the time of resizing the image (if resizing was needed). However, this meant that subsequent runs would reuse the image even if the chosen destination services were different than in the run that produced the resized image, which meant that the subsequent runs might be using an unnecessarily small version of the image. To eliminate this risk, Handprint now deletes the resized image, even though this means repeated runs on the same image may require repeated resizing operations.
* Fixed issue 27: the Google JSON output was not proper JSON.
* Fixed issue 26: the extended output for Amazon services was one long line instead of being split into lines as is done for the other services. This now works.
* Fixed issue 25: the extended output for Google in Handprint version 1.4.0 produced an empty text file. It now produces text.
* Fixed issue 24: use CommonPy functions instead of keeping separate versions of the same functions. Internally, a number of common utility functions originally written in part for Handprint have been moved to a separate new Python package, [Commonpy](https://github.com/caltechlibrary/commonpy), and the Handprint code has been refactored to use the package instead of its own copies of the functions.
* Fixed issue 23: updated service adapters to use the latest API versions of the services (specifically for the Microsoft API).
* Fixed issue 21: fixed Dependabot security warning for the `urllib3` package.
* Fixed issue 3: Microsoft API sometimes returned HTTP code 400; I rewrote the Handprint adapter code to handle errors more carefully and bubble up any unhandled errors so that users can see what they are.
* Fixed problems in the implementation of the base class for handwritten recognition services.
* Most dependencies in [`requirements.txt`](requirements.txt) have been updated to the latest versions, and some new dependencies have been added.
* Various minor internal code cleanups have been made.
* The copyright year has been updated.

1.4.0

Not secure
This release does not change the user interface or functionality, but this is more than a patch release because it changes the minimum required versions of many Python packages and uses newer Google API libraries.

* Fixed compatibility between Handprint and more recent versions of the Google API libraries. **The previous versions of the Google API are no longer supported by Handprint**.
* Fixed a bug in the main routine causing an error when trying to print exceptions.
* Fixed a bug in catching errors in the Microsoft interface.
* Update [`requirements.txt`](requirements.txt) to remove no-longer used packages and update minimum version numbers.
* Update [`README.md`](README.md) to acknowledge the Python dependencies actually being used now.

1.3.0

Not secure
* Handprint now requires Python version 3.6 or later.
* Fixed issue [19](https://github.com/caltechlibrary/handprint/issues/19), which caused Handprint to fail to produce any output images if both `-e` and `-G` were given.
* Fixed warning about Matlplotlib GUIs and threading in `images.py`.
* Fixed macOS Mojave compatibility (issue [16](https://github.com/caltechlibrary/handprint/issues/16).
* Updated `handprint/services/microsoft.py` to work with Azure API v. 3.0.
* Updated Microsoft credentials code to allow the endpoint URI to be supplied.
* Changed and expanded the possible exit codes returned by Handprint. (Please see the docs for more info.)
* Changed Google interface to retrieve _only_ document text results instead of all possible results, for better efficiency.
* Improved handling of `^C` interrupts from the command line.
* Added signal catcher to drop Handprint into `pdb` upon receiving `SIGUSER`.
* Switched to the use of [Sidetrack](https://github.com/caltechlibrary/sidetrack) for debug logging.
* Switched to the use of [Rich](https://github.com/willmcgugan/rich) for terminal output
* Various internal code updates and refactoring.

1.2.2

Not secure
* Updated copyright year in various source files.

1.2.1

* Fixed Microsoft output in the annotated images to be word-based, rather than line-based, to be the same as for the other services.

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.