Skip to content

karrot-dev/email_reply_trimmer_service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Discourse email reply trimmer service as HTTP JSON API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published