Пример #1
0
    def __init__(self, parser, configs, md):
        Treeprocessor.__init__(self, parser)

        self.configs = configs

        self.processors = (FigureParser(configs["IGNORING_IMG"]),
                           EquationParser(), CodeParser(md), TableParser(),
                           VideoParser(), QuoteParser())
Пример #2
0
    def __init__(self, parser, configs, md):
        Treeprocessor.__init__(self, parser)

        self.configs = configs

        self.processors = ( FigureParser(configs["IGNORING_IMG"]),
                            EquationParser(),
                            CodeParser(md),
                            TableParser(),
                            VideoParser(),
                            QuoteParser())
Пример #3
0
    def __init__(self, md, base_url, base_user_url, labels):
        """Initialize."""

        self.base = base_url
        self.base_user = base_user_url
        self.repo_labels = labels
        self.labels = {
            "github": "GitHub",
            "bitbucket": "Bitbucket",
            "gitlab": "GitLab"
        }
        Treeprocessor.__init__(self, md)
Пример #4
0
    def __init__(self, md, base_url, base_user_url, labels):
        """Initialize."""

        self.base = base_url
        self.base_user = base_user_url
        self.repo_labels = labels
        self.labels = {
            "github": "GitHub",
            "bitbucket": "Bitbucket",
            "gitlab": "GitLab"
        }
        Treeprocessor.__init__(self, md)
Пример #5
0
    def __init__(self, md, base_url, base_user_url, labels, repo_shortner,
                 social_shortener, excludes):
        """Initialize."""

        self.base = base_url
        self.repo_shortner = repo_shortner
        self.social_shortener = social_shortener
        self.base_user = base_user_url
        self.repo_labels = labels
        self.labels = {
            "github": "GitHub",
            "bitbucket": "Bitbucket",
            "gitlab": "GitLab"
        }
        self.excludes = excludes
        Treeprocessor.__init__(self, md)
Пример #6
0
 def __init__(self, md):
     Treeprocessor.__init__(self, md)
     self.re = re.compile(r'^!.*')
Пример #7
0
 def __init__(self, md):
     Treeprocessor.__init__(self, md)
     self.rx = re.compile(r"([/\w]+)(\%s)((?:\#[\w-]*)?)$" % config.PAGES_FILE_EXT)
Пример #8
0
 def __init__(self, md, course, commit_sha):
     Treeprocessor.__init__(self)
     self.md = md
     self.course = course
     self.commit_sha = commit_sha
Пример #9
0
 def __init__(self, section_cls='section', heading_cls='title'):
     self.section_cls = section_cls
     self.heading_cls = heading_cls
     Treeprocessor.__init__(self)
Пример #10
0
 def __init__(self, md, item_sourcedir, item_outdir, course_structure):
     Treeprocessor.__init__(self, md)
     self._item_sourcedir = Path(item_sourcedir)
     self._item_outdir = Path(item_outdir)
     self._structure = course_structure
     self.file_id = 0
Пример #11
0
 def __init__(self, md, figure_classes=None, img_classes=None):
     Treeprocessor.__init__(self, md)
     self._figure_classes = figure_classes
     self._img_classes = img_classes
Пример #12
0
 def __init__(self, md, group=True):
     Treeprocessor.__init__(self, md)
     self.group_re = re.compile(GROUP_RE)
     self.hidden_re = re.compile(HIDDEN_RE)
     self.group = group
 def __init__(self, md):
     Treeprocessor.__init__(self, md)
     self.re = re.compile(r'^!.*')
 def __init__(self, markdown_instance=None):
     Treeprocessor.__init__(self, markdown_instance=markdown_instance)
     self.tree = None
Пример #15
0
 def __init__(self, step):
     Treeprocessor.__init__(self)
     self.step = step
     self.expr = re.compile("h(\d)")
Пример #16
0
 def __init__(self, step):
     Treeprocessor.__init__(self)
     self.step = step
     self.expr = re.compile('h(\d)')
Пример #17
0
 def __init__(self, blog_url, image_url, *args, **kwargs):
     Treeprocessor.__init__(self, *args, **kwargs)
     self.blog_url = blog_url
     self.image_url = image_url
Пример #18
0
 def __init__(self, md, group = True):
     Treeprocessor.__init__(self, md)
     self.group_re = re.compile(GROUP_RE)
     self.hidden_re = re.compile(HIDDEN_RE)
     self.group = group
Пример #19
0
 def __init__(self, md, item_sourcedir, item_outdir):
     Treeprocessor.__init__(self, md)
     self._item_sourcedir = Path(item_sourcedir)
     self._item_outdir = Path(item_outdir)
     self.image_id = 0
Пример #20
0
 def __init__(self, markdown_instance, static_dir):
     self.static_dir = static_dir
     Treeprocessor.__init__(self, markdown_instance)
Пример #21
0
 def __init__(self, section_cls='section', heading_cls='title'):
     self.section_cls = section_cls
     self.heading_cls = heading_cls
     Treeprocessor.__init__(self)
Пример #22
0
 def __init__(self, md, course, commit_sha, reverse_func):
     Treeprocessor.__init__(self)
     self.md = md
     self.course = course
     self.commit_sha = commit_sha
     self.reverse_func = reverse_func
Пример #23
0
 def __init__(self, md):
     self.headings = []
     Treeprocessor.__init__(self, md)
Пример #24
0
 def __init__(self, *args, **kwargs):
     Treeprocessor.__init__(self, *args, **kwargs)
     self.last_item = None
     self.items = []
Пример #25
0
 def __init__(self, metadataextension, *args, **kwargs):
     Treeprocessor.__init__(self, *args, **kwargs)
     self.metadataextension = metadataextension
Пример #26
0
 def __init__(self, md, course, commit_sha, reverse_func):
     Treeprocessor.__init__(self)
     self.md = md
     self.course = course
     self.commit_sha = commit_sha
     self.reverse_func = reverse_func
Пример #27
0
 def __init__(self, markdown_instance, static_dir):
     self.static_dir = static_dir
     Treeprocessor.__init__(self, markdown_instance)