class documentation

class WWWLinker(ExportLinker): (source)

View In Hierarchy

Implements a linker that returns the correct links for the way the server handles URLs.
Method __init__ No summary
Method file_object Turn a File object in a relative link or URI
Method icon Undocumented
Method page_object Turn a Path object in a relative link or URI
Method resolve_source_file No summary
Method resource Return an url for template resources

Inherited from ExportLinker:

Method img Returns an url for image file 'src'
Method link Returns an url for a link in a zim page This method is used to translate links of any type.
Method resolve_dest_file Find the destination file for an attachment @returns: a File object
Instance Variable base Undocumented
Instance Variable document_root_url Undocumented
Instance Variable layout Undocumented
Instance Variable notebook Undocumented
Instance Variable output Undocumented
Instance Variable source Undocumented
Instance Variable usebase Undocumented
Method _link_file Undocumented
Method _link_interwiki Undocumented
Method _link_mailto Undocumented
Method _link_notebook Undocumented
Method _link_page Undocumented
Method _resolve_file Undocumented
def __init__(self, notebook, resources_dir=None, source=None): (source)
Contructor
Parameters
notebookthe source Notebook for resolving links
resources_dirUndocumented
sourceis the Path of the source page being exported
layoutthe ExportLayout for resolving target files
outputis a File object for the destination file
usebaseif True the format allows returning relative paths
document_root_urloptional URL for the document root
def file_object(self, file): (source)
Turn a File object in a relative link or URI
def icon(self, name): (source)

Undocumented

def page_object(self, path): (source)
Turn a Path object in a relative link or URI
def resolve_source_file(self, link): (source)
Find the source file for an attachment Used e.g. by the latex format to find files for equations to be inlined. Do not use this method to resolve links, the file given here might be temporary and is not guaranteed to be available after the export.
Returns
a File object or None if no file was found
def resource(self, path): (source)
Return an url for template resources