1.0.0 • Published 7 years ago

@datagica/datanote-service-file2text v1.0.0

Weekly downloads
1
License
ISC
Repository
-
Last release
7 years ago

file2text

a micro service to convert a document to plain text

Usage

npm run start then POST a file to the micro-service using the right Content-Type.

Examples

Plain text

$ curl -i -X POST "http://localhost:3000" -H "Content-Type: text/plain" --data-binary "@tests/fixtures/test.txt"

PDF

$ curl -i -X POST "http://localhost:3000" -H "Content-Type: application/pdf" --data-binary "@tests/fixtures/test.pdf"

Doc

$ curl -i -X POST "http://localhost:3000" -H "Content-Type: application/msword" --data-binary "@tests/fixtures/test.doc"

Docx

$ curl -i -X POST "http://localhost:3000" -H "Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document" --data-binary "@tests/fixtures/test.docx"