Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
EugenMayer committed Jan 29, 2023
1 parent 72f1562 commit 8bbcd81
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ This project is basically an extended version of [jodconverter-samples-rest](htt

You can use this project as it is using docker with `ghcr.io/eugenmayer/kontextwork-converter` or build it here yourself.


## Usage

```bash
docker run --memory 512m --name converter-prod --rm -p 8080:8080 ghcr.io/eugenmayer/kontextwork-converter:production
```

Now convert a `docx` to `html`
```bash
cd officeconverter
curl -F file=@examples/example.docx "localhost:14080/conversion?format=html" -o /tmp/test.html
```

## Build

local java build, when you have all the build tools present + libreoffice locally installed
Expand All @@ -18,13 +31,11 @@ local java build, when you have all the build tools present + libreoffice locall

or better use the docker image with everything included, no dev tools/LO needed locally

# this builds the source a
make build

make start-prod

# alternativly
docker run --memory 512m --name converter-prod --rm -p 8080:8080 ghcr.io/eugenmayer/kontextwork-converter:production
```bash
# this builds the source a
make build
make start-prod
```

You can now connect to the 5001 remote debugger port, just use the existing IntelliJ task if you like

Expand Down Expand Up @@ -69,6 +80,8 @@ debugging port enabled on 5001
## REST endpoints

Check the controller to understand the different endpoints

- `/conversion?format=html` as multipart with `file` as the file to convert and `format` for the target format

## Release

Expand Down Expand Up @@ -105,7 +118,7 @@ server:
You can edit the [src/resources/document-formats.json](src/resources/document-formats.json) and add new custom formats.
The original can be found at (https://github.com/jodconverter/jodconverter/blob/master/jodconverter-core/src/main/resources/document-formats.json)[jodconverter-core].
We already added support for dotx/xltx for example.
We already added support for `dotx/xltx` for example.

## Internals

Expand Down
Binary file added examples/example.docx
Binary file not shown.

0 comments on commit 8bbcd81

Please sign in to comment.