<commit_before>#
# = hobix/commandline.rb
#
# Hobix command-line weblog system.
#
# Copyright (c) 2003-2004 why the lucky stiff
# Copyright (c) 2005 MenTaLguY
#
# Written & maintained by why the lucky stiff <<EMAIL>>
# Additional bits by MenTaLguY <<EMAIL>>
#
# This program is free software, released under a BSD license.
# See COPYING for details.
#
#--
# $Id$
#++
require 'hobix'
require 'tempfile'

module Hobix
module CommandLine
    ##
    ## Locate RC
    ##
    [
        [ENV['HOME'], ENV['HOME']],
        [ENV['APPDATA'], File.join( ENV['APPDATA'], 'Hobix' )]
    ].each do |home_top, home_dir|
        next unless home_top
        if File.exists? home_top
            File.makedirs( home_dir )
            HOME_DIR = home_dir
            break
        end
    end
    RC = File.join( HOME_DIR, '.hobixrc' )

    def CommandLine.extended( o )
      #
      # When extended we should get all required plugin for the 
      # whole Hobix stuff
      #
      return unless File.exists? RC

      config = YAML::load( File.open( RC ) )
      
      #
      # Add a new instance variable to o
      #
      o.instance_variable_set( :@config, config )

      #
      # Eventually add user specified path
      #
      if config['libs']<commit_msg>Fix to support ruby 1.8.3 - Credits to <NAME><commit_after>#
# = hobix/commandline.rb
#
# Hobix command-line weblog system.
#
# Copyright (c) 2003-2004 why the lucky stiff
# Copyright (c) 2005 MenTaLguY
#
# Written & maintained by why the lucky stiff <<EMAIL>>
# Additional bits by MenTaLguY <<EMAIL>>
#
# This program is free software, released under a BSD license.
# See COPYING for details.
#
#--
# $Id$
#++
require 'hobix'
require 'tempfile'

module Hobix
module CommandLine
    ##
    ## Locate RC
    ##
    [
        [ENV['HOME'], ENV['HOME']],
        [ENV['APPDATA'], File.join( ENV['APPDATA'] || "", 'Hobix' )]
    ].each do |home_top, home_dir|
        next unless home_top
        if File.exists? home_top
            File.makedirs( home_dir )
            HOME_DIR = home_dir
            break
        end
    end
    RC = File.join( HOME_DIR, '.hobixrc' )

    def CommandLine.extended( o )
      #
      # When extended we should get all required plugin for the 
      # whole Hobix stuff
      #
      return unless File.exists? RC

      config = YAML::load( File.open( RC ) )
      
      #
      # Add a new instance variable to o
      #
      o.instance_variable_set( :@config, config )

      #
      # Eventually add user specified path
      #
      if config['libs']
{'fraction_non_alphanumeric': 0.11369000786782062, 'fraction_numerical': 0.010621557828481511, 'mean_word_length': 2.2271573604060912, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '779387', 'n_tokens_mistral': 862, 'n_tokens_neox': 814, 'n_words': 252}