Created
June 20, 2017 13:33
-
-
Save floehopper/145ddb35af826649d0d9d0698caeb52f to your computer and use it in GitHub Desktop.
Dump start page content for Smart Answers
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
# Avoid polluting stdout with Rails log messages | |
Rails.logger = Logger.new(StringIO.new) | |
SmartAnswer::FlowRegistry.instance.flows.each do |flow| | |
start_node = SmartAnswer::Node.new(flow, flow.name.underscore.to_sym) | |
presenter = StartNodePresenter.new(start_node) | |
puts "Slug: #{flow.name}" | |
puts | |
puts "Title: #{presenter.title}" | |
puts | |
puts "Meta description: #{presenter.meta_description}" | |
puts | |
puts "Body (govspeak):" | |
puts presenter.body(html: false) | |
puts | |
puts "Post body (govspeak):" | |
puts presenter.post_body(html: false) | |
puts | |
puts '---' | |
puts | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment