<commit_before>"""
Parse pdflatex output for paper count, and store in a .ini file.
"""

import sys

import re

regexp = re.compile('Output written on paper.pdf \((\d+) pages')

f = open('paper_stats.ini', 'w')

line = ''
for line in sys.stdin:
    m = regexp.match(line)
    if m:<commit_msg>Consistently store configurations in .cfg files, not .ini.<commit_after>"""
Parse pdflatex output for paper count, and store in a .ini file.
"""

import sys

import re

regexp = re.compile('Output written on paper.pdf \((\d+) pages')

f = open('paper_stats.cfg', 'w')

line = ''
for line in sys.stdin:
    m = regexp.match(line)
    if m:
{'fraction_non_alphanumeric': 0.14580031695721077, 'fraction_numerical': 0.0, 'mean_word_length': 3.613138686131387, 'pattern_counts': {'":': 0, '<': 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': '883877', 'n_tokens_mistral': 223, 'n_tokens_neox': 220, 'n_words': 78}