1
Fork 0

Allow numbers in the title

This commit is contained in:
Jan-Erik Rediger 2014-03-17 14:08:11 +01:00
parent 46f7199b92
commit c1e42fc3ce

View file

@ -19,7 +19,7 @@ if ARGV.size == 0
end end
filename = Time.now.strftime("%Y-%m-%d-") + ARGV.map { |arg| filename = Time.now.strftime("%Y-%m-%d-") + ARGV.map { |arg|
arg.downcase.gsub(/[^a-z]/, '-') arg.downcase.gsub(/[^a-z0-9]/, '-')
}.join('-').gsub(/--+/, '').gsub(/-$/, '') }.join('-').gsub(/--+/, '').gsub(/-$/, '')
title = ARGV.join(' ') title = ARGV.join(' ')
file = File.join(OUTPUT_DIR, "#{filename}#{EXTENSION}") file = File.join(OUTPUT_DIR, "#{filename}#{EXTENSION}")