Sha256: c8eaca6d5e2ce7c7393a99fa2ada3dfdbcb13d9d396d03ab1d3b3f9756cd6830

Contents?: true

Size: 509 Bytes

Versions: 1

Compression:

Stored size: 509 Bytes

Contents

#!/usr/bin/env ruby

require "obst"

path = ARGV[0] || '.'

gitignore = File.join(path, '.gitignore')
File.open(gitignore, 'a+') do |f|
  f.puts("# Obst\nobst.md") unless f.read =~ /# Obst/
end

buffer = []
Obst::GroupByDays.new(C: path, days: 1).take(7).each do |record|
  buffer << "- #{record.time} (#{record.statuses.size})"
  record.statuses.each_key do |name|
    buffer << "\t- [[#{name}]]"
  end
end

obst_md = File.join(path, 'obst.md')
File.open(obst_md, 'w') do |f|
  f.puts(buffer.join("\n"))
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
obst-0.1.2 exe/obst