<commit_before>module Woli
  class Cli
    desc 'status', 'Print basic information about the diary.'
    def status
      entries_dates = Woli.diary.all_entries_dates
      date_format = '%d-%m-%Y'
      coverage = entries_dates.count / Float(entries_dates.last - entries_dates.first + 1)

      puts "Woli Diary Status"
      puts "================="
      puts "First entry: #{entries_dates.first.strftime(date_format)}"
      puts "Last entry: #{entries_dates.last.strftime(date_format)}"
      puts "Coverage: %2d %" % (coverage * 100).round
      puts "Missing entries since the last one: #{Woli.diary.missing_entries_count}"
    rescue ConfigError => e
      raise Thor::Error, e.message
    end
  end
end<commit_msg>status task informs of empty diary<commit_after>module Woli
  class Cli
    desc 'status', 'Print basic information about the diary.'
    def status
      entries_dates = Woli.diary.all_entries_dates
      date_format = '%d-%m-%Y'

      puts "Woli Diary Status"
      puts "================="

      if entries_dates.count > 0
        coverage = entries_dates.count / Float(entries_dates.last - entries_dates.first + 1)
        puts "First entry: #{entries_dates.first.strftime(date_format)}"
        puts "Last entry: #{entries_dates.last.strftime(date_format)}"
        puts "Coverage: %2d %" % (coverage * 100).round
        puts "Missing entries since the last one: #{Woli.diary.missing_entries_count}"
      else
        puts "Diary is empty. Run 'woli help edit' to learn how to create entries."
      end
    rescue ConfigError => e
      raise Thor::Error, e.message
    end
  end
end
{'fraction_non_alphanumeric': 0.12128712871287128, 'fraction_numerical': 0.006806930693069307, 'mean_word_length': 3.0425, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3062706', 'n_tokens_mistral': 502, 'n_tokens_neox': 497, 'n_words': 139}