Created
January 23, 2021 01:46
-
-
Save dirceu/2f70e0618b01fa70308b548817dd0cf6 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
Dir['*.md'].each do |filename| | |
content = File.open(filename).read | |
#if ["-", ""].include?(content.strip) | |
# File.delete(filename) | |
# next | |
#end | |
File.open(filename, 'w') do |f| | |
f.write("# #{filename.gsub('.md', '')}\n\n") | |
f.write(content) | |
end | |
end | |
# https://github.com/andymatuschak/note-link-janitor | |
`note-link-janitor .` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment