<commit_before>import clr, sys
clr.AddReference("Microsoft.Build")
clr.AddReference("Microsoft.Build.Framework")
import Microsoft.Build.Evaluation
import System

def main(project):
    collection = Microsoft.Build.Evaluation.ProjectCollection();
    collection.DefaultToolsVersion = "4.0"
    project = collection.LoadProject(project);

    includes = ''
    libs = ''
    defines = ''
    outdir = project.GetPropertyValue('OutDir')
    intdir = project.GetPropertyValue('IntDir')
    for y in project.ItemDefinitions:
        if y.ItemType == "ClCompile":
            includes = y.GetMetadataValue("AdditionalIncludeDirectories")            
            defines = y.GetMetadataValue("PreprocessorDefinitions")
        if y.ItemType == "Link":
            libs = y.GetMetadataValue("AdditionalDependencies")        

    print "msbuild_ext.visual_studio("
    print "\tproject = \"\","
    print "\tfiles = ["            
    for x in project.GetItems("ClCompile"):
        print "\t\t'" + x.EvaluatedInclude + "',"
    print "\t],"

    print "\tincludes = ["            
    for y in includes.split(';'):
        print "\t\t'" + y + "',"
    print "\t],"

    print "\tlibs = ["            
    for y in libs.split(';'):
        print "\t\t'" + y + "',"
    print "\t],"    

    print "\tname = 'new',"
    print "\tdefines = ["            
    for y in defines.split(';'):
        print "\t\t'" + y + "',"
    print "\t],"  
    print "\toutdir = r'%s'," % outdir
    print "\tintdir = r'%s'" % intdir
    print ")"

if __name__ == '__main__':
    main(sys.argv[1])

<commit_msg>Update convert_project.py<commit_after>import clr, sys
clr.AddReference("Microsoft.Build")
clr.AddReference("Microsoft.Build.Framework")
import Microsoft.Build.Evaluation
import System

def main(project):
    collection = Microsoft.Build.Evaluation.ProjectCollection();
    collection.DefaultToolsVersion = "4.0"
    project = collection.LoadProject(project);

    includes = ''
    libs = ''
    defines = ''
    outdir = project.GetPropertyValue('OutDir')
    intdir = project.GetPropertyValue('IntDir')
    for y in project.ItemDefinitions:
        if y.ItemType == "ClCompile":
            includes = y.GetMetadataValue("AdditionalIncludeDirectories")            
            defines = y.GetMetadataValue("PreprocessorDefinitions")
        if y.ItemType == "Link":
            libs = y.GetMetadataValue("AdditionalDependencies")        

    print "msbuild_ext.visual_studio("
    print "\tproject = \"\","
    print "\tfiles = ["            
    for x in project.GetItems("ClCompile"):
        print "\t\t'" + x.EvaluatedInclude.replace("\\","/") + "',"
    print "\t],"

    print "\tincludes = ["            
    for y in includes.split(';'):
        print "\t\t'" + y.replace("\\","/") + "',"
    print "\t],"

    print "\tlibs = ["            
    for y in libs.split(';'):
        print "\t\t'" + y.replace("\\","/") + "',"
    print "\t],"    

    print "\tname = 'new',"
    print "\tdefines = ["            
    for y in defines.split(';'):
        print "\t\t'" + y + "',"
    print "\t],"  
    print "\toutdir = r'%s'," % outdir.replace("\\","/")
    print "\tintdir = r'%s'" % intdir.replace("\\","/")
    print ")"

if __name__ == '__main__':
    main(sys.argv[1])


{'fraction_non_alphanumeric': 0.1724770642201835, 'fraction_numerical': 0.001834862385321101, 'mean_word_length': 2.348004094165814, 'pattern_counts': {'":': 4, '<': 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': '5739210', 'n_tokens_mistral': 1041, 'n_tokens_neox': 997, 'n_words': 209}