<commit_before># Simple Python script to generate the full .schema.xml files

import os
import sys
import argparse

from replace import replace_multi

def main(argv):
    parser = argparse.ArgumentParser(description='Generate Utility Scripts')
    parser.add_argument('-t', '--type', help='Script Type (glib-mkenums or gdbus-codegen)', required=True)
    parser.add_argument('--version', help='Package Version', required=True)
    args = parser.parse_args()

    replace_items = {'@PYTHON@': 'python',
                     '@PERL_PATH@': 'perl',
                     '@GLIB_VERSION@': args.version}

    if args.type == 'glib-mkenums':
        replace_multi('../gobject/glib-mkenums.in',
                      '../gobject/glib-mkenums',
                      replace_items)
    elif args.type == 'gdbus-codegen':
        replace_multi('../gio/gdbus-2.0/codegen/gdbus-codegen.in',
                      '../gio/gdbus-2.0/codegen/gdbus-codegen',
                      replace_items)

    else:
        raise ValueError('Type must be glib-mkenums or gdbus-codegen')

if __name__ == '__main__':
    sys.exit(main(sys.argv))<commit_msg>win32/gen_util_scripts.py: Make it path agnostic<commit_after># Simple Python script to generate the full .schema.xml files

import os
import sys
import argparse

from replace import replace_multi

def main(argv):
    srcroot = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..')
    parser = argparse.ArgumentParser(description='Generate Utility Scripts')
    parser.add_argument('-t', '--type', help='Script Type (glib-mkenums or gdbus-codegen)', required=True)
    parser.add_argument('--version', help='Package Version', required=True)
    args = parser.parse_args()

    replace_items = {'@PYTHON@': 'python',
                     '@PERL_PATH@': 'perl',
                     '@GLIB_VERSION@': args.version}

    if args.type == 'glib-mkenums':
        replace_multi(srcroot + '/gobject/glib-mkenums.in',
                      srcroot + '/gobject/glib-mkenums',
                      replace_items)
    elif args.type == 'gdbus-codegen':
        replace_multi(srcroot + '/gio/gdbus-2.0/codegen/gdbus-codegen.in',
                      srcroot + '/gio/gdbus-2.0/codegen/gdbus-codegen',
                      replace_items)

    else:
        raise ValueError('Type must be glib-mkenums or gdbus-codegen')

if __name__ == '__main__':
    sys.exit(main(sys.argv))
{'fraction_non_alphanumeric': 0.13757273482959267, 'fraction_numerical': 0.004156275976724855, 'mean_word_length': 2.5765230312035663, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6406481', 'n_tokens_mistral': 767, 'n_tokens_neox': 765, 'n_words': 151}