Update Database Script

class update_database.UpdateDatabase[source]

Wrapper for DatabaseSync that runs all the find_new functions to put file data in beeDB. Need to be in the honeyDBee conda environment to run, and simply running python3 update_database.py will run through all the possible update paths. It can also be run in the form python3 update_database.py <hive> for a specific hive, python3 update_database.py <start_date> <end_date> for a specific time frame, or lastly python3 update_database.py <hive> <start_date> <end_date> for both a specific hive and time frame.

__init__()[source]
update_all()[source]

This method is used to update all the hives, audio files, and video files. Calls update_hives(), update_audio(), and update_video() to use their respective methods in DatabaseSync and create entries in the database for any missing hives, audio files, and video files.

update_audio()[source]

Wrapper function for DatabaseSync.find_new_audio().

update_date_range(start_date: str | None = 'default', end_date: str | None = 'default', hive_name: str | None = 'All')[source]

Finds missing audio and video files from the database given a specific date range or hive, and creates and inserts entries for each. Creates a set of dates for the hive(s) requested and uses DatabaseSync.check_hive_videos() and DatabaseSync.check_hive_audio() to find all the missing videos and audio in the database and insert them.

Parameters:
  • start_date (Optional[str]) – The date to begin searching for lost files (inclusive).

  • end_date (Optional[str]) – The date to end searching for lost files (also inclusive). “default” for both of these options causes the program to run on all dates.

  • hive_name (Optional[str]) – Name of a specific hive to run

update_hives()[source]

Wrapper function for DatabaseSync.find_new_hives().

update_video()[source]

Wrapper function for DatabaseSync.find_new_video().