3. Running the Program - Paillat-dev/FABLE GitHub Wiki

3.1 Running main.py

The main.py file is the entry point to the FABLE application. When executed, it will run the entire program, which involves generating video ideas, creating scripts, generating audio and video, and finally, uploading the created video to YouTube.

When running main.py, it's important to ensure that you have all the necessary dependencies installed.

3.2 Understanding the Output

As the program runs, it will print out information to the console about the current operation it's performing. Here's what each part means:

  • main.py uses bcolors.py to format and colorize console output for better readability. Different colors represent different types of messages (informational, warning, error, etc.).
  • config.py contains a loadingmessage string that is printed to the console when the program starts running.
  • uploader.py uploads the final video to YouTube using the YouTube API. It prints out a message when the video upload starts, and another one when the upload has been successfully completed.
  • openaicaller.py interacts with the OpenAI API to generate text content. It prints out a message every time it makes a request to the API.

The other Python scripts in the utils directory (normalize_file.py, wiki_downloader.py, tokens.py) perform various utility functions that are used by the main program, but they do not produce any console output on their own.

Please refer to the relevant sections in Chapter 4 for a more detailed explanation of what each script does.

In the next chapter, we'll look at the additional features and settings you can configure to customize how FABLE operates.