dveselov / Docsbox
Licence: mit
Self-hosted document converting service with HTTP API
Stars: ✭ 235
Programming Languages
python
139335 projects - #7 most used programming language
Projects that are alternatives of or similar to Docsbox
Fx
A Function as a Service tool makes a function as a container-based service in seconds.
Stars: ✭ 1,679 (+614.47%)
Mutual labels: microservice, self-hosted
Pdf
Simple http microservice that converts Word documents to PDF
Stars: ✭ 107 (-54.47%)
Mutual labels: microservice, libreoffice
Jweb Cms
A developer friendly Java CMS based on JAX-RS, Guice style DI, Bean Validation, JPA and React.
Stars: ✭ 216 (-8.09%)
Mutual labels: microservice
Shaarli Material
Shaarli Material is a theme for Shaarli, the famous personal, minimalist, super-fast, database free, bookmarking service.
Stars: ✭ 228 (-2.98%)
Mutual labels: self-hosted
Spacy Api Docker
spaCy REST API, wrapped in a Docker container.
Stars: ✭ 222 (-5.53%)
Mutual labels: microservice
Akka Management
Akka Management is a suite of tools for operating Akka Clusters.
Stars: ✭ 218 (-7.23%)
Mutual labels: microservice
Notadd
A microservice development architecture based on nest.js. —— 基于 Nest.js 的微服务开发架构。
Stars: ✭ 2,556 (+987.66%)
Mutual labels: microservice
Viewscreen
Viewscreen - a personal video streaming server
Stars: ✭ 215 (-8.51%)
Mutual labels: self-hosted
Wakapi
📊 A minimalist, self-hosted WakaTime-compatible backend for coding statistics
Stars: ✭ 232 (-1.28%)
Mutual labels: self-hosted
Magnetico
Autonomous (self-hosted) BitTorrent DHT search engine suite.
Stars: ✭ 2,626 (+1017.45%)
Mutual labels: self-hosted
Gotenberg
A Docker-powered stateless API for PDF files.
Stars: ✭ 3,272 (+1292.34%)
Mutual labels: libreoffice
Owlcloud
OwnCloud for owls done via The Microservice Architecture
Stars: ✭ 221 (-5.96%)
Mutual labels: microservice
Helloworld Msa
Main repository with documentation and support files
Stars: ✭ 218 (-7.23%)
Mutual labels: microservice
Maloja
Self-hosted music scrobble database to create personal listening statistics and charts
Stars: ✭ 223 (-5.11%)
Mutual labels: self-hosted
Logarr
“Logarr” is a self-hosted PHP web app that consolidates, formats, and displays log and text files for easy analysis and monitoring.
Stars: ✭ 216 (-8.09%)
Mutual labels: self-hosted
Quickperf
QuickPerf is a testing library for Java to quickly evaluate and improve some performance-related properties
Stars: ✭ 231 (-1.7%)
Mutual labels: microservice
Express Gateway
A microservices API Gateway built on top of Express.js
Stars: ✭ 2,583 (+999.15%)
Mutual labels: microservice
Cashier Btc
💰 Self-hosted Bitcoin payment gateway (฿)
Stars: ✭ 223 (-5.11%)
Mutual labels: microservice
Homepage
A simple, standalone, self-hosted PHP page that is your window to your server and the web.
Stars: ✭ 234 (-0.43%)
Mutual labels: self-hosted
docsbox
docsbox
is a standalone service that allows you convert office documents, like .docx and .pptx, into more useful filetypes like PDF, for viewing it in browser with PDF.js, or HTML for organizing full-text search of document content.
docsbox
uses LibreOffice (via LibreOfficeKit) for document converting.
$ curl -F "[email protected]" http://localhost/api/v1/
{
"id": "9b643d78-d0c8-4552-a0c5-111a89896176",
"status": "queued"
}
$ curl http://localhost/api/v1/9b643d78-d0c8-4552-a0c5-111a89896176
{
"id": "9b643d78-d0c8-4552-a0c5-111a89896176",
"result_url": "/media/9b643d78-d0c8-4552-a0c5-111a89896176.zip",
"status": "finished"
}
$ curl -O http://localhost/media/9b643d78-d0c8-4552-a0c5-111a89896176.zip
$ unzip -l 9b643d78-d0c8-4552-a0c5-111a89896176.zip
Archive: 9b643d78-d0c8-4552-a0c5-111a89896176.zip
Length Date Time Name
--------- ---------- ----- ----
11135 2016-07-08 05:31 txt
373984 2016-07-08 05:31 pdf
147050 2016-07-08 05:31 html
--------- -------
532169 3 files
$ cat options.json
{
"formats": ["pdf"],
"thumbnails": {
"size": "640x480",
}
}
$ curl -i -F "[email protected]" -F "options=<options.json" http://localhost/api/v1/
{
"id": "afb58e2b-78fa-4dd7-b7f9-a64f75f50cb1",
"status": "queued"
}
$ curl http://localhost/api/v1/afb58e2b-78fa-4dd7-b7f9-a64f75f50cb1
{
"id": "afb58e2b-78fa-4dd7-b7f9-a64f75f50cb1",
"status": "finished",
"result_url": "/media/afb58e2b-78fa-4dd7-b7f9-a64f75f50cb1.zip"
}
$ curl -O http://localhost/media/afb58e2b-78fa-4dd7-b7f9-a64f75f50cb1.zip
$ unzip -l afb58e2b-78fa-4dd7-b7f9-a64f75f50cb1.zip
Archive: afb58e2b-78fa-4dd7-b7f9-a64f75f50cb1.zip
Length Date Time Name
--------- ---------- ----- ----
779820 2016-07-10 02:02 pdf
177357 2016-07-10 02:02 thumbnails/0.png
...
130923 2016-07-10 02:02 thumbnails/30.png
--------- -------
13723770 32 files
API
POST (multipart/form-data) /api/v1/
[email protected]
options={ # json, optional
"formats": ["pdf"] # desired formats to be converted in, optional
"thumbnails": { # optional
"size": "320x240",
}
}
GET /api/v1/{task_id}
Install
Currently, installing powered by docker-compose:
$ git clone https://github.com/dveselov/docsbox.git && cd docsbox
$ docker-compose build
$ docker-compose up
It'll start this services:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7ce674173732 docsbox_nginx "/usr/sbin/nginx" 8 minutes ago Up 8 minutes 0.0.0.0:80->80/tcp docsbox_nginx_1
f6b55773c71d docsbox_rqworker "rq worker -c docsbox" 15 minutes ago Up 8 minutes docsbox_rqworker_1
662b08daefea docsbox_rqscheduler "rqscheduler -H redis" 15 minutes ago Up 8 minutes docsbox_rqscheduler_1
0364df126b36 docsbox_web "gunicorn -b :8000 do" 15 minutes ago Up 8 minutes 8000/tcp docsbox_web_1
5e8c8481e288 redis:latest "docker-entrypoint.sh" 9 hours ago Up 8 minutes 0.0.0.0:6379->6379/tcp docsbox_redis_1
Settings (env)
REDIS_URL - redis-server url (default: redis://redis:6379/0)
REDIS_JOB_TIMEOUT - job timeout (default: 10 minutes)
ORIGINAL_FILE_TTL - TTL for uploaded file in seconds (default: 10 minutes)
RESULT_FILE_TTL - TTL for result file in seconds (default: 24 hours)
THUMBNAILS_DPI - thumbnails dpi, for bigger thumbnails choice bigger values (default: 90)
LIBREOFFICE_PATH - path to libreoffice (default: /usr/lib/libreoffice/program/)
Scaling
Within a single physical server, docsbox can be scaled by docker-compose:
$ docker-compose scale web=4 rqworker=8
For multi-host deployment you'll need to create global syncronized volume (e.g. with flocker), global redis-server and mount it at docker-compose.yml
file.
Supported filetypes
Input | Output | Thumbnails |
---|---|---|
Document doc docx odt rtf
|
pdf txt html
|
yes |
Presentation ppt pptx odp
|
pdf html
|
yes |
Spreadsheet xls xlsx ods
|
pdf csv html
|
yes |
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].