GithubHelp home page GithubHelp logo

megeek / dubai Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nomad-cli/dubai

0.0 2.0 0.0 247 KB

Generate and Preview Passbook Passes

Home Page: http://nomad-cli.com

License: MIT License

Ruby 100.00%

dubai's Introduction

Dubai

Passbook is an iOS 6 feature that manages boarding passes, movie tickets, retail coupons, & loyalty cards. Using the PassKit API, developers can register web services to automatically update content on the pass, such as gate changes on a boarding pass, or adding credit to a loyalty card.

Dubai makes it easy to generate .pkpass from a script or the command line, allowing you to rapidly iterate on the design and content of your passes, or generate one-offs on the fly.

Pairs nicely with Rack::Passbook.

Dubai is named for Dubai, UAE, a center of commerce and trade (and as Dave Rupert was all-too-eager to point out, an unfortunate pun on "Do Buy!"). It's part of a series of world-class command-line utilities for iOS development, which includes Cupertino (Apple Dev Center management), Shenzhen (Building & Distribution), Houston (Push Notifications), Venice (In-App Purchase Receipt Verification), and Nashville (iTunes Store API).

Installation

$ gem install dubai

Usage

require 'dubai'

Dubai::Passbook.certificate, Dubai::Passbook.password = "/path/to/certificate.p12", "..."

# Example.pass is a directory with files "pass.json", "icon.png" & "[email protected]"
File.open("Example.pkpass", 'w') do |f|
  f.write Dubai::Passbook::Pass.new("Example.pass").pkpass.string
end

Comand Line Interface

Dubai also comes with the pk binary, which provides a convenient way to generate and preview passes

$ pk generate Example.pass -T boarding-pass

Dubai comes with templates for all of the different Passbook layouts:

  • boarding-pass
  • coupon
  • event-ticket
  • store-card
  • generic

Build a .pkpass file (which can previewed with a drag-and-drop onto the iOS Simulator):

$ pk build Example.pass -c /path/to/certificate.p12

...or serve them from a webserver (which can be previewed by visiting the address on a device or the simulator):

$ pk serve Example.pass -c /path/to/certificate.p12
$ open http://localhost:4567/pass.pkpass

Specify a -H / --host option to bind the server to a particular host. Binding on 0.0.0.0 will listen for all incoming connections on the local network, such as an iPhone or iPad:

$ pk serve Example.pass -H 0.0.0.0

Creator

Mattt Thompson (@mattt)

License

Dubai is available under the MIT license. See the LICENSE file for more info.

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.