Home | Trees | Indices | Help |
|
---|
|
The module makes the comparisons between the office document properties and requirements specified for each user.
Author: Vili Auvinen, Olli Kauppinen, Juho Tammela
To Do: Change the name of the module to word_inspector.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
inspectorDict =
|
|||
_checkers = {'Styles': checkRequirementStyles, 'TOC': checkReq
|
|||
__package__ =
|
|
Creates a document dict which contains the XML files from a document file by the given fileExtension.
Note: Code example: docXml = document['word/document.xml'] See Also: _checkers |
Processes requirements by looping through checkers dict which contains the method names described in the XML requirement file.
|
Checks the boolean requirements. The inspector methods return a boolean.
See Also: processRequirements for parameters. |
Checks the dictionary requirement. The inspector methods return a dictionary of which the values are compared to the ones in XML requirement file. See Also: processRequirements for parameters. |
Checks the requirement sections. The inspector method takes an empty list as an argument. If its length is not zero after the inspector method, it means that errors were founded.
See Also: processRequirements for parameters. |
Checks the requirement margins by calling the checkDictRequirement. See Also: processRequirements for parameters and checkDictRequirement for the actual method. |
Checks the heading numbering requirement. Error ids and positions are defined in a dict which is then used in the method inspector.checkHeadingNumbering(document, errorIdsAndPositions). If the keys in the dict are not None, errors have been appended.
|
Checks the style requirements. Compares the style requirements described in the XML file to the document properties defined by the user. Appends a default error if inspector.getStyle returns False.
See Also: processRequirements for parameters. |
Checks if the table of the contents exists. If it does not exist, appends a default error message. If it exists, checks if the table of contents is correctly made. If not, append an error message. See Also: processRequirements for parameters. |
Checks if there are images in the document. Calls the checkBooleanRequirement function. See Also: checkBooleanRequirement(function, requirement, document, results). |
Checks empty paragraphs from the document. Appends an error message if there are some to be found. See Also: processRequirements for parameters. |
Checks if there are lists in the document. Calls the checkBooleanRequirement function. See Also: processRequirements for parameters. |
Checks the style usage. An error dict (below) with two key-value pairs is used in the method inspector.checkStyleUsage. The inspector method returns the text paragraphs where manual changes have been made or style has not been used at all. errorIdsAndPositions = {'styleNotUsed': [], 'manualChanges': []} See Also: processRequirements for parameters. |
Checks if the tabs have been used in the document. Does nothing if tabs are not found, otherwise append an error message. See Also: processRequirements for parameters. |
Checks if double whitespaces are found in the document. Does nothing if double whitespaces are not found, otherwise append an error message. See Also: processRequirements for parameters |
Checks if asterisks are found in the document. Does nothing if asterisks are not found, otherwise append an error. A special print formatting is used here. Could be useful in other methods as well. See Also: processRequirements for parameters. |
Checks if image captions are used.
|
Checks the headers and the footers requirement. The method can be run only if checkRequirementSections goes through. The function is hard to implement in a smart way.
|
Checks if index is found in the document. If index is correctly made, checks the index content. See Also: processRequirements for parameters. |
Inspects a document by the given file extension which is either odt or docx.
|
|
inspectorDict
|
_checkers
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Jun 21 17:30:07 2011 | http://epydoc.sourceforge.net |