https://github.com/buren/document_parser
Small Rails API app to parse documents.
https://github.com/buren/document_parser
document-parser rails-api yomu
Last synced: about 1 month ago
JSON representation
Small Rails API app to parse documents.
- Host: GitHub
- URL: https://github.com/buren/document_parser
- Owner: buren
- Created: 2017-06-25T21:30:43.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-11-30T01:29:11.000Z (almost 4 years ago)
- Last Synced: 2025-01-20T05:17:09.627Z (9 months ago)
- Topics: document-parser, rails-api, yomu
- Language: Ruby
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Document Parser
> This app does one little thing, and does it well. Which is to wrap the [`yomu`](https://github.com/Erol/yomu) gem.
Small Rails API app to parse documents.
[](https://heroku.com/deploy?template=https://github.com/buren/document_parser)
## API
__Parse a document__:
Request
`POST /document`.
```json
{
"file": "base64-endcoded-string-goes-here..."
}
```Response
```json
{
"title": "The title of the document",
"content_type": "application/pdf",
"created_at": "2015-08-17T22:29:23Z",
"metadata": {
"Content-Type": "application/pdf",
"Creation-Date": "2015-08-17T22:29:23Z",
"X-Parsed-By": [
"org.apache.tika.parser.DefaultParser",
"org.apache.tika.parser.pdf.PDFParser"
],
"title": "The title of the document",
"xmpTPg:NPages": "1"
},
"text": "The contents of the document will be returned here."
}
```## Configuration
__Configuration__
`API_AUTH_TOKEN` - optional ENV-variable to protect API endpoints.
## Deploy
One click deploy to Heroku.
[](https://heroku.com/deploy?template=https://github.com/buren/document_parser)
## Dependencies
* Rails 5.1
* System dependencies
- Ruby 2.4
- java