• Stars
    star
    117
  • Rank 291,262 (Top 6 %)
  • Language
    Ruby
  • Created over 12 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Upload and manage your assets in the iTunes Store using the iTunes Store’s Transporter (iTMSTransporter).

iTunes::Store::Transporter

<img src=“https://secure.travis-ci.org/sshaw/itunes_store_transporter.svg”/> <img src=“https://ci.appveyor.com/api/projects/status/k6w6ob5f7s9j8pv8?svg=true”/> <img src=“https://codeclimate.com/github/sshaw/itunes_store_transporter.svg” />

Upload and manage your assets in the iTunes Store using the iTunes Store’s Transporter (iTMSTransporter).

Overview

require "itunes/store/transporter"

itms = iTunes::Store::Transporter.new(:username => "SomeUser",
                                      :shortname => "shrt",  # or :itc_provider, if you have no shortname
                                      :password => "w3c@llYoU!")

itms.upload("/path/to/yourpackage.itmsp")
metadata = itms.lookup(:apple_id => "yourpackage")

begin
  itms.verify("/path/to/package2.itmsp", :verify_asssets => false)
rescue iTunes::Store::Transporter::ExecutionError => e
  puts "Exited with #{e.exitstatus}"

  e.errors.each do |error|
    puts "#{error.message} - #{error.code}"
    puts "Basically, you have some faulty metadata" if error.missing_data?
  end
end

Description

iTunes::Store::Transporter is a wrapper around Apple’s iTMSTransporter program. It currently supports the following operations:

  • Upload packages

  • Validate packages

  • Retrieve status information

  • Lookup package metadata and video assets

  • List providers

  • Retrieve iTunes metadata schemas

It also includes itms, an executable that’s sorta like using iTMSTransporter directly except that it can send email notifications and allows one to set global/per-command defaults via $HOME/.itms.

Requirements

Installation

Add ‘gem “itunes_store_transporter”` to your Ruby project’s Gemfile to use as a library, or run ‘gem install itunes_store_transporter` to install system-wide for CLI usage.

Locating iTMSTransporter

