lib/resme/templates/resume.org.erb in resme-0.3.2 vs lib/resme/templates/resume.org.erb in resme-0.4.0

- old
+ new

@@ -1,29 +1,31 @@ #+TITLE: Curriculum Vitae -#+AUTHOR: <%= full_name data %>, <%= data.basics.title %> -#+EMAIL: <%= data.contacts.select { |x| x.label == "email" }.first.value %> +#+AUTHOR: <%= full_name data %>, <%= data.basics&.title %> +#+EMAIL: <%= (data["contacts"] || []).select { |x| x.label == "email" }.first&.value %> #+DATE: <<%= Date.today %>> #+STARTUP: showall #+OPTIONS: toc:nil num:nil #+OPTIONS: h:1 #+OPTIONS: prop:nil +<% if data["addresses"] or data["contacts"] %> * Contacts :PROPERTIES: -<% data.addresses.each do |x| -%> +<% (data["addresses"] || []).each do |x| -%> <%= ":#{x.label.upcase}: #{x.street}, #{x.zip_code} #{x.city}" %> <% end -%> -<% data.contacts.each do |x| -%> +<% (data["contacts"] || []).each do |x| -%> <%= ":#{x.label.upcase}: #{x.value}" %> <% end -%> :END: -<% data.contacts.each do |x| -%> +<% (data["contacts"] || []).each do |x| -%> | <%= "%-30s" % x.label %> | <%= "%-40s" % x.value %> | <% end -%> +<% end %> -<% if data["work"] -%> +<% if data["summary"] -%> * Summary <%= reflow_to_string data.summary, 78 -%> <% end -%> @@ -72,10 +74,10 @@ <% end -%> <% end -%> <% if data["other"] -%> -* Other Initiatives +* Other <% (data.other || []).each do |item| -%> ** <%= period item %>: <%= [item["who"], item["role"]].join(", ") %> <%= propertify item, " " %>