Public Member Functions | Public Attributes
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.


Constructor & Destructor Documentation

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.


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.__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.

Definition at line 53 of file fixurl.py.

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.

Reset the parser's state

Reimplemented from wikidot.myparser.MyParser.

Definition at line 47 of file fixurl.py.


Member Data Documentation

Definition at line 40 of file fixurl.py.

Definition at line 47 of file fixurl.py.

Definition at line 40 of file fixurl.py.

Definition at line 47 of file fixurl.py.


The documentation for this class was generated from the following file:


aseba
Author(s): Stéphane Magnenat
autogenerated on Sun Oct 5 2014 23:46:40