X-Git-Url: https://nos-oignons.net/gitweb/gestion-adh.git/blobdiff_plain/8536514115cf732eec24348862e835bde52acdf1..58822f182891ed954c0f600a70add6a741999d08:/bin/list-emails diff --git a/bin/list-emails b/bin/list-emails index 5d3fb74..935bcd0 100755 --- a/bin/list-emails +++ b/bin/list-emails @@ -4,3 +4,14 @@ require 'rubygems' require 'bundler' Bundler.setup + +require 'nos_oignons/subscriptions' + +subscriptions = read_subscriptions +now = Time.now +last_year = Time.new(now.year - 1, now.month, now.day).to_date +subscriptions.sort.each do |subscription_id, data| + if data['membership_fee_paid_on'] && last_year < data['membership_fee_paid_on'] + puts data['email'] + end +end