Created
September 18, 2018 00:21
-
-
Save jwworth/686d05bf7a9e11eb3c79be7a6796f431 to your computer and use it in GitHub Desktop.
Slide Splitter
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
#!/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