automating tasks - maciejjankowski/2019 GitHub Wiki

I will tell you how to avoid repetetive tasks using some code

Problem

  • I was preparing cool samples to use in a music project, but after I got about 50 cool sounds...
  • My tiny sampler does not like the stereo files
  • convert from stereo to mono
  • convert sample rate
  • many files

How to perform the same action on many files

Command line goodness

  • tons of built in tools
  • combine their results (pipe)
#!/bin/bash

for file in *.wav
  do
    sox $file -b 16 -c 1 -r 48k "converted/$file"
  done

Other things to check out:

  • bash scripting
  • python
  • Klikanie i wpisywanie z klawiatury
    • Win: AHK, AutoIt
    • Mac: AppleScript, Karabiner, HammerSpoon
  • Kontrolowanie przeglądarki
    • Bookmarklety
    • Kantu, Selenium, Puppeteer