]> nos-oignons.net Git - gestion-adh.git/blob - bin/list-emails
Add some documentation
[gestion-adh.git] / bin / list-emails
1 #!/usr/bin/ruby1.9.1
2 #-*- coding: utf-8 -*-
3
4 require 'rubygems'
5 require 'bundler'
6 Bundler.setup
7
8 require 'nos_oignons/subscriptions'
9
10 subscriptions = read_subscriptions
11 now = Time.now
12 last_year = Time.new(now.year - 1, now.month, now.day).to_date
13 subscriptions.sort.each do |subscription_id, data|
14   if data['membership_fee_paid_on'] && last_year < data['membership_fee_paid_on']
15     puts data['email']
16   end
17 end