Skip to content

Instantly share code, notes, and snippets.

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 jwworth/686d05bf7a9e11eb3c79be7a6796f431 to your computer and use it in GitHub Desktop.
Save jwworth/686d05bf7a9e11eb3c79be7a6796f431 to your computer and use it in GitHub Desktop.
Slide Splitter
#!/usr/bin/env ruby
slides_to_split = File.read('slides.md')
slide_data = slides_to_split.split("\n---\n\n")
slide_data.each_with_index do |data, index|
File.write("slides/#{index.to_s.rjust(2, '0')}.md", data)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment