7 BASE_MEMBERS = YAML.load(<<END_OF_YAML)
9 name: Matthieu Simon-Blavier
12 17, square Edouard VII
15 email: registry@domainnetwork.fr
17 membership_fee_paid_on: 2013-02-21
19 Il vient de `whois cogent.fr`.
26 email: sylvain.dufier@orange-ftgroup.com
28 membership_fee_paid_on: 2013-05-29
29 Il vient de `whois orange.fr`.
34 15, rue de la Nuee Bleue
36 email: domaines@sdv.fr
38 membership_fee_paid_on: 2011-01-11
39 Il vient de `whois numericable.fr`.
40 Et il n'est pas à jour de cotisation.
43 EXTRA_MEMBER = YAML.load(<<END_OF_YAML)
46 SOCIETE FRANCAISE DU RADIOTELEPHONE - SFR
47 42, avenue de Friedland
49 email: domains@sfr.com
51 membership_fee_paid_on: 2013-04-04
53 Il vient de `whois sfr.fr`.
56 MEMBER_FILE_TEMPLATE = <<'END_OF_TEMPLATE'
60 <%= address.gsub(/^/, ' ').rstrip %>
62 joined_on: <%= joined_on %>
63 membership_fee_paid_on: <%= membership_fee_paid_on %>
65 [[!ftemplate id="membre"]]
70 def member_filename_for_id(id)
71 "Membres/%06d.mdwn" % id
74 def render_member_file(locals)
75 ERB.new(MEMBER_FILE_TEMPLATE).result(OpenStruct.new(locals).instance_eval { binding })
79 max_id = Dir.glob("#{current_dir}/Membres/*.mdwn").
80 collect { |f| File.basename(f).gsub(/\.mdwn$/, '').to_i }.max || 0