Source: factory.core/ObjDocumentFile.py
Handles operations related to documents such as reading, creating,
and managing metadata.
This class is designed to manage document files within a specific
context. It provides functionalities for reading document
...
| Method | Signature | Description |
|---|---|---|
| read | read(doc_name: str, context: str = '', context2: str = '') -> None |
Reads the definition of a given document and processes its associated context. |
| locate_file | locate_file() -> str |
Search allowed root folders for the file without modifying state. |
| has_file | has_file() -> bool |
Check if the file exists in any allowed root folder. |
| read_on_guid | read_on_guid(guid: str = '', doc_name: str = '', context: str = '', context2: str = '') -> None |
|
| Create | Create(doc_name: str, context: str = '', context2: str = '', reference_guid: str = '') -> None |
|
| get_file_name | get_file_name() -> str |
|
| get_base_file_name | get_base_file_name() -> str |
|
| bloom_parameters | bloom_parameters(doc_name: str, guid: str = '', base_table: str = '') -> None |
|
| build_name | build_name(doc_type: str = '', folder: str = '', base: str = '') -> None |
Constructs and manages a file name and folder structure based on the given parameters. |
| set_document_folder | set_document_folder(base: str = '', root: str = '', folder: str = '', context: str = '', context2: str = '') -> str |
Function to set the self.document_folder variable. This function is being introduced because there are various |
| compress_file | compress_file() -> str |
|
| patch_param | patch_param(text: str, depth: int = 0) -> str |
|
| gcd | gcd(a: int, b: int) -> int |
|
| grammar_corrector | grammar_corrector(text: str) -> str |
Corrects grammatical errors in the given text using a language tool. |
| spelling_corrector | spelling_corrector(text: str) -> str |
|
| flow_corrector | flow_corrector(text: str) -> str |
|
| ocr_pdf | ocr_pdf(pdf_file: str) -> tuple |
|
| ocr_jpg | ocr_jpg(image_file: str) -> tuple |
|
| crop_image | crop_image(doc_name: str, doc_type: str) -> None |
|
| straighten_image | straighten_image(doc_name: str, doc_type: str) -> None |
|
| build_detail | build_detail(file: str = '', source_guid: str = '', orig_file: str = '') -> None |
|
| Update | Update() -> str |