# 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
        if this_lazy_load_size is not None:
            # parse size in WIDTHxHEIGHT format (px)
            try:
                width, height = map(int, this_lazy_load_size.split('x'))
            except ValueError:
                Exception(
                    'Invalid "__this_lazy_load_size" value %s' %
                    this_lazy_load_size)
            return (width, height)
        return this_lazy_load_size

    def _make_page(self, elem):
        res = '%s.md' % os.path.join(*elem.path)
        filename = os.path.join(self.docs_dir, res)
        dirname = os.path.dirname(filename)
        if dirname:
            mkdir_p(dirname)
        kwargs = {}
        this_kwargs = {}
        lazy_load_size = self._get_lazy_load_size(elem)
        this_lazy_load_size = self._get_this_lazy_load_size(elem)
        if lazy_load_size is not None:
            kwargs['lazy_load_size'] = lazy_load_size
        if this_lazy_load_size is not None:
            this_kwargs['lazy_load_size'] = this_lazy_load_size
        buf = []
        with open(filename, 'w') as f:
            buf.append(self._make_title(elem))
            buf.append(self._make_attrs(elem, **this_kwargs))
            buf.append(self._make_nodes(elem, **kwargs))

# 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

        if this_lazy_load_size is not None:
            # parse size in WIDTHxHEIGHT format (px)
            try:
                width, height = map(int, this_lazy_load_size.split('x'))
            except ValueError:
                Exception(
                    'Invalid "__this_lazy_load_size" value %s' %
                    this_lazy_load_size)
            return (width, height)
        return this_lazy_load_size

    def _make_page(self, elem):
        res = '%s.md' % os.path.join(*elem.path)
        filename = os.path.join(self.docs_dir, res)
        dirname = os.path.dirname(filename)
        if dirname:
            mkdir_p(dirname)
        kwargs = {}
        this_kwargs = {}
        lazy_load_size = self._get_lazy_load_size(elem)
        this_lazy_load_size = self._get_this_lazy_load_size(elem)
        if lazy_load_size is not None:
            kwargs['lazy_load_size'] = lazy_load_size
        if this_lazy_load_size is not None:
            this_kwargs['lazy_load_size'] = this_lazy_load_size
        buf = []
        with open(filename, 'w') as f:
            buf.append(self._make_title(elem))
            buf.append(self._make_attrs(elem, **this_kwargs))
            buf.append(self._make_nodes(elem, **kwargs))

            f.write(utf8_encode('\n'.join(buf)))