Skip to content

Commit

Permalink
add new config props to README
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Bareuther committed Aug 1, 2024
1 parent 2c59b0e commit 6b31bba
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,20 @@ Configuration happens through environment variables only.
| `TES_NATS_CONNECT_RETRIES` | Number of times a connection to an external NATS server/cluster and to JetStream is being tried. Default: `10` |
| `TES_HOST_PORT` | Listen adress of HTTP server. Default: `:8080` (same as `0.0.0.0:8080`) |
| `TES_NO_HTTP` | If `true` and `TES_EXPOSE_NATS` is `true`, too, no HTTP server is started |
| `TES_REMOVE_NEWLINES` | If true, extracted text will be compacted by replacing newlines with whitespace (Default: `true`). |
| `TES_FORK_THRESHOLD` | Maximum content length (size in bytes) of a file that is being converted in-process rather by a subprocess in fork-exec style. Default: 2 MiB |

## Usage

TBD
### CLI/One-shot usage

```shell
./tes /tmp/my-example.pdf
./tes https://example.com/my.pdf
```

This will output one line with JSON encoded metadata, followed by text.

### Running as service

TBD
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type TesConfig struct {
Debug bool `env:"TES_DEBUG" default:"false"`
// If true the service will exit with an error if NATS or JetStream can't be connected
FailWithoutJetstream bool `env:"TES_FAIL_WITHOUT_JS" default:"true"`
// Maximum content length (size in bytes)of a file that is being converted in-process
// Maximum content length (size in bytes) of a file that is being converted in-process
// rather by a subprocess in fork-exec style. Default: 2 MiB
ForkThreshold int64 `env:"TES_FORK_THRESHOLD" default:"2097152"`
// NATS max msg size (embedded server only)
Expand Down

0 comments on commit 6b31bba

Please sign in to comment.