$search

wikidot::fixurl::FixURL Class Reference

Inheritance diagram for wikidot::fixurl::FixURL:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __fix_link__
def __init__
def __is_link_local__
def __is_link_toc__
def get_local_links
def get_remote_links
def handle_starttag
def reset

Public Attributes

 local_links
 local_set
 remote_host
 remote_set

Detailed Description

Fix HTML links (as well as images), so they point to
the local files. If a local file is not available, the full
link to the remote file is built.

The list of available local files is given at initialization.

Definition at line 30 of file fixurl.py.


Member Function Documentation

def wikidot::fixurl::FixURL::__fix_link__ (   self,
  link 
)
Private - Take a link and convert it,
either as a local link, either as a link pointing
to the remote host.

Definition at line 82 of file fixurl.py.

def wikidot::fixurl::FixURL::__init__ (   self,
  links,
  host 
)
Initialization.

links: set of available local files
host: full path to remote host

Definition at line 37 of file fixurl.py.

def wikidot::fixurl::FixURL::__is_link_local__ (   self,
  link 
)
Private - Tell if a link match a local file.

Output:
    True if a local file match the link
    False otherwise

Definition at line 60 of file fixurl.py.

def wikidot::fixurl::FixURL::__is_link_toc__ (   self,
  link 
)
Private - Tell if the link is part of the Table of Content.

Output:
    True if the link is of the form #tocXYZ
    False otherwise

Definition at line 71 of file fixurl.py.

def wikidot::fixurl::FixURL::get_local_links (   self  ) 

Definition at line 53 of file fixurl.py.

def wikidot::fixurl::FixURL::get_remote_links (   self  ) 

Definition at line 56 of file fixurl.py.

def wikidot::fixurl::FixURL::handle_starttag (   self,
  tag,
  attrs 
)
Overidden - Parse links and convert them.

<a> and <img> tags are looked for links.

Reimplemented from wikidot::myparser::MyParser.

Definition at line 102 of file fixurl.py.

def wikidot::fixurl::FixURL::reset (   self  ) 
Reset the parser's state

Reimplemented from wikidot::myparser::MyParser.

Definition at line 47 of file fixurl.py.


Member Data Documentation

Definition at line 43 of file fixurl.py.

Definition at line 49 of file fixurl.py.

Definition at line 44 of file fixurl.py.

Definition at line 50 of file fixurl.py.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


aseba
Author(s): Stéphane Magnenat
autogenerated on Sat Mar 2 12:31:57 2013