<commit_before>require 'rubygems'
require 'rbosa'

class Mounce
  attr_reader :artist, :track

  def initialize(config_file='~/.mounce.yml')
    config(File.expand_path(config_file))
    @itunes = OSA.app('iTunes')
    @artist, @track = find_song_information
  end

  def message(tag='#music')
    text = [@artist, @track].compact.join(' - ')
    "#{tag} #{text}"
  end

  def share!
    `curl #{@config['api']} -u #{@config['username']}:#{@config['password']} -d status="#{message}"`
  end

  private

    def config(config_file)
      if File.exist?(config_file)
        @config = YAML.load(open(config_file))['presently']
      else
        raise "Missing config file: #{config_file} (see 'mounce --help')"
      end
    end

    def find_song_information
      return @itunes.current_stream_title.split('-').map{|item| item.strip} if stream?
      [@itunes.current_track.artist, @itunes.current_track.name]
    end

    def stream?
      !!@itunes.current_stream_title
    end
end

<commit_msg>Removes gst notation because it sucks and is unecessary ;)<commit_after>require 'rubygems'
require 'rbosa'

class Mounce
  attr_reader :artist, :track

  def initialize(config_file='~/.mounce.yml')
    config(File.expand_path(config_file))
    @itunes = OSA.app('iTunes')
    @artist, @track = find_song_information
  end

  def message(tag='#music')
    text = [@artist, @track].compact.join(' - ')
    "#{tag} #{text}"
  end

  def share!
    `curl #{@config['api']} -u #{@config['username']}:#{@config['password']} -d status="#{message}"`
  end

  private

    def config(config_file)
      if File.exist?(config_file)
        @config = YAML.load(open(config_file))['presently']
      else
        raise "Missing config file: #{config_file} (see 'mounce --help')"
      end
    end

    def find_song_information
      return @itunes.current_stream_title.split('-').map{|item| item.strip} if stream?
      [@itunes.current_track.artist, @itunes.current_track.name]
    end

    def stream?
      @itunes.current_stream_title
    end
end


{'fraction_non_alphanumeric': 0.15301618440411965, 'fraction_numerical': 0.0, 'mean_word_length': 3.473684210526316, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2677581', 'n_tokens_mistral': 728, 'n_tokens_neox': 697, 'n_words': 145}