grant updates

pull/1/head
Oliver Kennedy 2019-03-25 01:36:39 -04:00
parent 85bf3023ec
commit 6dcc8776df
3 changed files with 32 additions and 2 deletions

View File

@ -154,9 +154,11 @@ $cv_users.each do |who|
end
file "artifacts/okennedy_current_and_pending.pdf" do
NSFCnP.new("Oliver Kennedy",
cnp = NSFCnP.new("Oliver Kennedy",
$db["cv/okennedy/grants"].select { |r| r["status"] == "accepted" or r["status"] == "submitted" or r["status"] == "planned"}
).render("artifacts/okennedy_current_pending.pdf")
)
cnp.render("artifacts/okennedy_current_pending.pdf")
cnp.print
end
task :cnp => "artifacts/okennedy_current_and_pending.pdf"

View File

@ -1,4 +1,14 @@
[
{ "title" : "NSF Student Travel Grant for 2019 Symposium on Cloud Computing (SOCC)",
"agency" : "NSF: CISE: CNS: CSR",
"role" : "PI",
"amount" : 15000,
"effort" : "100%",
"status" : "submitted",
"start" : "10/01/2019", "end" : "09/30/2020",
"type" : "grant",
"commitment" : { "summer" : 0 }
},
{ "title" : "CCRI: Medium: Collaborative Research: Enabling Pocket-Scale Data Management",
"agency" : "NSF: CISE: IIS: CCRI",
"role" : "PI",

View File

@ -35,6 +35,24 @@ class NSFCnP
(commitment.map { |x| x if x.to_f > 0 }.compact + [0]).first.to_s
end
def print
grants = @grants
pi_name = @me
grants.each do |record|
status = record.fetch(:status, record.fetch("status", :pending))
status = case status
when :current then ""
when :accepted then ""
when "accepted" then ""
else "; #{status}"
end
puts " * #{record.fetch(:title)} ($#{record.fetch(:amount).to_s}#{status})"
puts " #{record.fetch(:start)} -- #{record.fetch(:end)}; Calendar: #{NSFCnP::commitment_string(record, :calendar)} mo, School: #{NSFCnP::commitment_string(record, :schoolyear)} mo, Summer: #{NSFCnP::commitment_string(record, :summer)} mo"
puts " Submitted to #{record.fetch(:agency)}"
end
end
def render(target)
grants = @grants
pi_name = @me