Sign inSign up

karrot/email_reply_trimmer_service

By karrot

•Updated over 6 years ago

Image
0

149

karrot/email_reply_trimmer_service repository overview

Wraps https://github.com/discourse/email_reply_trimmer⁠ into a docker container and offers trimming services via HTTP.

⁠Usage

Run the docker container:

docker run -it -p 4567:4567 karrot/email_reply_trimmer_service

Then ask it to trim a plaintext email body:

curl -X POST http://localhost:4567/trim -H "Content-Type: application/json" --data '{"text": "a line\na new line\n> a quotation"}'

It should return the trimmed text:

{"trimmed":"a line\na new line"}

⁠Development

# Install dependencies
bundle install --path .bundle

# Run the server (and restart if file changed)
ls server.rb | entr -r bundle exec ruby server.rb 

Commits pushed to master are built by Docker Cloud and published at https://cloud.docker.com/u/karrot/repository/docker/karrot/email_reply_trimmer_service⁠

Tag summary

Content type

Image

Digest

Size

336.4 MB

Last updated

over 6 years ago

docker pull karrot/email_reply_trimmer_service