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

- old
+ new

@@ -1,86 +1,86 @@ #+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| -%> - <%= ":#{x.label.upcase}: #{x.street}, #{x.zip_code} #{x.city}" %> + <%= ":#{x['label'].upcase}: #{x['street']}, #{x['zip_code']} #{x['city']}" %> <% end -%> <% (data["contacts"] || []).each do |x| -%> - <%= ":#{x.label.upcase}: #{x.value}" %> + <%= ":#{x['label'].upcase}: #{x['value']}" %> <% end -%> :END: <% (data["contacts"] || []).each do |x| -%> -| <%= "%-30s" % x.label %> | <%= "%-40s" % x.value %> | +| <%= "%-30s" % x["label"] %> | <%= "%-40s" % x["value"] %> | <% end -%> <% end %> <% if data["summary"] -%> * Summary -<%= reflow_to_string data.summary, 78 -%> +<%= reflow_to_string data["summary"], 78 -%> <% end -%> <% if data["skills"] -%> * Skills -<% (data.skills || []).each do |item| -%> -** <%= item.name %>: <%= item.level %> +<% (data["skills"] || []).each do |item| -%> +** <%= item["name"] %>: <%= item["level"] %> <%= propertify item, " " %> <% end -%> <% end -%> <% if data["work"] -%> * Work Experience -<% (data.work || []).each do |item| -%> -** <%= period item %>: <%= clean [item.role, item.who].join(", ") %> +<% (data["work"] || []).each do |item| -%> +** <%= period item %>: <%= clean [item["role"], item["who"]].join(", ") %> <%= propertify item, " " %> <%= reflow_to_string item["summary"], 72, " " -%> <% end -%> <% end -%> <% if data["teaching"] -%> * Teaching -<% (data.teaching || []).each do |item| -%> -** <%= period item %>: <%= item.subject %> +<% (data["teaching"] || []).each do |item| -%> +** <%= period item %>: <%= item["subject"] %> <%= propertify item, " " %> <%= [item["role"], item["school"], item["who"]].join(", ") %> <% end -%> <% end -%> <% if data["projects"] -%> * Projects -<% (data.projects || []).each do |item| -%> -** <%= period item %>: <%= [item.name, item.role].join(", ") %> +<% (data["projects"] || []).each do |item| -%> +** <%= period item %>: <%= [item["name"], item["role"]].join(", ") %> <%= propertify item, " " %> <%= reflow_to_string item["summary"], 72, " " -%> <% end -%> <% end -%> <% if data["other"] -%> * Other -<% (data.other || []).each do |item| -%> +<% (data["other"] || []).each do |item| -%> ** <%= period item %>: <%= [item["who"], item["role"]].join(", ") %> <%= propertify item, " " %> <%= reflow_to_string item["summary"], 72, " " -%> @@ -88,118 +88,118 @@ <% end -%> <% if data["committees"] -%> * Committees -<% (data.committees || []).each do |item| -%> -** <%= item.who %>, <%= item.role %> <%= item.editions %> +<% (data["committees"] || []).each do |item| -%> +** <%= item["who"] %>, <%= item["role"] %> <%= item["editions"] %> <%= propertify item, " " %> <% end -%> <% end -%> <% if data["volunteer"] -%> * Volunteer -<% (data.volunteer || []).each do |item| -%> -** *<%= period item %>: <%= [item.role, item.who].join(", ") %>* +<% (data["volunteer"] || []).each do |item| -%> +** *<%= period item %>: <%= [item["role"], item["who"]].join(", ") %>* <%= propertify item, " " %> -<%= reflow_to_string item.summary, 72, " " -%> +<%= reflow_to_string item["summary"], 72, " " -%> <% end -%> <% end -%> <% if data["publications"] -%> * Publications -<% (data.publications || []).each do |item| -%> -- <%= item.authors %>, *"<%= item.title %>"* <%= item.publisher %>, <%= item.date %> +<% (data["publications"] || []).each do |item| -%> +- <%= item["authors"] %>, *"<%= item["title"] %>"* <%= item["publisher"] %>, <%= item["date"] %> <% end -%> <% end -%> <% if data["talks"] -%> * Talks -<% (data.talks || []).each do |item| -%> -- <%= item.title %> - <%= item.venue %> (<%= item.date %>) +<% (data["talks"] || []).each do |item| -%> +- <%= item["title"] %> + <%= item["venue"] %> (<%= item["date"] %>) <% end -%> <% end -%> <% if data["visits"] -%> * Visits -<% (data.visits || []).each do |item| -%> -** *<%= period item %>: <%= [item.role, item.who, item.address].join(", ") %>* +<% (data["visits"] || []).each do |item| -%> +** *<%= period item %>: <%= [item["role"], item["who"], item["address"]].join(", ") %>* <%= propertify item, " " %> -<%= reflow_to_string item.summary, 72, " " -%> +<%= reflow_to_string item["summary"], 72, " " -%> <% end -%> <% end -%> <% if data["education"] -%> * Education -<% data.education.select { |x| x.publish }.each do |item| -%> -** *<%= year(item["till"]) %>: <%= [item.degree, item.school, item.address].join(", ") %>* +<% data["education"].select { |x| x["publish"] }.each do |item| -%> +** *<%= year(item["till"]) %>: <%= [item["degree"], item["school"], item["address"]].join(", ") %>* <%= propertify item, " " %> <% end -%> <% end -%> <% ["awards", "achievements"].each do |group| -%> <% if data[group] -%> * <%= group.capitalize %> <% (group || []).each do |item| -%> -** <%= item.date %>: <%= [item.title, item.who, item.address].join(", ") %> +** <%= item["date"] %>: <%= [item["title"], item["who"], item["address"]].join(", ") %> <%= propertify item, " " %> -<%= reflow_to_string item.summary, 72, " " -%> +<%= reflow_to_string item["summary"], 72, " " -%> <% end -%> <% end -%> <% end -%> <% if data["software"] %> * Software -<% (data.software || []).each do |item| -%> -- <%= item.title %> (<%= item.role %>) - <%= item.url %> +<% (data["software"] || []).each do |item| -%> +- <%= item["title"] %> (<%= item["role"] %>) + <%= item["url"] %> <% end -%> <% end -%> <% if data["interests"] -%> * Interests -<% (data.interests || []).each do |item| -%> -- *<%= item.name %>:* <%= reflow_to_string item.summary, 72 %> +<% (data["interests"] || []).each do |item| -%> +- *<%= item["name"] %>:* <%= reflow_to_string item["summary"], 72 %> <% end -%> <% end -%> <% if data["languages"] %> * Languages -<% if data["languages"] and data.languages["mother_tongues"] -%> -- Mother Tongue(s): <%= data.languages.mother_tongues.map { |x| x.language }.join(",") %> +<% if data["languages"] and data["languages"]["mother_tongues"] -%> +- Mother Tongue(s): <%= data["languages"]["mother_tongues"].map { |x| x["language"] }.join(",") %> <% end -%> -<% if data["languages"] and data.languages["foreign"] -%> +<% if data["languages"] and data["languages"]["foreign"] -%> - Other Language(s): -<% data.languages.foreign.each do |x| -%> - + <%= x.language %>: <%= x.level %> +<% data["languages"]["foreign"].each do |x| -%> + + <%= x["language"] %>: <%= x["level"] %> <% end -%> <% end -%> <% end -%> <% if data["references"] %> * References -<% (data.references || []).each do |item| -%> -<%= item.name %>: -<%= reflow_to_string item.reference, 72 %> +<% (data["references"] || []).each do |item| -%> +<%= item["name"] %>: +<%= reflow_to_string item["reference"], 72 %> <% end -%> <% end -%>