Skip to content
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

add badge with link to pypi to readme #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![Build Status](https://travis-ci.org/fourdigits/wagtail_textract.svg?branch=master)](https://travis-ci.org/fourdigits/wagtail_textract)
[![Coverage Report](http://codecov.io/github/fourdigits/wagtail_textract/coverage.svg?branch=master)](http://codecov.io/github/fourdigits/wagtail_textract?branch=master)
[![PyPI version](https://badge.fury.io/py/wagtail-textract.svg)](https://badge.fury.io/py/wagtail-textract)

# Text extraction for Wagtail document search

Expand Down Expand Up @@ -29,18 +30,15 @@ the live search finds it:
The assumption is that this search should not only be available in Wagtail's admin interface,
but also in a public-facing search view, for which we provide a code example.


## Requirements

- Wagtail 2 (see [tox.ini](./tox.ini))
- The [Textract dependencies][8]


## Maturity

We have been using this package in production since August 2018 on https://nuffic.nl.


## Installation

- Install the [Textract dependencies][8]
Expand All @@ -57,7 +55,6 @@ textract 1.6.1 has requirement beautifulsoup4==4.5.3, but you'll have beautifuls

We haven't seen this leading to problems, but it's something to keep in mind.


### Tesseract

In order to make `textract` use [Tesseract][4], which happens if regular
Expand All @@ -67,7 +64,6 @@ base its word matching on.
Create a `tessdata` directory in your project directory, and download the
[languages][5] you want.


## Transcribing

Transcription is done automatically after Document save,
Expand All @@ -79,7 +75,6 @@ To transcribe all existing Documents, run the management command::

This may take a long time, obviously.


## Usage in custom view

Here is a code example for a search view (outside Wagtail's admin interface)
Expand Down Expand Up @@ -123,7 +118,6 @@ because you can't do `pageurl result` on a Document:
{% endif %}
```


## What if you already use a custom Document model?

In order to use wagtail_textract, your `CustomizedDocument` model should do
Expand All @@ -149,19 +143,16 @@ class CustomizedDocument(TranscriptionMixin, ...):
Note that the first class to subclass should be `TranscriptionMixin`,
so its `save()` takes precedence over that of the other parent classes.


## Tests

To run tests, checkout this repository and:

make test


### Coverage

A coverage report will be generated in `./coverage_html_report/`.


## Contributors

- Karl Hobley
Expand All @@ -174,7 +165,6 @@ A coverage report will be generated in `./coverage_html_report/`.
- Dan Braghis
- Dan Swain


[1]: https://wagtail.io/
[2]: https://github.com/deanmalmgren/textract
[3]: https://github.com/wagtail/wagtail/issues/542
Expand Down