Created
December 30, 2013 13:51
-
-
Save jamesu/8182306 to your computer and use it in GitHub Desktop.
Convert Notational Velocity notes into tiddywiki tiddlers suitable for inserting into a TiddlyWiki file
This file contains hidden or 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
note_html = [] | |
Dir["./notes/candidates/*.txt"].each do |file| | |
ftime = File.mtime(file) | |
name = file.split("/")[-1] | |
puts "FILE #{name} CREATED #{ftime}" | |
File.open(file) do |f| | |
timestamp = ftime.strftime("%Y%m%d%H%M") | |
note_html << "<div changecount=\"1\" created=\"#{timestamp}\" modified=\"#{timestamp}\" modifier=\"JamesU\" tags=\"notational\" title=\"#{name}\"><pre>#{f.read}</pre></div>" | |
end | |
end | |
puts note_html.join("\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment