GithubHelp home page GithubHelp logo

Comments (4)

mitchelloharawild avatar mitchelloharawild commented on May 18, 2024

It works fine. The issue is that the entries functions return tibbles, and not formatted output suitable for results='asis'. When in a loop, objects don't print automatically, so the CV entries are not being printed in the first place. To print the entries in a suitable format for 'asis' output, you would need to use knitr::knit_print(). You would also need to ensure that they are actually displayed with cat.

CV.Rmd

---
name: Mitchell O'Hara-Wild
date: "`r format(Sys.time(), '%B, %Y')`"
qualifications: BCom(Hons), BSc
position: Data Scientist
address: 58 Madeleine Rd, Clayton
phone: +61 408 259 421
email: [email protected]
website: mitchelloharawild.com
github: mitchelloharawild
linkedin: mitchelloharawild
twitter: mitchoharawild
headcolor: 414141
output: vitae::awesomecv
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```


```{r, results='asis'}
for (i in 1:nrow(sections)){
  row <- slice(sections, i)
  
  pandoc.header(row$name, level = 1, "atx")
  
  data <- row$data[[1]]
  if (ncol(data) == 3){
    data %>%
      brief_entries(what, when, with) %>% 
      knitr::knit_print() %>% 
      cat
  } else {
    data %>%
      detailed_entries(what, when, with, where, why) %>% 
      knitr::knit_print() %>% 
      cat
  }
}
```

compile.R has also been changed to remove \n from the package descriptions.

library(tidyverse)
library(vitae)
library(pander)
library(rmarkdown)

edu <- rorcid::orcid_educations("0000-0001-6729-7695")
df_education <- edu$`0000-0001-6729-7695`$`education-summary` %>%
  transmute(
    what = `role-title`,
    when = glue::glue("{`start-date.year.value`} - {`end-date.year.value`}"),
    with = organization.name,
    where = organization.address.city,
    why = NA
  ) %>%
  as_tibble()

df_packages <- pkgsearch::ps("O'Hara-Wild",size = 100) %>%
  filter(purrr::map_lgl(package_data, ~ grepl("Mitchell O'Hara-Wild", .x$Author, fixed = TRUE))) %>%
  arrange(desc(downloads_last_month)) %>%
  transmute(
    what = title,
    when = lubridate::year(date),
    with = gsub("\n", "", description)
  ) %>%
  as_tibble # drop the pkg_search class

sections <- tribble(
  ~name, ~data,
  "Education", df_education,
  "Packages", df_packages
)

render("loop/CV.Rmd")

from vitae.

januz avatar januz commented on May 18, 2024

Thank you so much for your help! This solves my problem.

I now recognized another, more cosmetic, issue, though: The second and following entries within a category are slightly more indented than the first one. Is that a general problem? (I just checked your CV on Github and it also seems to have the issue; https://github.com/mitchelloharawild/CV/blob/master/CV.pdf).

Thanks!

image

from vitae.

mitchelloharawild avatar mitchelloharawild commented on May 18, 2024

I'm aware of this issue, but not sure of where this is coming from. It's probably somewhere within the awesome-cv cls files.

from vitae.

januz avatar januz commented on May 18, 2024

OK, thanks!

from vitae.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.