You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 27, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: CHANGES.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,12 +5,15 @@ Version 1.3.0
5
5
--------------
6
6
7
7
* Handprint now requires Python version 3.6 or later.
8
+
* 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.
9
+
* Fixed warning about Matlplotlib GUIs and threading in `images.py`.
Copy file name to clipboardExpand all lines: README.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,7 @@ The _**Hand**written **P**age **R**ecognit**i**o**n** **T**est_ program applies
14
14
❡ Log of recent changes
15
15
-----------------------
16
16
17
-
_Version 1.2.2_: This release fixes an inconsistency (compared to other Handprint output) in the way that Microsoft's text recognition service results are drawn on annotated images. The copyright year in source files has also been updated.
18
-
19
-
_Version 1.2.0_: This version fixes a bug in creating annotated results images, in which results from multiple services were overwritten on top of each other. It also fixes a bug with the Amazon interface that resulted in occasional random errors about `endpoint_resolver`. This version of Handprint also changes how output files are written; the new scheme uses the naming pattern `somefile.handprint.png` for the rescaled input image, `somefile.handprint-service.png` for the various service output results, and `somefile.handprint-all.png` for the summary grid image. Handprint now also accepts PDF files as input.
17
+
_Version 1.3.0_: This release brings a number of changes: (1) it now requires Python version 3.6 at minimum; (2) the Microsoft service interface now uses Azure API v3.0; (3) the Microsoft credentials scheme now allows you to change the endpoint URI; (4) the Google service interface now only gets the document text results instead of all possible results; (5) the possible program exit codes have changed slightly; and (6) interruption via <kbd>^C</kbd> should work better now. Some bugs have been fixed and internals have been (hopefully) improved.
20
18
21
19
The file [CHANGES](CHANGES.md) contains a more complete change log, and includes information about previous releases.
22
20
@@ -89,15 +87,18 @@ _SERVICENAME_ must be one of the service names printed by running `handprint -l`
89
87
90
88
#### Microsoft
91
89
92
-
Microsoft's approach to credentials in Azure involves the use of [subscription keys](https://docs.microsoft.com/en-us/azure/cognitive-services/computer-vision/vision-api-how-to-topics/howtosubscribe). The format of the credentials file for Handprint just needs to contain a single field:
90
+
Microsoft's approach to credentials in Azure involves the use of [subscription keys](https://docs.microsoft.com/en-us/azure/cognitive-services/computer-vision/vision-api-how-to-topics/howtosubscribe). The format of the credentials file for Handprint needs to contain two fields:
93
91
94
92
```json
95
93
{
96
-
"subscription_key": "YOURKEYHERE"
94
+
"subscription_key": "YOURKEYHERE",
95
+
"endpoint": "https://ENDPOINT"
97
96
}
98
97
```
99
98
100
-
The value of "YOURKEYHERE" will be a string such as `"18de248475134eb49ae4a4e94b93461c"`. To obtain a key, visit [https://portal.azure.com](https://portal.azure.com) and sign in using your account login. (Note: you will need to turn off browser security plugins such as Ad Block and uMatrix if you have them, or else the site will not work.) Once you are authenticated to the Azure portal, you can create credentials for using Azure's machine-learning services. Some notes about this can be found in the [Handprint project Wiki pages on GitHub](https://github.com/caltechlibrary/handprint/wiki/Getting-Microsoft-Azure-credentials). Once you have obtained a key, use a text editor to create a JSON file in the simple format shown above, save that file somewhere on your computer (for the sake of this example, assume it is `myazurecredentials.json`), and use the command discussed above to make Handprint copy the credentials file:
99
+
The value `"YOURKEYHERE"` will be a string such as `"18de248475134eb49ae4a4e94b93461c"`, and it will be associated with an endpoint URI such as `"https://westus.api.cognitive.microsoft.com"`. To obtain a key and the corresponding endpoint URI, visit [https://portal.azure.com](https://portal.azure.com) and sign in using your account login. (Note: you will need to turn off browser security plugins such as Ad Block and uMatrix if you have them, or else the site will not work.) Once you are authenticated to the Azure portal, you can create credentials for using Azure's machine-learning services. Some notes all about this can be found in the [Handprint project Wiki pages on GitHub](https://github.com/caltechlibrary/handprint/wiki/Getting-Microsoft-Azure-credentials).
100
+
101
+
Once you have obtained both a key and an endpoint URI, use a text editor to create a JSON file in the simple format shown above, save that file somewhere on your computer (for the sake of this example, assume it is `myazurecredentials.json`), and use the command discussed above to make Handprint copy the credentials file:
101
102
```sh
102
103
handprint -a microsoft myazurecredentials.json
103
104
```
@@ -322,7 +323,7 @@ Handprint produces color-coded diagnostic output as it runs, by default. Howeve
322
323
323
324
Handprint will send files to the different services in parallel, using a number of process threads equal to 1/2 of the number of cores on the computer it is running on. (E.g., if your computer has 4 cores, it will by default use at most 2 threads.) The `-t` option (`/t` on Windows) can be used to change this number.
324
325
325
-
If given the `-@` argument (`/@` on Windows), this program will output a detailed trace of what it is doing. The debug trace will be sent to the given destination, which can be `-` to indicate console output, or a file path to send the output to a file. Handprint will also install a signal handler that responds to signal `SIGUSR1`; if the signal is sent to the running process, it will drop Handprint into the `pdb` debugger. _Note_: It's best to use `-t 1` when attempting to use a debugger because otherwise subthreads will continue running even if the main thread is interrupted.
326
+
If given the `-@` argument (`/@` on Windows), this program will output a detailed trace of what it is doing. The debug trace will be sent to the given destination, which can be `-` to indicate console output, or a file path to send the output to a file. On non-Windows platforms, Handprint will also install a signal handler that responds to signal `SIGUSR1`; if the signal is sent to the running process, it will drop Handprint into the `pdb` debugger. _Note_: It's best to use `-t 1` when attempting to use a debugger because otherwise subthreads will continue running even if the main thread is interrupted.
326
327
327
328
If given the `-V` option (`/V` on Windows), this program will print the version and other information, and exit without doing anything else.
328
329
@@ -418,11 +419,13 @@ Handprint benefitted from feedback from several people, notably from Tommy Keswi
418
419
419
420
Handprint makes use of numerous open-source packages, without which it would have been effectively impossible to develop Handprint with the resources we had. I want to acknowledge this debt. In alphabetical order, the packages are:
420
421
422
+
*[aenum](https://pypi.org/project/aenum/)– advanced enumerations for Python
421
423
*[appdirs](https://github.com/ActiveState/appdirs)– module for determining appropriate platform-specific directories
422
424
*[boltons](https://github.com/mahmoud/boltons/)– package of miscellaneous Python utilities
423
425
*[boto3](https://github.com/boto/boto3)– Amazon AWS SDK for Python
424
426
*[colorama](https://github.com/tartley/colorama)– makes ANSI escape character sequences work under MS Windows terminals
425
427
*[colored](https://gitlab.com/dslackw/colored)– library for color and formatting in terminal
428
+
*[dateparser](https://pypi.org/project/dateparser/)– parse dates in almost any string format
426
429
*[google-api-core, google-api-python-client, google-auth, google-auth-httplib2, google-cloud, google-cloud-vision, googleapis-common-protos, google_api_python_client](https://github.com/googleapis/google-cloud-python)– Google API libraries
427
430
*[halo](https://github.com/ManrajGrover/halo)– busy-spinners for Python command-line programs
428
431
*[humanize](https://github.com/jmoiron/humanize)– make numbers more easily readable by humans
0 commit comments