Created
June 16, 2023 01:46
-
-
Save mrcsparker/4cb6d0760eb46ee7e4f53f0a3c673d4c to your computer and use it in GitHub Desktop.
This file contains 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
require 'date' | |
Date.new(2019,10,1).upto(Date.today) do |date| | |
d = date.strftime("%y%m%d") | |
url = "https://fsapps.fiscal.treasury.gov/dts/files/#{d}00.xlsx" | |
unless File.exist? "data/#{d}.xlsx" | |
cmd = "curl '#{url}' --output data/#{d}.xlsx" | |
p cmd | |
`#{cmd}` | |
end | |
end% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment