Rich Annotator System is implemented as a "code overlay" on ShareLatex's free and open source code. It modifies sharelatex into an html2pdf online multi-user collaboration platform. The html2pdf engine is wkhtmltopdf
Follow the sharelatex installation procedure as outlined here: https://github.com/sharelatex/sharelatex/wiki/Quick-Start-Guide More specifically:
- sudo apt update
- sudo apt install docker.io
- sudo apt install docker-compose
- sudo apt-get install redis-server
- sudo apt-get install mongodb
- sudo docker pull sharelatex/sharelatex
- get latest docker-compose.yml from: https://github.com/sharelatex/sharelatex/blob/master/docker-compose.yml
- sudo docker-compose up (creates and starts the containers)
- After that to start the sharelatex docker, simply: sudo docker exec sharelatex
- To bash into the sharelatex docker: sudo docker exec -it sharelatex bash
- cd /var/www/sharelatex/web
- git clone https://github.com/alexfotios/RichAnnotatorSys/var/www/sharelatex/webtem.git
- Manually replace homonymous files in the docker container filesystem with the ones in this repository
Files that need replacing under docker dir /var/www/sharelatex/web are below.
The list below may not be complete - make sure you overwrite all homonymous files in the repository.
0. ./public/minjs/ide/file-tree/FileTreeManager.js
- ./app/js/Features/User/UserRegistrationHandler.js
- ./app/views/project/list/empty-project-list.pug
- ./app/views/layout.pug
- ./app/views/user/passwordReset.pug
- ./public/stylesheets/style.css
- ./app/js/Features/Project/ProjectCreationHandler.js
- ./app/views/user/activate.pug
- ./app/views/layout/footer.pug
- ./app/views/project/editor/left-menu.pug
- ./app/views/project/editor/pdf.pug
- ./app/views/user/setPassword.pug
- ./app/js/Features/Project/ProjectEntityUpdateHandler.js
- ./app/views/project/editor.pug
- ./app/views/project/editor/editor.pug
- ./app/views/project/list/modals.pug
- ./app/views/project/list/project-list.pug
- ./config/settings.defaults.coffee
- ./public/minjs/ide.js
- ./app/views/layout/navbar.pug
- ./app/views/user/register.pug
- ./app/views/admin/register.pug
- ./app/views/project/list/side-bar.pug
- Install Apache & PHP a. sudo apt install apache2 b. sudo apt install php libapache2-mod-php
- Configure apache to run on a port other than 80 and open that port in the firewall
- Install wkhtmltopdf: sudo apt install wkhtmltopdf
- Install xvfb: sudo apt install xvfb
- Add html2pdf.php script to apache2 doc root
- Install MD2PDF lib (https://github.com/showdownjs/showdown) via CDN js script
- Make sure docker does not go to sleep (set appropriate config options)
- Make sure docker auto-restarts on boot
- Restart server
- Clear your browser cache and visit http://rich.ppke.hu
- It is strongly recommended that the Operating System of choice is Ubuntu 18.04 (bionic)
- Other sharelatex codebase dependencies: https://gist.github.com/jbeyerstedt/25aa90cd9a8cfd7476618daca81c9c58