<commit_before>require 'awestruct/engine'

module Awestruct
  module CLI
    class Generate

      def initialize(config, profile=nil, base_url=nil, default_base_url='http://localhost:4242', force=false)
        @profile          = profile
        @base_url         = base_url
        @default_base_url = default_base_url
        @force            = force
        @engine           = Awestruct::Engine.new( config )
      end

      def run()
        begin
          puts "Generating site"
          @engine.run( @profile, @base_url, @profile['base_url'] || @default_base_url, @force )
        rescue =>e
          puts e
          puts e.backtrace
        end
      end
    end
  end
end
<commit_msg>Don't fail if there's no profile.<commit_after>require 'awestruct/engine'

module Awestruct
  module CLI
    class Generate

      def initialize(config, profile=nil, base_url=nil, default_base_url='http://localhost:4242', force=false)
        @profile          = profile
        @base_url         = base_url
        @default_base_url = default_base_url
        @force            = force
        @engine           = Awestruct::Engine.new( config )
      end

      def run()
        begin
          puts "Generating site"
          @engine.run( @profile, @base_url, ( @profile ? @profile['base_url'] : @default_base_url ), @force )
        rescue =>e
          puts e
          puts e.backtrace
        end
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.0905292479108635, 'fraction_numerical': 0.005571030640668524, 'mean_word_length': 1.8797595190380763, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '750200', 'n_tokens_mistral': 428, 'n_tokens_neox': 423, 'n_words': 104}