This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| input_dir="." | |
| output_dir="$input_dir/processed" | |
| font_file="/System/Library/Fonts/Menlo.ttc" | |
| # Create the output directory if it doesn't exist | |
| mkdir -p "$output_dir" | |
| # Enable case-insensitive globbing for file matching |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const API_KEY = "YOUR_API_KEY"; | |
| /** | |
| * Retrieves the video ID from a YouTube video link. | |
| * @param {string} videoUrl | |
| * @returns {string} videoId | |
| */ | |
| function getYouTubeVideoId(videoUrl) { | |
| const regExp = /^.*(youtu\.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/; | |
| const match = videoUrl.match(regExp); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| [ $# -eq 0 ] && { echo "Usage: $0 <path>"; exit 1; } | |
| # /!\ adjust path here! | |
| LOG_FILE="/path/to/mp3s2wav-$(date +%s).log" | |
| echo "[$(date)] Start converting..." | tee -a "$LOG_FILE" | |
| # loop recursively through all .mp3 files under given path |