diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-03 20:57:36 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-03 20:57:36 -0500 |
commit | a5f4e1ed470b96c1f97f3827fe07d530c53f0e5c (patch) | |
tree | c4ab7430b9c2f54e9ab3ac10f62f0321af6578de /bin/index | |
parent | 5449dca686d7bdbd5f09acd4e9fd8647535acde9 (diff) |
I hate URL handling.
Diffstat (limited to 'bin/index')
-rwxr-xr-x | bin/index | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -4,12 +4,18 @@ load 'util.rb' require 'yaml' # ARGV[0] -template = "bin/index.#{ARGV.shift}.erb" +type = ARGV.shift +template = "bin/index.#{type}.erb" erb = ERB.new(File.read(template)); erb.filename = template # ARGV[1] @path = ARGV.shift +webpath = (@path+'/').sub(/^(src|out)\//, '/') +if type == 'atom' + webpath += 'index.atom' +end +@url = URI::parse('https://www.andrewdm.me') + webpath indexyaml = @path.sub('out', 'src')+'/index.yaml' if File.exists?(indexyaml) |