Problem: A digital agency insisted on delivering a web site using a custom Django CMS, so we can't use the normal Wordpress plugin for setting up redirects for URLs from the old site.
Solution: A Ruby script for transforming our spreadsheet of redirects into nginx redirects.
This script expects an Excel .xlsx spreadsheet with the redirects in the first sheet. It expects to find the original URLs in a column titled, "old URL", and the new URLs in a column titled "new URL".
You might like to run Ruby in some other way. Have fun with that.
I used 2.4 and that's recorded in the .rvmrc file. Any 2.x version will probably work.
gem install bundler
bundle install
ruby transform.rb spreadsheet.xlsx