Wraps https://github.com/discourse/email_reply_trimmer into a docker container and offers trimming services via HTTP.
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"}
# 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