Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@k-oguma
Created October 20, 2017 03:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k-oguma/689c9e5e5ec149901583dbca1d6b2f51 to your computer and use it in GitHub Desktop.
Save k-oguma/689c9e5e5ec149901583dbca1d6b2f51 to your computer and use it in GitHub Desktop.
If there is no README, this makes the template.
README = 'README.md'
unless File.exist? README
puts 'Not found README file'
puts "Creating #{README}"
print = <<-EOS.gsub(/^ {,4}/, "## ").gsub(/\n/, "\n\n\n")
Synopsis
Requirements
Notice
Code Example
Installation
Command Reference
EOS
File.write(README, print)
puts '================='
puts "#{README} was created."
puts
puts "Please edit the #{README}"
end
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment