<commit_before>#!/usr/bin/env python
#-*- coding: utf-8 -*-
import os
import sys
import shutil
import codecs
import datetime
import argparse
from jinja2 import Template
from markdown import Markdown

SOURCE_PATH = os.path.abspath(os.path.join('.', 'stardrifter'))
BUILD_PATH = os.path.abspath(os.path.join('.', 'build'))

now = datetime.datetime.now()


class MarkdownReader(object):
    "Reader for markdown documents"
    file_extensions = ['md', 'markdown', 'mkd']
    extensions = ['extra', 'meta', 'tables', 'toc']

    def _parse_metadata(self, meta):
        """Return the dict containing document metadata"""<commit_msg>integrate it into the extensions<commit_after>#!/usr/bin/env python
#-*- coding: utf-8 -*-
import os
import sys
import shutil
import codecs
import datetime
import argparse
from jinja2 import Template
from markdown import Markdown

SOURCE_PATH = os.path.abspath(os.path.join('.', 'stardrifter'))
BUILD_PATH = os.path.abspath(os.path.join('.', 'build'))

now = datetime.datetime.now()


class MarkdownReader(object):
    "Reader for markdown documents"
    file_extensions = ['md', 'markdown', 'mkd']
    extensions = ['extra', 'meta', 'tables', 'toc', 'admonition']

    def _parse_metadata(self, meta):
        """Return the dict containing document metadata"""
{'fraction_non_alphanumeric': 0.14507370054305663, 'fraction_numerical': 0.0031031807602792862, 'mean_word_length': 4.657894736842105, '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': '150257', 'n_tokens_mistral': 409, 'n_tokens_neox': 396, 'n_words': 116}