Package doapfiend :: Module cli :: Class DoapFiend
[hide private]
[frames] | no frames]

Class DoapFiend

source code

object --+
         |
        DoapFiend

`DoapFiend` class

Instance Methods [hide private]
 
__init__(self)
Initialize attributes, set logger
source code
 
get_plugin(self, method)
Return plugin object if CLI option is activated and method exists
source code
 
set_log_level(self)
Set log level according to command-line options
source code
None
print_doap(self, doap_xml)
Print doap as n3, rdf/xml, plain text or using serialization plugin
source code
callable
get_search_plugin(self)
Return active search plugin callable
source code
int
run(self)
Run doapfiend command
source code
opt_parser.OptionParser
setup_opt_parser(self)
Setup the optparser
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Initialize attributes, set logger

Overrides: object.__init__

get_plugin(self, method)

source code 

Return plugin object if CLI option is activated and method exists

Parameters:
  • method (string) - name of plugin's method we're calling
Returns:
list of plugins with `method`

print_doap(self, doap_xml)

source code 

Print doap as n3, rdf/xml, plain text or using serialization plugin

Parameters:
  • doap_xml (text) - DOAP in RDF/XML serialization
Returns: None
Just displays DOAP

get_search_plugin(self)

source code 

Return active search plugin callable

Returns: callable
A callable object that fetches for DOAP

run(self)

source code 

Run doapfiend command

Find the active plugin that has a 'search' method and run it, then output the DOAP with print_doap, using the active plugin with a 'serializer' method.

Returns: int
0 success or 1 failure

setup_opt_parser(self)

source code 

Setup the optparser

Returns: opt_parser.OptionParser
Option parser