Exemplo n.º 1
0
def convert_reference(node, context):
    refuri = node.get("refuri")
    text = node.astext()

    link = odf_create_link(refuri)
    link.set_text(text)
    context['top'].append(link)
Exemplo n.º 2
0
def convert_reference(node, context):
    refuri = node.get("refuri")
    text = node.astext()

    link = odf_create_link(refuri)
    link.set_text(text)
    context['top'].append(link)
Exemplo n.º 3
0
    def set_link(self, match, tail, url, regex=None, offset=None, length=0):
        """
        set_link(url, regex=None, offset=None, length=0)
        Make a link to the provided url from text content matching the regex
        OR the positional arguments offset and length.

        (match, tail: provided by decorator)

        Arguments:


            url -- unicode

            regex -- unicode regular expression

            offset -- int

            length -- int
        """
        link = odf_create_link(url, text=match)
        link.set_tail(tail)
        return link
Exemplo n.º 4
0
    def set_link(self, match, tail, url, regex=None, offset=None, length=0):
        """
        set_link(url, regex=None, offset=None, length=0)
        Make a link to the provided url from text content matching the regex
        OR the positional arguments offset and length.

        (match, tail: provided by decorator)

        Arguments:


            url -- unicode

            regex -- unicode regular expression

            offset -- int

            length -- int
        """
        link = odf_create_link(url, text=match)
        link.set_tail(tail)
        return link