@datagica/datanote-service-file2text
v1.0.0
Published
Convert a document to plain text
Downloads
4
Readme
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"
$ 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"