<commit_before>#! /usr/bin/env python3
import moodle2extract.mbz as mbz
import argparse

if __name__ == "__main__":

    parser = argparse.ArgumentParser()
    parser.add_argument("input",metavar="MOODLE BACKUP FILE",help="A .mbz moodle backup file.")
    parser.add_argument("-o",metavar="OUTPUT DIR",help="Output directory. If omitted, files will be extracted to a folder in the current directory")

    args = parser.parse_args()
    m = mbz.MBZ(args.o)

    m.parse_backup(args.input)
    m.extract()
    m.clean()
<commit_msg>Cleaned up code, added description<commit_after>#! /usr/bin/env python3
import moodle2extract.mbz as mbz
import argparse

if __name__ == "__main__":

    parser = argparse.ArgumentParser(description='''A utility to extract files
        from a .mbz Moodle backup file''')
    parser.add_argument("input",
        metavar="MOODLE BACKUP FILE",
        help="A .mbz moodle backup file")
    parser.add_argument("-o",
        metavar="OUTPUT DIR",
        help='''Set output directory. If omitted, files will be extracted to a
            folder in the current directory''')

    args = parser.parse_args()
    m = mbz.MBZ(args.o)

    m.parse_backup(args.input)
    m.extract()
    m.clean()

{'fraction_non_alphanumeric': 0.12121212121212122, 'fraction_numerical': 0.003276003276003276, 'mean_word_length': 3.427536231884058, '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': '1861063', 'n_tokens_mistral': 400, 'n_tokens_neox': 392, 'n_words': 107}