lib/sifttter_redux/sifttter.rb in sifttter-redux-0.5.1 vs lib/sifttter_redux/sifttter.rb in sifttter-redux-0.5.2
- old
+ new
@@ -44,13 +44,13 @@
XMLTEMPLATE
date_regex = "(?:#{ date.strftime("%B") } 0?#{ date.strftime("%-d") }, #{ date.strftime("%Y") })"
time_regex = "(?:\d{1,2}:\d{1,2}\s?[AaPpMm]{2})"
- files = `find #{ Configuration['sifttter_redux']['sifttter_local_filepath'] } -type f -name "*.txt" | grep -v -i daily | sort`
+ files = `find #{ Configuration::sifttter_redux[:sifttter_local_filepath] } -type f -name "*.txt" | grep -v -i daily | sort`
if files.empty?
- CLIMessage::error("No Sifttter files to parse; is #{ Configuration['sifttter_redux']['sifttter_remote_filepath'] } the correct remote filepath?")
+ CLIMessage::error("No Sifttter files to parse; is #{ Configuration::sifttter_redux[:sifttter_remote_filepath] } the correct remote filepath?")
return
end
projects = []
files.split("\n").each do |file|
@@ -84,12 +84,12 @@
entrytext = "# Things done on #{ date_for_title }\n\n"
projects.each do |project|
entrytext += project.gsub(/.txt/, ' ') + "\n\n"
end
- Dir.mkdir(Configuration['sifttter_redux']['dayone_local_filepath']) if !Dir.exists?(Configuration['sifttter_redux']['dayone_local_filepath'])
+ Dir.mkdir(Configuration::sifttter_redux[:dayone_local_filepath]) if !Dir.exists?(Configuration::sifttter_redux[:dayone_local_filepath])
- fh = File.new(File.expand_path(Configuration['sifttter_redux']['dayone_local_filepath'] + '/' + uuid + '.doentry'), 'w+')
+ fh = File.new(File.expand_path(Configuration::sifttter_redux[:dayone_local_filepath] + '/' + uuid + '.doentry'), 'w+')
fh.puts template.result(binding)
fh.close
CLIMessage::success("Entry logged for #{ date_for_title }...")
end
end