Code Monkey home page Code Monkey logo

gutenberg's Introduction

Gutenberg 3.2

Office printer gateway: print documents via web GUI or driverless IPP.

Made by KSI UJ. Powered by Django, Celery and VueJS.

Features

  • Upload a file and print via webapp (installable as a PWA)
  • Submit print requests via driverless IPP, compatible with Windows (generic postscript), Linux (cups ipp everywhere), Android (ipp everywhere), macOSX (cups ipp everywhere) and IOS (separate bonjour server required for AirPrint compatibility).
  • Use any supported CUPS printer
  • Support for printing PDFs, images (JPEG, PNG), documents (DOC, DOCX, ODT, RTF)
  • Customize printing: enable color, enable duplex, number of copies
  • Authentication via OIDC
  • Per printer permissions

Setup

  • Printer: make printing available for server network
  • Linux server: install drivers, configure CUPS
  • Linux server: test lp command
  • Check if you have following commands available: convert (imagemagick), unoconv, gs (ghostscript), pdftk, and bbwrap (bubblewrap)
    • Debian/Ubuntu: sudo apt install imagemagick unoconv ghostscript bubblewrap pdftk
    • Arch Linux: sudo pacman -S imagemagick unoconv ghostscript bubblewrap pdftk
  • You will also need to have yarn or npm to build the web interface.

Setting up the app (for the lazy people)

First, set the temporary GUTENBERG_ENV environment variable to one of these two values:

export GUTENBERG_ENV=local # local development
export GUTENBERG_ENV=production # production settings

And, if you haven't done it yet, set your $EDITOR variable:

export EDITOR=vim # flamewar starting in 3, 2, 1...

Now, execute the following commands:

export DJANGO_SETTINGS_MODULE=gutenberg.settings.${GUTENBERG_ENV}_settings
virtualenv -p python3 venv
source venv/bin/activate
git clone https://github.com/KSIUJ/gutenberg.git
cd gutenberg/gutenberg/settings
cp ${GUTENBERG_ENV}_settings.py.example ${GUTENBERG_ENV}_settings.py
$EDITOR ${GUTENBERG_ENV}_settings.py # edit the values appropriately
cd ../..
pip install -r requirements.txt
yarn install
yarn build
python manage.py migrate
python manage.py runserver 0.0.0.0:11111
# visit localhost:11111 and check if everything works

You will also need to start at least one worker. In the main directory after activating the virtual environment:

celery -A gutenberg worker -B -l INFO

For proper deployment (instead of manage.py runserver), see the uWSGI documentation.

IPP features might not work with runserver- proper front webserver is required (works with eg. nginx + uwsgi). This is due to an error in Django (or one of its dependencies) - the Expect: 100-continue HTTP header is not handled properly by the development server (IPP standard requires it).

Please remember to add both uwsgi (or your server of choice) AND celery worker (including celery beat) to systemd (or the init server you use).

Exemplary production configs for systemd, uwsgi and nginx setup are available in the /examples/ directory.

Configuration

Go to <YOUR SERVER URL>/admin/.

gutenberg's People

Contributors

apardyl avatar m4tx avatar dependabot[bot] avatar danielskowronski avatar apfelwurm avatar micpiotrowski avatar xenox40 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.