# Path: momo/utils.py
# MIN_PAGE_LINES = 50
# PY3 = sys.version_info[0] == 3
# def eval_path(path):
# def smart_print(*args, **kwargs):
# def utf8_decode(s):
# def utf8_encode(s):
# def run_cmd(cmd_str=None, cmd=None, cmd_args=None, stdout=sys.stdout,
#             stderr=sys.stderr, stdin=None):
# def open_default(path):
# def mkdir_p(path):
# def page_lines(lines):
# 
# Path: momo/plugins/base.py
# class Plugin(object):
#     def __init__(self):
#         self.settings = settings
# 
#     def setup(self):
#         """Initializae the plugin"""
#         raise NotImplementedError
# 
#     def run(self, extra_args=None):
#         """Run the plugin
# 
#         :param extra_args: a list of command-line arguments to pass to the
#             underlying plugin.
#         """
#         raise NotImplementedError


import os
import shutil
import yaml
import glob
from momo.utils import run_cmd, mkdir_p, utf8_encode, txt_type, eval_path
from momo.plugins.base import Plugin

    def _make_title(self, elem):
        return '# %s' % elem.name

    def _filter_control_attrs(self, attrs):
        if not self.momo_configs['momo_control_attr']:
            return filter(lambda x: not x.name.startswith('__'), attrs)
        return attrs

    def _make_attrs(self, elem, **kwargs):
        buf = []
        if self.momo_configs['momo_attr_css']:
            name_fmt = ('<span class="momo-attr-name '
                        'momo-attr-name-{name}">'
                        '{name}</span>')
        else:
            name_fmt = '{name}'
        if self.momo_configs['momo_attr_css']:
            content_fmt = ('<span class="momo-attr-content '
                           'momo-attr-content-{name}">'
                           '{content}</span>')
        else:
            content_fmt = '{content}'
        if self.momo_configs['momo_attr_table']:
            if elem.attr_svals:
                buf.append('')
                buf.append('|')
                buf.append('- | -')
            for attr in self._filter_control_attrs(elem.attr_svals):
                buf.append(

# Path: momo/utils.py
# MIN_PAGE_LINES = 50
# PY3 = sys.version_info[0] == 3
# def eval_path(path):
# def smart_print(*args, **kwargs):
# def utf8_decode(s):
# def utf8_encode(s):
# def run_cmd(cmd_str=None, cmd=None, cmd_args=None, stdout=sys.stdout,
#             stderr=sys.stderr, stdin=None):
# def open_default(path):
# def mkdir_p(path):
# def page_lines(lines):
# 
# Path: momo/plugins/base.py
# class Plugin(object):
#     def __init__(self):
#         self.settings = settings
# 
#     def setup(self):
#         """Initializae the plugin"""
#         raise NotImplementedError
# 
#     def run(self, extra_args=None):
#         """Run the plugin
# 
#         :param extra_args: a list of command-line arguments to pass to the
#             underlying plugin.
#         """
#         raise NotImplementedError


# Path: momo/plugins/mkdocs.py
import os
import shutil
import yaml
import glob
from momo.utils import run_cmd, mkdir_p, utf8_encode, txt_type, eval_path
from momo.plugins.base import Plugin


    def _make_title(self, elem):
        return '# %s' % elem.name

    def _filter_control_attrs(self, attrs):
        if not self.momo_configs['momo_control_attr']:
            return filter(lambda x: not x.name.startswith('__'), attrs)
        return attrs

    def _make_attrs(self, elem, **kwargs):
        buf = []
        if self.momo_configs['momo_attr_css']:
            name_fmt = ('<span class="momo-attr-name '
                        'momo-attr-name-{name}">'
                        '{name}</span>')
        else:
            name_fmt = '{name}'
        if self.momo_configs['momo_attr_css']:
            content_fmt = ('<span class="momo-attr-content '
                           'momo-attr-content-{name}">'
                           '{content}</span>')
        else:
            content_fmt = '{content}'
        if self.momo_configs['momo_attr_table']:
            if elem.attr_svals:
                buf.append('')
                buf.append('|')
                buf.append('- | -')
            for attr in self._filter_control_attrs(elem.attr_svals):
                buf.append(

                    txt_type(name_fmt + ' | ' + content_fmt).format(