Sha256: abfb14e4902a21a0b4be2e54574542691f0c48c5f4ccef3c4df5e99841f43bbc

Contents?: true

Size: 679 Bytes

Versions: 2

Compression:

Stored size: 679 Bytes

Contents

#!/usr/bin/env ruby

require "obst"

path = ARGV[0] || '.'

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

# read config
cfg = Obst::Config.new(path)

# print stats
obst_md = File.join(path, 'obst.md')
File.open(obst_md, 'w') do |f|
  f.puts Obst::Chart::DailyCount.new(C: path).to_s
  f.puts "\n"
  f.puts Obst::Chart::DailyChange.new(C: path, cfg: cfg).to_s
  f.puts "\n"
  f.puts Obst::LongTimeNoSee.new(C: path, cfg: cfg).to_s
  f.puts "\n"
  f.puts Obst::TouchedFiles.new(C: path, cfg: cfg).to_s
  f.puts "\n"
  f.puts Obst::TagsCount.new(C: path, cfg: cfg).to_s
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
obst-0.1.10 exe/obst
obst-0.1.9 exe/obst