Automate Google Scholar Citation Metrics in Your CV
Update your citation count daily in your CV (Windows user)
Update your citation count daily in your CV (Windows user)
#############################
# Load Packages #
#############################
library(officer) #for the first time: install.packages("scholar", repos='http://cran.us.r-project.org')
library(scholar) #for the first time: install.packages("scholar", repos='http://cran.us.r-project.org')
####################################
# Calculate Google Scholar Metrics #
####################################
my_Google_Scholar<-get_profile('lAlTf3sAAAAJ') # change 'lAlTf3sAAAAJ' to your own google scholar page
a<-as.character(my_Google_Scholar$total_cites)
b<-as.character(my_Google_Scholar$h_index)
c<-as.character(my_Google_Scholar$i10_index)
#######################################
# Update Citation Metrics in CV #
#######################################
doc <- read_docx("C:\\MyDocuments\\CV\\CV.docx") # use "\\"
body_replace_text_at_bkm(doc, 'citations', a)
body_replace_text_at_bkm(doc, 'h_index', b)
body_replace_text_at_bkm(doc, 'h10_index', c)
print(doc, target = "C:\\MyDocuments\\CV\\CV.docx")