converter: just renaming file and functions

This commit is contained in:
shirshasa
2021-04-14 14:15:34 +03:00
parent 81ccbf5af3
commit a353f0346f
2 changed files with 8 additions and 8 deletions

View File

@@ -11,7 +11,7 @@ from bs4 import BeautifulSoup, NavigableString
from config import BookLogger, BookApiWrapper, LawCartaConfig
from html_preprocessor import HTMLPreprocessor
from json_converter import JSONConverter
from json_postprocessor import JSONConverter
class Book:
@@ -202,7 +202,7 @@ class Book:
parser = HTMLPreprocessor(html_soup, self.logger_object)
content, footnotes, top_level_headers = parser.process_html(self.access, self.html_path, self.book_id)
json_converter = JSONConverter(content, footnotes, top_level_headers, self.logger_object, self.book_api_wrapper)
content_dict = json_converter.convert_to_json()
content_dict = json_converter.convert_to_dict()
self.write_to_json(content_dict)
self.write_html_from_list(parser.body_tag)
@@ -223,7 +223,7 @@ class Book:
content, footnotes, top_level_headers = parser.process_html(self.access, self.html_path, self.book_id)
json_converter = JSONConverter(content, footnotes, top_level_headers, self.logger_object, self.book_api_wrapper)
content_dict = json_converter.convert_to_json()
content_dict = json_converter.convert_to_dict()
self.write_to_json(content_dict)
self.write_html_from_list(parser.body_tag)
@@ -246,7 +246,7 @@ class Book:
self.book_api_wrapper.set_generate_status()
json_converter = JSONConverter(content, footnotes, top_level_headers, self.logger_object, self.book_api_wrapper)
content_dict = json_converter.convert_to_json()
content_dict = json_converter.convert_to_dict()
self.write_to_json(content_dict)
self.send_json_content(content_dict)
self.logger_object.log(f'End of the conversion to LawCarta format. Check {self.output_path}.')