clock.py 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. import os
  2. import json
  3. from db.db_supplementary import check_folder
  4. from telegram.telegram_ui import database_connection
  5. from config import FilesUsage
  6. class ClockSettings:
  7. """
  8. class which is dedicated to work with the settings of the clock notifications
  9. """
  10. def __init__(self) -> None:
  11. self.folder_json = os.path.join(FilesUsage.folder_current, FilesUsage.folder_storage)
  12. self.file_json = os.path.join(self.folder_json, FilesUsage.file_name_json)
  13. def check_basics(self) -> None:
  14. """
  15. Method which is dedicated to fully check the presence of our files
  16. Input: None
  17. Output: we fully checked the values of the values
  18. """
  19. check_folder(self.folder_json)
  20. if not os.path.exists(self.file_json) and os.path.isfile(self.file_json):
  21. self.produce_file_json()
  22. def produce_file_json(self) -> None:
  23. """
  24. Method which is dedicated to create the basic json file for the values
  25. Input: None
  26. Output: we developed json for the values of it
  27. """
  28. pass