Skip to content

Commit

Permalink
Updates README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
captain-fox committed May 11, 2020
1 parent 1042d86 commit 038b6fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,20 @@ icon = open(os.path.join(os.path.dirname(__file__), '...your_path_to/icon.png'),
icon_2x = open(os.path.join(os.path.dirname(__file__), '...your_path_to/icon@2x.png'), 'rb').read()
logo = open(os.path.join(os.path.dirname(__file__), '...your_path_to/logo.png'), 'rb').read()
logo_2x = open(os.path.join(os.path.dirname(__file__), '...your_path_to/logo@2x.png'), 'rb').read()

# It is more likely that you'll be dumping python dictionary into json file, but as an example `pass.json` is a file
pass_json = open(os.path.join(os.path.dirname(__file__), '...your_path_to/pass.json'), 'rb').read()

key = open(os.path.join(os.path.dirname(__file__), '...your_path_to/key.pem'), 'rb').read()
cert = open(os.path.join(os.path.dirname(__file__), '...your_path_to/certificate.pem'), 'rb').read()
password = bytes('your_password_123', 'utf8')

p = PKPass(
('icon.png', icon),
('icon@2x.png', icon_2x),
('logo.png', logo),
('logo@2x.png', logo_2x),
('pass.json', pass_json),
)

p.sign(cert=cert, key=key, password=password)

with open('pass.pkpass', 'wb') as file:
Expand Down

0 comments on commit 038b6fa

Please sign in to comment.