~jheckt/audio-notes

c9af4101bd6e5656379a98fdcdb459ff3547cc6e — turnipsoup 1 year, 6 months ago 0e00b15
directories for the day are only created if files are deposited
1 files changed, 7 insertions(+), 4 deletions(-)

M audio_to_notes.py
M audio_to_notes.py => audio_to_notes.py +7 -4
@@ 84,14 84,17 @@ def main():
        audio_today = add_base_path(f"{config['audio_directory']}/{today}")
        text_today = add_base_path(f"{config['text_directory']}/{today}")

        # Check if the directories exist
        check_directory(audio_today)
        check_directory(text_today)

        logging.info("Checking for new audio files")

        new_files = get_files(add_base_path(config["audio_source"]))

        if len(new_files) < 1:
            # Check if the directories exist
            check_directory(audio_today)
            check_directory(text_today)



        for f in new_files[::-1]:
            logging.info("Found new file: %s", f)
            result = get_text(config, f)