Skip to content

Commit

Permalink
Merge pull request #160 from otiai10/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
otiai10 authored Aug 2, 2019
2 parents 76211c4 + c8725db commit cc6b935
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
> This file is generated based on `ISSUE_TEMPLATE.md`. The issue reporter must read and remove this block before submitting.
> This text is generated based on `ISSUE_TEMPLATE.md`. The issue reporter must read and remove this block before submitting.
# Summary

- bla bla bla

# Reproducibility

## Reproducility Frequency
## Reproducibility Frequency

- XX%

Expand Down
7 changes: 7 additions & 0 deletions all_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ func TestNewClient(t *testing.T) {
Expect(t, client).TypeOf("*gosseract.Client")
}

func TestClient_Version(t *testing.T) {
client := NewClient()
defer client.Close()
version := client.Version()
Expect(t, version).Match("[0-9]{1}.[0-9]{1,2}(.[0-9a-z_-]*)?")
}

func TestClient_SetImage(t *testing.T) {
client := NewClient()
defer client.Close()
Expand Down
6 changes: 6 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ func (client *Client) Close() (err error) {
return err
}

// Version provides the version of Tesseract used by this client.
func (client *Client) Version() string {
version := C.Version(client.api)
return C.GoString(version)
}

// SetImage sets path to image file to be processed OCR.
func (client *Client) SetImage(imagepath string) error {

Expand Down

0 comments on commit cc6b935

Please sign in to comment.