<commit_before>
Maid.rules do
  # **NOTE:** It's recommended you just use this as a template; if you run these rules on your machine without knowing
  # what they do, you might run into unwanted results!

  # inspired by: https://github.com/JohnColvin/.maid/blob/master/rules.rb
  rule 'Update yourself' do
    `homesick pull`
    `homesick symlink`
  end

  #rule 'Update homebrew' do
  #  `brew update`
  #  `brew cleanup`
  #end

  rule 'Torrents' do
    dir('~/Downloads/*.torrent').each do |path|
      move(path, '~/Dropbox/Torrents/')
    end
  end

  # inpired by OS name example - https://github.com/mitchty/src/blob/master/dotfiles/maid/rules.rb
  # custom rules based on known machine names
  case %x/hostname -s/.chomp
    when 'jeffrey-tripletts-macbook-pro'
      print "==jeffrey-tripletts-macbook-pro\n"

    when 'Jeffs-Mac-mini'
      print "==Jeffs-Mac-mini\n"
  end

  rule 'Collect downloaded videos to watch later' do
    print "Collect downloaded videos to watch later\n"

    move where_content_type(dir('~/Downloads/*'), 'video'), '~/Movies/'
    dir('~/Downloads/*.{mkv,mp4,avi}').each do |path|
      move(path, '~/Movies/')
    end
  end

  rule 'Cleanup Downloads' do
    dir('~/Downloads/*').each do |path|
      if 2.week.since?(accessed_at(path))
        trash(path)
      end
    end
  end

  # NOTE: Currently, only Mac OS X supports `duration_s`.
  #rule 'MP3s likely to be music' do
  #  dir('~/Downloads/*.mp3').each do |path|
  #    if duration_s(path) > 30.0
  #      move(path, '~/Music/iTunes/iTunes Media/Automatically Add to iTunes/')
  #    end
  #  end
  #end

end<commit_msg>self-updating crontab (I wish there was better way to detect that there's a need for this).<commit_after>
Maid.rules do
  # **NOTE:** It's recommended you just use this as a template; if you run these rules on your machine without knowing
  # what they do, you might run into unwanted results!

  # inspired by: https://github.com/JohnColvin/.maid/blob/master/rules.rb
  rule 'Update yourself' do
    `homesick pull`
    `homesick symlink`
  end

  #rule 'Update homebrew' do
  #  `brew update`
  #  `brew cleanup`
  #end

  rule 'Torrents' do
    dir('~/Downloads/*.torrent').each do |path|
      move(path, '~/Dropbox/Torrents/')
    end
  end

  # inpired by OS name example - https://github.com/mitchty/src/blob/master/dotfiles/maid/rules.rb
  # custom rules based on known machine names
  case %x/hostname -s/.chomp
    when 'jeffrey-tripletts-macbook-pro'
      print "==jeffrey-tripletts-macbook-pro\n"

    when 'Jeffs-Mac-mini'
      print "==Jeffs-Mac-mini\n"
  end

  rule 'Collect downloaded videos to watch later' do
    print "Collect downloaded videos to watch later\n"

    move where_content_type(dir('~/Downloads/*'), 'video'), '~/Movies/'
    dir('~/Downloads/*.{mkv,mp4,avi}').each do |path|
      move(path, '~/Movies/')
    end
  end

  rule 'Cleanup Downloads' do
    dir('~/Downloads/*').each do |path|
      if 2.week.since?(accessed_at(path))
        trash(path)
      end
    end
  end

  rule 'Update crontab' do
    `whenever --update-crontab -f ~/.maid/schedule.rb`
  end

  # NOTE: Currently, only Mac OS X supports `duration_s`.
  #rule 'MP3s likely to be music' do
  #  dir('~/Downloads/*.mp3').each do |path|
  #    if duration_s(path) > 30.0
  #      move(path, '~/Music/iTunes/iTunes Media/Automatically Add to iTunes/')
  #    end
  #  end
  #end

end
{'fraction_non_alphanumeric': 0.13611029627456733, 'fraction_numerical': 0.004106776180698152, 'mean_word_length': 2.8926940639269407, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6394769', 'n_tokens_mistral': 1265, 'n_tokens_neox': 1195, 'n_words': 339}