KPB-US / badgeulator

employee identification badge printing system
1 stars 1 forks source link

CircleCI 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

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

PRAWN NOTES

https://www.rubydoc.info/github/sandal/prawn/toplevel

{cursor} = The current y drawing position relative to the innermost bounding box, or to the page margins at the top level.

CONFIGURATION

Disable CUPS printer discovery by editing /etc/cups/cups-browsed.conf, setting 'BrowseRemoteProtocols none'

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