Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(18) | Call(6) | Derive(11) | Import(1)
src/f/t/ftw.pdfgenerator-1.3.0/ftw/pdfgenerator/tests/test_html2latex_subconverters.py ftw.pdfgenerator(Download)
from ftw.pdfgenerator.html2latex.converter import HTML2LatexConverter from ftw.pdfgenerator.html2latex.subconverter import SubConverter from ftw.pdfgenerator.interfaces import ISubConverter from ftw.testing import MockTestCase from zope.interface.verify import verifyClass
html = object() obj = SubConverter(converter=converter, match=match, html=html) self.assertEqual(obj.converter, converter) self.assertEqual(obj.match, match) self.assertEqual(obj.fullhtml, html) def test_call_not_implemented(self): converter = match = html = object() obj = SubConverter(converter, match, html)
with self.assertRaises(NotImplementedError): obj() def test_get_html_returns_matched_html(self): html = 'one three five' match = re.search('t[\w]*', html) obj = SubConverter(object(), match, html)
src/f/t/ftw.pdfgenerator-1.3.0/ftw/pdfgenerator/html2latex/subconverters/textformatting.py ftw.pdfgenerator(Download)
class Textformatting(subconverter.SubConverter): """ This converter fixes newlines within text formatting commands: "\textbf{*\n\n*}" is not allowed, use "\textbf{*\\*}" "\textit{*\n\n*}" is not allowed, use "\textit{*\\*}"
src/f/t/ftw.pdfgenerator-1.3.0/ftw/pdfgenerator/html2latex/subconverters/table.py ftw.pdfgenerator(Download)
class TableConverter(subconverter.SubConverter): """The TableConverter converts <table>-Tags to latex. """ pattern = r'<table(.*?)>(.*?)</table>'
src/f/t/ftw.pdfgenerator-1.3.0/ftw/pdfgenerator/html2latex/subconverters/listing.py ftw.pdfgenerator(Download)
class ListConverter(subconverter.SubConverter): """ The ListConverter converts <ul> and <ol> lists into latex' itemize- and enumerate-environments. """
src/f/t/ftw.pdfgenerator-1.3.0/ftw/pdfgenerator/html2latex/subconverters/hyperlink.py ftw.pdfgenerator(Download)
class HyperlinkConverter(subconverter.SubConverter): pattern = r'<a.*?href="(.*?)".*?>(.*?)</a>' def __call__(self):
src/f/t/ftw.pdfgenerator-1.3.0/ftw/pdfgenerator/html2latex/subconverters/htmlentities.py ftw.pdfgenerator(Download)
class HtmlentitiesConverter(subconverter.SubConverter): pattern = r'\\&(\w*);' placeholder = interfaces.HTML2LATEX_CUSTOM_PATTERN_PLACEHOLDER_BOTTOM
src/f/t/ftw.book-2.2.20/ftw/book/latex/highlight_subconverter.py ftw.book(Download)
class VisualHighlightSubconverter(subconverter.SubConverter, MakoTemplating): r"""Converts span tags with plones "visualHighlight" class to a \hl tag (requires soulutf8 package) which highlights the text in the PDF too. """
src/f/t/ftw.pdfgenerator-1.3.0/ftw/pdfgenerator/tests/test_html2latex_converter.py ftw.pdfgenerator(Download)
class Foo(subconverter.SubConverter): pattern = 'foo' placeholder = DEFAULT_PLACEHOLDER def __call__(self):
class Foo(subconverter.SubConverter): pattern = 'foo' placeholder = DEFAULT_PLACEHOLDER def __call__(self):
class MyConverter(subconverter.SubConverter): pattern = 'bar' def __call__(self): self.replace(r'\textbf{replaced}')