Package lightmediascanner :: Module c_lightmediascanner :: Class LightMediaScanner
[show private | hide private]
[frames | no frames]

Type LightMediaScanner

object --+
         |
        LightMediaScanner


Method Summary
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __repr__(...)
  __str__(...)
  charset_add(...)
Add charset to list of supported input charsets/encoding.
  charset_del(...)
Del charset from list of supported input charsets/encoding.
  check(...)
Check (and update) files under directory.
int get_commit_interval(...)
int get_slave_timeout(...)
bool is_processing(...)
Parser parser_add(...)
Add a new plugin/parser based on it's whole path to shared object.
  parser_del(...)
Delete a plugin/parser.
Parser parser_find_and_add(...)
Add a new plugin/parser based on it's name.
  process(...)
Process directory recursively.
  set_commit_interval(...)
Set the number of transactions between commits.
  set_slave_timeout(...)
Set maximum time a parser may use.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value

Class Variable Summary
getset_descriptor commit_interval = <attribute 'commit_interval' of 'light...
member_descriptor db_path = <member 'db_path' of 'lightmediascanner.c_ligh...
member_descriptor parsers = <member 'parsers' of 'lightmediascanner.c_ligh...
getset_descriptor slave_timeout = <attribute 'slave_timeout' of 'lightmedi...

Method Details

__init__(...)
(Constructor)

x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides:
__builtin__.object.__init__

__new__(T, S, ...)

T.__new__(S, ...) -> a new object with type S, a subtype of T
Returns:
a new object with type S, a subtype of T
Overrides:
__builtin__.object.__new__

charset_add(...)

Add charset to list of supported input charsets/encoding.

If some string in analysed/parsed files are not UTF-8, then it will try agains a list of charsets registered with this function.

charset_del(...)

Del charset from list of supported input charsets/encoding.

check(...)

Check (and update) files under directory.

This operates on all files in all sub directories of top_path using the added parsers. If files are up to date, nothing is done, otherwise they can be marked as deleted or updated if they still exists, but with different size or modification time.

get_commit_interval(...)

Returns:
int

get_slave_timeout(...)

Returns:
int

is_processing(...)

Returns:
bool

parser_add(...)

Add a new plugin/parser based on it's whole path to shared object.
Returns:
Parser

parser_del(...)

Delete a plugin/parser.

parser_find_and_add(...)

Add a new plugin/parser based on it's name.
Returns:
Parser

process(...)

Process directory recursively.

This operates on all files in all sub directories of top_path using the added parsers.

set_commit_interval(...)

Set the number of transactions between commits.

Sets how many transactions/files to handle in one commit, the more the faster, but if one parser takes too long and it's killed due slave_timeout being exceeded, then at most this number of transactions will be lost.

Note that transaction here is not a single SQL statement, but it is considered to be the processing of a file, which can be more than just one.

set_slave_timeout(...)

Set maximum time a parser may use.

This will be the timeout before killing the slave process running some parser. If this happens, another slave process will be started to continue from next file.

Class Variable Details

commit_interval

Type:
getset_descriptor
Value:
<attribute 'commit_interval' of 'lightmediascanner.c_lightmediascanner\
.LightMediaScanner' objects>                                           

db_path

Type:
member_descriptor
Value:
<member 'db_path' of 'lightmediascanner.c_lightmediascanner.LightMedia\
Scanner' objects>                                                      

parsers

Type:
member_descriptor
Value:
<member 'parsers' of 'lightmediascanner.c_lightmediascanner.LightMedia\
Scanner' objects>                                                      

slave_timeout

Type:
getset_descriptor
Value:
<attribute 'slave_timeout' of 'lightmediascanner.c_lightmediascanner.L\
ightMediaScanner' objects>                                             

Generated by Epydoc 2.1 on Thu Dec 13 02:07:27 2007 http://epydoc.sf.net