Created
October 10, 2021 09:37
-
-
Save michaelforrest/c3790cb740e7c6c43f2b0e4d7ce5f78f to your computer and use it in GitHub Desktop.
Free up space on your Zoom recorder
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
| desc "compress it all" | |
| task :compress do | |
| Dir["./FOLDER01/*"].each do |dir| | |
| Dir.chdir(dir) do | |
| files = Dir["*.WAV"] | |
| puts files | |
| if Dir["processed"].empty? && Dir[".processed"].empty? | |
| if files.include?("MASTER.WAV") || files.include?("MASTER-SOX.WAV") | |
| puts "We got a MASTER.WAV" | |
| else | |
| puts "We need to make a MASTER-SOX.WAV for #{dir}" | |
| system "sox -m #{files.join(" ")} MASTER-SOX.WAV" | |
| end | |
| tracks = Dir["TRACK*.WAV"] | |
| puts "ZIPPING #{tracks.count} TRACKS in #{dir}:" | |
| system "zip Archive.zip #{tracks.join(" ")}" | |
| system "trash #{tracks.join(" ")}" | |
| touch "./processed" | |
| else | |
| puts "already processed #{dir}" | |
| end | |
| end | |
| end | |
| end | |
| task :default => :compress |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment