<commit_before>class SeimtraThor < Thor

	# = Generator
	#
	# Create the scaffold for module
	#
	# == Arguments
	#
	# argv, 		table name, field1, field2, field3 ...
	#
	# == Options
	#
	# --to, -t		specify a module for this operation
	#
	# == Examples 
	#
	# 3s g table_name field1 field2 field3
	#

	desc "generate [TABLE_NAME] [FIELDS]", "Generate a scaffold for module"
	method_option :to, :type => :string, :aliases => '-t'
	map 'g' => :generate
	def generate *argv

		if argv.length > 2
			module_name = options[:to] ? options[:to] : get_module
			file_name	= argv.shift

			files 		= {
				"tmp/route.app"	=> "modules/#{module_name}/#{Sbase::Folders[:app]}/#{file_name}.rb",
				"tmp/view.tpl"	=> "modules/#{module_name}/#{Sbase::Folders[:tpl]}/#{file_name}.slim",
				"tmp/form.tpl"	=> "modules/#{module_name}/#{Sbase::Folders[:tpl]}/#{file_name}_form.slim"
			}

			files.each do | source, target |
				template(source, target) unless File.exist?(target)
			end
 		else
			error 'At least two more arguments.'
		end

	end

end<commit_msg>update the generate task, supply the new features, allow one to generate the route, view, form<commit_after>class SeimtraThor < Thor

	# = Generator
	#
	# Create the scaffold for module
	#
	# == Arguments
	#
	# argv, 		table name, field1, field2, field3 ...
	#
	# == Options
	#
	# --to, -t		specify a module for this operation
	#
	# == Examples 
	#
	# create a scaffold
	#
	#	3s g table_name field1 field2 field3 -rvf
	#

	desc "generate [TABLE_NAME] [FIELDS]", "Generate a scaffold for module"
	method_option :to, :type => :string, :aliases => '-t'
	method_option :route, :type => :boolean, :aliases => '-r'
	method_option :view, :type => :boolean, :aliases => '-v'
	method_option :form, :type => :boolean, :aliases => '-f'
	map 'g' => :generate
	def generate *argv

		if argv.length > 2
			module_name = options[:to] ? options[:to] : get_module
			file_name	= argv.shift

			files 				= {}
			files["route.app"] 	= "#{Sbase::Folders[:app]}/#{file_name}.rb" if options.route?
			files["view.tpl"] 	= "#{Sbase::Folders[:tpl]}/#{module_name}_#{file_name}.slim" if options.view?
			files["form.tpl"] 	= "#{Sbase::Folders[:tpl]}/#{module_name}_#{file_name}_form.slim" if options.form?

			files.each do | source, target |
				source = "tmp/#{source}"
				target = "modules/#{module_name}/#{target}"
				template(source, target) unless File.exist?(target)
			end
 		else
			error 'At least two more arguments.'
		end

	end

end
{'fraction_non_alphanumeric': 0.16646415552855406, 'fraction_numerical': 0.0064803564196030785, 'mean_word_length': 3.6082089552238807, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 20, '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': '3368899', 'n_tokens_mistral': 1000, 'n_tokens_neox': 930, 'n_words': 222}