Sha256: 4a4bf78d0283b8a41b820f821c1d5713f11ac0fa66c9a36acb7fd59a48369c99

Contents?: true

Size: 1.28 KB

Versions: 3

Compression:

Stored size: 1.28 KB

Contents

require 'stratify-itunes/query'

module Stratify
  module ITunes
    class Collector < Stratify::Collector
      source "iTunes"

      configuration_fields :library_path => {:type => :string, :label => "Location of 'iTunes Music Library.xml' file"}

      configuration_instructions %q[
        <p>An iTunes collector pulls in your latest iTunes activity from an "iTunes Music Library.xml" file.  On OS X, this file typically resides at <code>~/Music/iTunes/iTunes Music Library.xml</code>. To create an iTunes collector, provide the location of your iTunes XML file.</p>

        <p>To pull in activity from a local iTunes library, just provide the file path, and you're all set.  For example:</p>

        <p><code>/Users/johndoe/Music/iTunes/iTunes Music Library.xml</code></p>

        <p>You can also pull in activity from an iTunes XML file at a remote location.  To do so, just provide a URL that points to the file.  A few examples:</p>

        <p><code>http://dl.dropbox.com/u/1234567/iTunes%20Music%20Library.xml</code></p>

        <p><code>ftp://username:password@LivingRoomMacMini.local/Music/iTunes/iTunes%20Music%20Library.xml</code></p>
      ]

      def activities
        query.activities
      end

      def query
        Stratify::ITunes::Query.new(library_path)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
stratify-itunes-0.1.3 lib/stratify-itunes/collector.rb
stratify-itunes-0.1.2 lib/stratify-itunes/collector.rb
stratify-itunes-0.1.0 lib/stratify-itunes/collector.rb