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

Class LightMediaScanner

source code

object --+
         |
        LightMediaScanner

Instance Methods [hide private]
 
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
a new object with type S, a subtype of T
__new__(T, S, ...) source code
 
__repr__(...)
repr(x)
source code
 
__str__(...)
str(x)
source code
 
charset_add(...)
Add charset to list of supported input charsets/encoding.
source code
 
charset_del(...)
Del charset from list of supported input charsets/encoding.
source code
 
check(...)
Check (and update) files under directory.
source code
 
check_single_process(...)
Check (and update) files under directory *without fork()-ing into child process*.
source code
 
delete(...)
Delete all parsers and force wrapped object deletion
source code
int
get_commit_interval(...) source code
int
get_slave_timeout(...) source code
bool
is_processing(...) source code
Parser
parser_add(...)
Add a new plugin/parser based on it's whole path to shared object.
source code
 
parser_del(...)
Delete a plugin/parser.
source code
Parser
parser_find_and_add(...)
Add a new plugin/parser based on it's name.
source code
 
parsers_clear(...)
Delete all plugins/parsers
source code
 
process(...)
Process directory recursively.
source code
 
process_single_process(...)
Process directory recursively *without fork()-ing into child process*.
source code
 
set_commit_interval(...)
Set the number of transactions between commits.
source code
 
set_progress_callback(...)
Set new progress callback.
source code
 
set_slave_timeout(...)
Set maximum time a parser may use.
source code
 
stop_processing(...)
Stop process/check
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]
  commit_interval
  db_path
  parsers
  slave_timeout

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__

__new__(T, S, ...)

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

__repr__(...)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__str__(...)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

charset_add(...)

source code 

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.

check(...)

source code 

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.

check_single_process(...)

source code 

Check (and update) files under directory *without fork()-ing into child process*.

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.

process(...)

source code 

Process directory recursively.

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

process_single_process(...)

source code 

Process directory recursively *without fork()-ing into child process*.

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

set_commit_interval(...)

source code 

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_progress_callback(...)

source code 
Set new progress callback.

If you want to unset a callback, just use None.

Function signature is:

    C{function(lms, path, status, *args, **kargs)}

with status being one of LMS_PROGRESS_STATUS_*.

@parm: B{cb} a callable object or None to unset previously set callback.

set_slave_timeout(...)

source code 

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.