diff --git a/app/main/reports/text_storage/text_storage.py b/app/main/reports/text_storage/text_storage.py index 8bddea96..631d667b 100644 --- a/app/main/reports/text_storage/text_storage.py +++ b/app/main/reports/text_storage/text_storage.py @@ -35,19 +35,10 @@ def parse_chapters(self): if __name__ == "__main__": - docx_path = "/home/vilka/Downloads/petrov.docx" - pdf_path = "/home/vilka/Downloads/petrov.pdf" + docx_path = "example.docx" + pdf_path = "example.pdf" text_storage = TextStorage(docx_path, pdf_path) text_storage.parse_chapters() text_storage.parse_headers_and_pages() # for ch in text_storage.chapters: # print(ch) - - with open("pickle.bin", "wb") as outfile: - pickle.dump(text_storage.chapters, outfile) - - with open("pickle.bin", "rb") as infile: - deserialized = pickle.load(infile) - - if text_storage.chapters == deserialized: - print("Serialization is successful")