<commit_before>#coding=utf-8

from os import path
import os

if __name__ == "__main__":
	# Create a dir invoice if not exists
	root = path.abspath("./")
	directory = path.join(root, "invoices")
	if path.exists(directory):
		if path.isdir(directory):
			print "Directory does already exists, nothing to do"
		else:
			print "A non directory with filename %s does already exists, please rename and try again"%(path.relpath(directory))
	else:
		os.makedirs(directory)
		print "Installation complete"<commit_msg>Added css and logo file copy from swedish<commit_after>#coding=utf-8

from os import path
import os
import shutil

def createDir(directory):
	if path.exists(directory):
		if path.isdir(directory):
			print "Directory does already exists, nothing to do"
		else:
			print "A non directory with filename %s does already exists, please rename and try again"%(path.relpath(directory))
	else:
		os.makedirs(directory)

def copyFile(srcDir, dstDir, filename):
	# Copy CSS file to invoices directory
	src = path.join(srcDir, filename)
	dst = path.join(dstDir, filename)

	if not path.exists(src):
		print "Source file %s does not exist"%(src)
		return

	if path.exists(dst):
		print "Destination file %s does already exist"%(dst)

	shutil.copyfile(src, dst)

if __name__ == "__main__":
	# Create a dir invoice if not exists
	root = path.abspath("./")
	dstDirName = "invoices"
	dstDir = path.join(root, dstDirName)
	createDir(dstDir)

	srcDir = path.join(root, "swedish")
	cssfile = "invoice_style.css"
	logofile = "logo.png"
	copyFile(srcDir, dstDir, cssfile)
	copyFile(srcDir, dstDir, logofile)
	print "Installation complete"
{'fraction_non_alphanumeric': 0.1100861008610086, 'fraction_numerical': 0.0012300123001230013, 'mean_word_length': 4.790035587188612, 'pattern_counts': {'":': 2, '<': 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': '7073099', 'n_tokens_mistral': 567, 'n_tokens_neox': 542, 'n_words': 174}