Skip to content

Commit

Permalink
📝 doc update (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianMindee authored Dec 19, 2023
1 parent ce0be4f commit 5ac00c1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 30 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ jobs:
with:
php-version: 8.2

- name: Install and run phpdocumentor
- name: Install phpdocumentor
run: |
wget https://phpdoc.org/phpDocumentor.phar
- name: Build documentation
run: |
php phpDocumentor.phar run -d ./src -t ./docs/_build
- name: Move code samples
run: |
cp -r ./docs/code_samples ./docs/_build/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
Expand Down
32 changes: 5 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ If you do not have them, you'll need the following packages on your system:

Then, install this library:
```shell
composer require mindee
composer require mindee/mindee
```

Finally, PHP away!
Expand Down Expand Up @@ -46,22 +46,22 @@ echo strval($apiResponse->document);

A PHP `File` compatible file:
```php
$input_doc = mindeeClient.sourceFromFile($myFile);
$inputDoc = $mindeeClient->sourceFromFile($myFile);
```

A URL (`HTTPS` only):
```php
$input_doc = mindeeClient.sourceFromUrl("https://files.readme.io/a74eaa5-c8e283b-sample_invoice.jpeg");
$inputDoc = $mindeeClient->sourceFromUrl("https://files.readme.io/a74eaa5-c8e283b-sample_invoice.jpeg");
```

A base64-encoded string, making sure to specify the extension of the file name:
```php
$input_doc = mindeeClient.sourceFromB64($myInputString, "my-file-name.ext");
$inputDoc = $mindeeClient->sourceFromB64($myInputString, "my-file-name.ext");
```

Raw bytes, making sure to specify the extension of the file name:
```php
$input_doc = mindeeClient.sourceFromBytes($myRawBytesSequence, "my-file-name.ext");
$inputDoc = $mindeeClient->sourceFromBytes($myRawBytesSequence, "my-file-name.ext");
```

#### Region-Specific Documents
Expand Down Expand Up @@ -101,28 +101,6 @@ $apiResponse = $mindeeClient->parse(BankCheckV1::class, $inputSource);
echo strval($apiResponse->document);
```

### Additional Options
Options to pass when sending a file.

#### Page Options
Allows sending only certain pages in a PDF.

In this example we only send the first, penultimate and last pages:

```php
from mindee import Client, product, PageOptions

result = mindee_client.parse(
product.InvoiceV4,
input_source,
page_options=PageOptions(
page_indexes=[0, -2, -1],
operation=PageOptions.KEEP_ONLY,
on_min_pages=2
)
)
```

## Further Reading
Complete details on the working of the library are available in the following guides:

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/extras/guide/getting_started.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This guide will help you get started with the Mindee PHP OCR SDK to easily extract data from your documents.
This guide will help you get started with the Mindee PHP OCR SDK to easily extract data from your documents.

The PHP OCR SDK supports [invoice](https://developers.mindee.com/docs/php-invoice-ocr), [passport](https://developers.mindee.com/docs/php-passport-ocr), [receipt](https://developers.mindee.com/docs/php-receipt-ocr) OCR APIs and [custom-built API](https://developers.mindee.com/docs/php-api-builder) from the API Builder.

Expand All @@ -14,7 +14,7 @@ You can view the source code on [GitHub](https://github.com/mindee/mindee-api-ph
To quickly get started with the PHP OCR SDK anywhere, the preferred installation method is via `composer`.

```shell
composer require mindee
composer require mindee/mindee
```

### Development Installation
Expand Down

0 comments on commit 5ac00c1

Please sign in to comment.