Sha256: 0cc989954f85852095b9ad7eaec1bab5c977de00c583afaeedc91866c7189a5c

Contents?: true

Size: 612 Bytes

Versions: 3

Compression:

Stored size: 612 Bytes

Contents

# Forget Me Not 🌺 - A smart, contextualized todo list. Designed to live in your terminal, and to be in your face.

require 'psych'

puts 'Forget Me Not 🌺\n'

task_file_name = 'tasks.yml'

current_dir = Dir.pwd
dirs = [current_dir]
while File.expand_path('..', current_dir) != current_dir do
  dir = File.expand_path('..', current_dir)
  dirs.push dir
  current_dir = dir
end

tasks = []
dirs.each do |dir|
  path = "#{dir}/#{task_file_name}"
  if File.exists?(path) then
    yaml = Psych.load_file(path)
    tasks.push(yaml["tasks"])
  end
end

tasks = tasks.flatten

tasks.each do |t|
  puts "- #{t}"
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
forget_me_not-0.0.3 forget-me-not.rb
forget_me_not-0.0.2 forget-me-not.rb
forget_me_not-0.0.1 forget-me-not.rb