View gist:29163d57cc75f7300bf5
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
Verifying that +hadleynet is my blockchain ID. https://onename.com/hadleynet |
View gm2jekyll.rb
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 | |
source_dir = ARGV[0] | |
dest_dir = ARGV[1] | |
def get_timestamp(components) | |
month = components[0].to_i | |
day = components[1].to_i | |
year = components[2].to_i | |
hour = components[3].to_i | |
minute = components[4].to_i |
View Rakefile
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
require 'pathname' | |
task :bloxsom, [:post_dir, :dest_dir] do |t, args| | |
Dir.glob(File.join(args[:post_dir], "**/*.txt")).each do |path| | |
time_stamp = File.stat(path).mtime | |
relative_path = Pathname.new(path).relative_path_from(Pathname.new(args[:post_dir])) | |
tags = File.dirname(relative_path).split('/') | |
tags.delete('.') | |
content = File.readlines(path) | |
title = content[0].chomp |