You can preview the following type of files:
- images(png/jpeg/gif/svg)
- docx, doc, odp, odt, ppt, xls, xlsx
You will be able to:
- Get preview of files.
- Generate thumbnail of files.
Preview will always try to output the file in its original format, while thumbnail will convert it to an image. There is no difference in quality between the two, the difference in quality can be achieved only by asking for a jpeg format and changing the quality parameter. Asking for a GIF output can only be done when the input file is a GIF, otherwise it will raise and error.
Once the service is up and running, APIs will be found here
These are the dependencies that the service has. These dependencies are required to run the service correctly but are not installed by the package. They must be installed if Mandatory otherwise user discretion is advised
Name | Mandatory/Optional |
---|---|
carbonio-storages-ce | Optional |
carbonio-docs-editor | Optional |
Install carbonio-preview-ce
via apt:
sudo apt install carbonio-preview-ce
or via yum:
sudo yum install carbonio-preview-ce
After the installation you must run pending-setups
in order to register the service in service-discover
.
This will start the service as a daemon and allow carbonio-preview-ce
to communicate with the suite using Consul.
To develop this project you will need to configure a proper enviroment.
- download the project from the repository:
git clone 'https://github.com/Zextras/carbonio-preview-ce'
- Go to the project folder
virtualenv --python /usr/bin/python3 venv
source venv/bin/activate
- Install python libraries
pip3 install -r "dev_requirements.txt"
To start the application from command line, go to the project folder and type:
gunicorn controller:app --config gunicorn.conf.py
There are others alternatives, you can also start the program from the main class (if you want to debug it).
Static analysis is provided by a few tools:
- Bandit: security analysis;
- Flake8: code style and indentation analysis;
- Pre-commit: runs static analysis before every commit;
- autopep8: called automatically by pre-commit to static errors.
Pre-commit needs to be activated in the root directory of the project using:
pre-commit install
To activate commit lint (mandatory) then:
pre-commit install --hook-type commit-msg
To run unit tests manually, run the following command from the project folder:
python -m pytest
All the python libraries used can be found on the "requirements.txt" file.
Official Preview-ce backend service for Zextras Carbonio.
Released under the AGPL-3.0-only license as specified here: COPYING.
See COPYING file for the project license details
See THIRDPARTIES file for other licenses details
All non-software material (such as, for example, names, images, logos, sounds) is owned by Zextras s.r.l. and is licensed under CC-BY-NC-SA.
Where not specified, all source files owned by Zextras s.r.l. are licensed under AGPL-3.0-only