Importer¶
-
class
TempCategory
(category, indent)¶ Bases:
object
Temporarily holds the VMF categories when reading the .VMF file
Parameters: - category (
str
) – The category name - indent (
int
) – The level of indentation (how far nested inside other classes)
-
add_child
(category, indent)¶ Parameters: - category (
str
) – The category name - indent (
int
) – The level of indentation (how far nested inside other classes)
- category (
-
add_line
(line, indent)¶ Parameters: - line (
str
) – The line of data to add to the current category - indent (
int
) – The level of indentation (how far nested inside other classes)
- line (
-
clean_up
()¶ Goes through all the data to remove unecessary characters
- category (
-
file_parser
(file)¶ Opens the file, extracts data line by line and turns it all into temporary categories
Parameters: file ( str
) – The OS file to open, path needs to be includedReturns: All the top level categories Return type: list
ofTempCategory