<commit_before>
"""
    RefText Macro

    Generate the pretty printed output from the BIB database
    for a given key.

    @copyright: 2011 <NAME> <<EMAIL>>
    @license: BSD
"""

from MoinMoin import config, wikiutil
import xml.dom.minidom
from subprocess import Popen, PIPE

bib2xml = '/usr/local/bin/bib2xml'
bibfile = '/home/wrigjl/Desktop/reading/reading.bib'

Dependencies = ["time"]

def execute(macro, args):
    request = macro.request
    formatter = macro.formatter
    if not hasattr(request, 'refbibtex_bibdb'):
        request.refbibtex_bibdb = {}
    load_bibdb(request.refbibtex_bibdb)
    return printDocument(request, formatter, request.refbibtex_bibdb, args)

def getText(nodelist):
    rc = []
    for node in nodelist:
        if node.nodeType == node.TEXT_NODE:
            rc.append(node.data)
        return ''.join(rc)

def load_bibdb(bibdb):<commit_msg>Indentation matters... properly cache value<commit_after>
"""
    RefText Macro

    Generate the pretty printed output from the BIB database
    for a given key.

    @copyright: 2011 <NAME> <<EMAIL>>
    @license: BSD
"""

from MoinMoin import config, wikiutil
import xml.dom.minidom
from subprocess import Popen, PIPE

bib2xml = '/usr/local/bin/bib2xml'
bibfile = '/home/wrigjl/Desktop/reading/reading.bib'

Dependencies = ["time"]

def execute(macro, args):
    request = macro.request
    formatter = macro.formatter
    if not hasattr(request, 'refbibtex_bibdb'):
        request.refbibtex_bibdb = {}
        load_bibdb(request.refbibtex_bibdb)
    return printDocument(request, formatter, request.refbibtex_bibdb, args)

def getText(nodelist):
    rc = []
    for node in nodelist:
        if node.nodeType == node.TEXT_NODE:
            rc.append(node.data)
        return ''.join(rc)

def load_bibdb(bibdb):
{'fraction_non_alphanumeric': 0.10845383759733036, 'fraction_numerical': 0.006674082313681869, 'mean_word_length': 3.3878048780487804, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '1613179', 'n_tokens_mistral': 644, 'n_tokens_neox': 579, 'n_words': 149}