|
__init__(self,
spellclass=None,
options=None,
spellnames=None,
logger=None)
Initialize the toaster. |
source code
|
|
|
_update_options(self)
Synchronize some fields with given options. |
source code
|
|
|
_update_spellclass(self)
Update spell class from given list of spell names. |
source code
|
|
|
|
|
msgblockbegin(self,
message)
Acts like msg, but also increases indent after writing the
message. |
source code
|
|
|
msgblockend(self,
message=None)
Acts like msg, but also decreases indent before writing the
message, but if the message argument is None, then no message is
printed. |
source code
|
|
|
is_admissible_branch_class(self,
branchtype)
Helper function which checks whether a given branch type should
have spells cast on it or not, based in exclude and include options. |
source code
|
|
|
cli(self)
Command line interface: initializes spell classes and options from
the command line, and run the toast method. |
source code
|
|
|
inspect_filename(self,
filename)
Returns whether to toast a filename or not, based on
skip_regexs and only_regexs. |
source code
|
|
|
toast(self,
top)
Walk over all files in a directory tree and cast spells
on every file. |
source code
|
|
|
toast_archives(self,
top)
Toast all files in all archives. |
source code
|
|
|
|
tuple of three str s
|
|
|
|
|
write(self,
stream,
data)
Writes the data to data and raises an exception if the
write fails, but restores file if fails on overwrite. |
source code
|
|
|
writepatch(self,
stream,
data)
Creates a binary patch for the updated file. |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|
|
SPELLS = [ ]
List of all available pyffi.spells.Spell classes.
|
|
EXAMPLES = '
'
Some examples which describe typical use of the toaster.
|
|
ALIASDICT = { }
Dictionary with aliases for spells.
|
|
DEFAULT_OPTIONS = { ' applypatch ' : False, ' archives ' : False, ' ar ...
List of spell classes of the particular Toaster instance.
|
|
options = { }
The options of the toaster, as dict.
|
|
spellnames = [ ]
A list of the names of the spells.
|
|
top = '
'
Name of the top folder to toast.
|
|
indent = 0
An int which describes the current indentation level for messages.
|
|
logger = logging.getLogger("pyffi.toaster")
A logging.Logger for toaster log messages.
|
|
include_types = [ ]
Tuple of types corresponding to the include key of options.
|
|
exclude_types = [ ]
Tuple of types corresponding to the exclude key of options.
|
|
only_regexs = [ ]
Tuple of regular expressions corresponding to the only key of
options.
|
|
skip_regexs = [ ]
Tuple of regular expressions corresponding to the skip key of
options.
|