Logo Search packages:      
Sourcecode: uicilibris version File versions  Download package

def uicilibris::wikiParser::wikiParser::__init__ (   self,
  args,
  isatty = True,
  isUrl = False,
  report = False 
)
The constructor
@param args a list of filenames, or a single URL.
When a single URL, it is meant to be the address of a wikimedia
page which contains a series of other addresses of the same
mediawiki in mediawiki syntax.
@param isatty is True when data do not come from the standard input
@param isUrl is True to force the initialization, by considering arg as a single url which is supposed to be a normal wiki page
@param report if True, messages are emitted to sys.stderr;
if it is callable, it is invoked with the same messages

Definition at line 244 of file wikiParser.py.

                                                                    :
        """
        The constructor
        @param args a list of filenames, or a single URL.
        When a single URL, it is meant to be the address of a wikimedia
        page which contains a series of other addresses of the same
        mediawiki in mediawiki syntax.
        @param isatty is True when data do not come from the standard input
        @param isUrl is True to force the initialization, by considering arg as a single url which is supposed to be a normal wiki page
        @param report if True, messages are emitted to sys.stderr;
        if it is callable, it is invoked with the same messages
        """
        global wParser
        wParser=self
        self.lines=[]
        input_files = []
        self.cache=txtFileCacher()
        self.imageSet=set()
        self.report=report
        if not isatty:
            input_files.append('stdin')
            self.cache.read_file_to_lines(filename='stdin', fileObj=sys.stdin)
        if isUrl: #forced url system
            self.include_one_address(args[0])
            input_files.append('url')
            self.cache.read_file_to_lines(filename='url', fileObj=self.urlLines)
        elif self.isUrl(args):
            input_files.append('url')
            self.cache.read_file_to_lines(filename='url', fileObj=self.urlLines)
        else:
            input_files += args
            self.lines = []
        for file_ in input_files:
            self.lines += self.include_file_recursive(file_)


Generated by  Doxygen 1.6.0   Back to index