Last active
September 21, 2023 01:14
-
-
Save sunny4381/958f4d401a375003f362e7b36ef8ab5d 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
# | |
# 使用方法: | |
# bundle exec rails runner all_contents_download.rb www > all_contents.csv | |
# | |
site = Cms::Site.find_by(host: ARGV[0]) | |
exporter = Cms::AllContent.new(site: site) | |
enumerable = exporter.enum_csv(encoding: "Shift_JIS") | |
enumerable.each do |csv| | |
STDOUT.write csv | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment