Giter VIP home page Giter VIP logo

badgeulator's Introduction

Build Status Code Climate Coverage

A system to keep track of and print employee identification cards.

Info & Cropping
Info & Cropping
Preview
Preview
Design
Design

FEATURES

  • admin and user roles, admin can maintain users and delete data, devise ldap authentication by default
  • user-defined badge layouts
  • lookup employee data from external source (default is active directory) or simply fill in fields
  • updates thumbnailPhoto in active directory
  • takes picture via webcam

It does not do any encoding, though adding a barcode would be simple since prawn is used to generate the badge.

CONFIGURATION

  • If using active directory, you'll need to configure the ldap.yml for your connection information.
  • Database connection information goes in the database.yml.
  • .env (or your environment) needs the following:
    • USE_LDAP=true - to lookup employee information based on the employee id via an LDAP query
    • ALLOW_EDIT=true - to allow employee fields (for the badge) to be edited
    • PRINTER=it-riopro - specify the name of the cups printer to use
    • PRINTER_OPTIONS="options" - specify any options you want to pass on to the printer driver
  • Devise needs to be configured in the initializer
  • Errbit (airbrake) needs to be configured in the initializer
  • Make sure you have pdftoppm installed. It's in the poppler-utils apt-get package. This is used for converting the pdf to images for previews and does a much crisper job than imagemagick.

DEPLOYMENT

Deploy with capistrano. cap staging deploy If you get a weird error from passenger about a binary ruby version, then check to make sure your database.yml and ldap.yml files are set up properly.

If Chrome says that you've disallowed access to your camera, it might be because you need to have SSL enabled for the site and it will only work under a secure connection to the server.

You may choose to run rake db:seed to populate the sample badge designs.

Changing the LDAP query

It currently looks up the employee information based on the employeeId attribute, you could change this to something else in badge_controller#lookup or in the badge model's lookup_employee method if more complex query is needed.

TESTING

May need to add a nowhere printer.

lpadmin -p nowhere -E -v file:/dev/null

ATTRIBUTION

Badger image taken from photo by James Perdue, via [CC2 license] (https://creativecommons.org/licenses/by/2.0/).

badgeulator's People

Contributors

davehenton avatar mfrederickson 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.