Start by downloading the Day One CLI (dayone2) by following the instructions here: https://dayoneapp.com/guides/command-line-interface-cli/
Enter the directory that contains all of your Markdown files and nothing else (they should be in the same directory as this script doesn't recurse). This script should be in a different directory so that the script doesn't try to upload itself too. Then run it and watch the output.