Skip to content

employee identification badge printing system

Notifications You must be signed in to change notification settings

davehenton/badgeulator

 
 

Repository files navigation

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/).

About

employee identification badge printing system

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 76.7%
  • HTML 17.2%
  • JavaScript 3.6%
  • CSS 2.5%