No description
Find a file
2023-11-16 16:18:55 -06:00
public external compiler script is not necessary 2023-11-16 16:15:24 -06:00
.gitignore ready 2023-11-13 17:20:47 -06:00
COPYING license 2023-11-13 19:36:12 -06:00
nginx.conf iunit 2023-11-13 17:00:11 -06:00
README.md readme 2023-11-16 16:18:55 -06:00

groff-web

Description

Minimal groff web frontend

Installation

Dependencies:

apt install -y groff-base grap nginx php-fpm

Download and extract files. Then, copy web root and set up permissions to www-data user so PDFs can be generated.

wget "https://gitlab.com/tavo-wasd/groff-web/-/archive/main/groff-web-main.tar.gz"
tar -xvf groff-web-main.tar.gz
cp -r groff-web-main/public /var/www/groff-web
chown -R www-data:www-data /var/www/groff-web

nginx setup.

cp groff-web-main/nginx.conf /etc/nginx/sites-available/groff-web.conf
sed -i 's/groff.example.org/MY.DOMAIN.COM/' /etc/nginx/sites-available/groff-web.conf
ln -s /etc/nginx/sites-available/groff-web.conf /etc/nginx/sites-enabled
systemctl reload nginx

Configuration

Here, you can change the groff binary PATH, and also settings an external compilation script if you prefer.

<?php
    ...
    # groff settings
    $groff = "/usr/bin/groff";
    $comp = "$groff -ketpG -mspdf -Tpdf tmp/$uid.ms > tmp/$uid.pdf";
    # In case you want to use an external
    # script to compile with groff:
    #$comp = "sh groff-compiler.sh";
    ...
?>

License

GPL v3.0