If the iTMSTransporter cannot be found in one your platform’s known locations you must specify it when creating an instance of iTunes::Store::Transporter via {the :path option}[http://www.rubydoc.info/gems/itunes_store_transporter/ITunes/Store/Transporter/ITMSTransporter#initialize-instance_method].

If you’re using the bundled itms command you must use its --path option or specify the path in the itms config file. See the itms section for more info.

Using itms

itms COMMAND [OPTIONS] [PACKAGE]

Note that options with a value must contain the equals character ("="). The format is --option=value and not --option value.

Examples

itms upload --username=sshaw --password=w3cAllYoU --transport=aspera a_package.itmsp
itms version
itms status --no-print-stderr --vendor-id=X123123 --username=sshaw --password=sekr3t_ --shortname=ss

Username, Password, Short Name

Most all commands require your username and password, some require a shortname. These can be specified on the command line via the --username, --password, and --shortname options, or via an itms config file. See the config file section below.

Lookup command

The lookup command differs slightly from the gem by allowing you to download low-quality copies of the assets associated with the looked up metadata. These assets are created by Apple (at the time of this writing, Apple only allows you to download full and preview assets, there is nothing in itms that would prevent you from downloading other types of assets if/when they’re supported).

For example, to lookup the metadata for package X123 and download low-quality copies of all the assets:

itms lookup --vendor-id=X123 --assets

To download a particular asset type just provide its name:

itms lookup --vendor-id=X123 --assets=preview

If there are multiple territories this will download the preview assets for each of them. To only download assets in a given territory or territories use:

itms lookup --vendor-id=X123 --assets=preview:US
itms lookup --vendor-id=X123 --assets=preview:US:BR

If necessary multiple asset types can be seperated by a comma:

itms lookup --vendor-id=X123 --assets=full,preview
itms lookup --vendor-id=X123 --assets=full,preview:MX

Config file

Default options and email notifications can be placed in a YAML file at $HOME/.itms. To skip loading the config file use the --no-config option.

# Global command defaults
path: /usr/bin
username: sshaw
password: Pa55W0rd!

# Global email defaults
email:
  to: [email protected]
  from: [email protected]
  host: smtp.example.com

# Verify command
verify:
  shortname: lUzer

# Upload command
upload:
  shortname: enc0d3rz
  transport: Aspera
  rate: 750000
  # Email notifications for the upload command
  email:
    success:
      cc: [email protected]
      subject: iTunes Upload <%= @apple_id %>
      message: |
        <%= @username %> uploaded it using <%= @transport %>

        Bye!
    failure:
      to: [email protected]
      subject: Upload Failed!
      message: |
        Here's the problem:

        <%= @error %>

        Fix it!

As you can see, command options are turned into template variables.

More Info

Author

Skye Shaw [skye.shaw AT gmail.com]

License

Released under the MIT License: www.opensource.org/licenses/MIT


Made by ScreenStaring

More Repositories

1

git-link

Emacs package to get the GitHub/Bitbucket/GitLab/... URL for a buffer location
Emacs Lisp
380
star
2

copy-as-format

Emacs function to copy buffer locations as GitHub/Slack/JIRA etc... formatted code
Emacs Lisp
133
star
3

export-pull-requests

Export pull requests and/or issues to a CSV file. Supports GitHub, GitLab, and Bitbucket
Ruby
107
star
4

itunes_store_transporter_web

iTunes Store Transporter GUI: GUI and workflow automation for the iTunes Store’s Transporter (iTMSTransporter)
Ruby
80
star
5

yymmdd

Tiny DSL for idiomatic date parsing and formatting in Ruby
Ruby
78
star
6

normalize_country

Convert country names and codes to a standard.
Ruby
67
star
7

ddex

DDEX metadata serialization for Ruby
Ruby
51
star
8

build-status

Emacs minor mode that monitors and shows a buffer's build status in the mode line.
Emacs Lisp
27
star
9

class2

Easily create Ruby class hierarchies that support nested attributes, type conversion, serialization, equality, and more.
Ruby
14
star
10

output-as-format

Output stdin as GitHub/Slack/Jira etc... formatted code, lists, or quotes
Perl
12
star
11

jaxb2ruby

Generate pure Ruby objects from an XML schema (XSD) using JAXB and JRuby. Use your favorite XML to object mapper or a custom ERB template.
Ruby
12
star
12

batchlabels

Add or remove labels in batches to/from GitHub issues and pull requests.
Go
8
star
13

angry_raise

raise Ruby exceptions, with emotion and intensity
Ruby
6
star
14

optout

The opposite of getopt(): validate an option hash and turn it into something appropriate for exec() and system()-like functions
Ruby
5
star
15

URI-fasp

URI handler for Aspera's FASP protocol
Perl
5
star
16

transform_legacy_attribute_methods

A Rails plugin that allows you to transform your ActiveRecord model's "legacy" attribute methods into attribute aliases that can be used in dynamic finders and attribute hashes.
Ruby
5
star
17

Time-Timecode

Video timecode class for Perl and command line program. Supports any frame rate, conversions, drop/non-drop frame counts and more.
Perl
5
star
18

issue-link

Get the link to JIRA/Tracker/GitHub issues. Turn bug/feature/issue IDs into links.
Emacs Lisp
4
star
19

ruby-factory-mode

Emacs minor mode for Ruby test object generation libraries
Emacs Lisp
3
star
20

Mojolicious-Plugin-FormFields

Use objects and data structures in your forms
Perl
3
star
21

dotfiles

My dotfiles. Everything but Emacs, which has its own repository: https://github.com/sshaw/emacs.d
Shell
3
star
22

ruby-jing

RELAX NG schema validation in Ruby using the Jing CLI
Ruby
3
star
23

xslt-timecode

A pure, dependency free, XSLT 1.0 library for video timecode manipulation
XSLT
2
star
24

glc

The GitHub Link Checker. Monitor GitHub activity for links that aren't permanent, and do something.
Go
2
star
25

interrobang

Did the method end with "?" or "!"‽ Interrobang gives you the best of both worlds‽
Ruby
2
star
26

selfie_formatter

The RSpec Selfie Formatter: A Formatter that takes photos of you while your tests run and uses them to track progress and format the results.
Ruby
2
star
27

jquery-selectunique

Given a group of select fields with the same options, SelectUnique will remove an option from the other select fields when it's selected, and put it back when it's changed.
JavaScript
2
star
28

markdown_usage

Output a colorized version of your program's usage using a Markdown document embedded in your script, from your project's README, or anywhere else.
Ruby
1
star
29

Mojolicious-Plugin-ParamExpand

Turns request parameters into nested data structures using CGI::Expand.
Perl
1
star
30

logging-honeybadger

Honeybadger appender for the Logging gem
Ruby
1
star
31

logging-appenders-airbrake

Airbrake appender for the Logging gem
Ruby
1
star
32

page_number

Page number validation. Utility methods for pagination page and per page that make sure you'll always have a valid number
Ruby
1
star
33

require3

Kernel#require something and make it accessible via a different namespace.
Ruby
1
star
34

alias2

Make classes, modules, and constants accessible via a different namespace.
Ruby
1
star
35

emacs.d

My Emacs config
Emacs Lisp
1
star
36

select-unique

Given a group of HTML select elements with the same options, Select Unique will remove an option from the other select elements when it's selected, and put it back when it's changed.
JavaScript
1
star
37

Mojolicious-Command-secret

Generate a secret() using random bytes and add it to your app
Perl
1
star
38

keep_defaults

Prevent ActiveRecord attributes for not null columns with default values from being set to nil.
Ruby
1
star
39

Mojolicious-Plugin-DigestAuth

HTTP Digest Authentication for Mojolicious
Perl
1
star