<commit_before>#!/usr/bin/env ruby
# -*- encoding: utf-8 -*-
#
# File: trakt.rb
#
# Copyright rejuvyesh <<EMAIL>>, 2013

require "traktr"
require "yaml"
require "rmpv/version"

module Rmpv
  class Trakt

    ##
    # Initialize the trakt client
    
    def initialize
      traktconfig = YAML.load File.open("#{Dir.home}/.rmpvrc")
      @trakt = Traktr::Client.new(traktconfig["trakt"]["api_key"], traktconfig["trakt"]["username"], traktconfig["trakt"]["password"], true)
    end

    ##
    # Set as watching

    def watching show, progress, type='show'
      tries = 5<commit_msg>no longer ask for api key<commit_after>#!/usr/bin/env ruby
# -*- encoding: utf-8 -*-
#
# File: trakt.rb
#
# Copyright rejuvyesh <<EMAIL>>, 2013

require "traktr"
require "yaml"
require "rmpv/version"

module Rmpv
  class Trakt

    ##
    # Initialize the trakt client
    TRAKTAPIKEY = "<KEY>"
    
    def initialize
      traktconfig = YAML.load File.open("#{Dir.home}/.rmpvrc")
      @trakt = Traktr::Client.new(TRAKTAPIKEY, traktconfig["trakt"]["username"], traktconfig["trakt"]["password"], true)
    end

    ##
    # Set as watching

    def watching show, progress, type='show'
      tries = 5
{'fraction_non_alphanumeric': 0.15598650927487354, 'fraction_numerical': 0.01011804384485666, 'mean_word_length': 3.2851985559566788, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '7274202', 'n_tokens_mistral': 435, 'n_tokens_neox': 417, 'n_words': 96}