DAILY FOR R is a light blog aggregator website for R.
Features
Real daily update and you could use RSS reader or click archive to find entries of the old posts
No AD
Remove the author to make more contents focused
Update everyday via a automated process
Use GitLab CI to control posts
Re-direct to the orginal pages by click title in the homepage and wait 10s to re-direct in the post page
We reserve the right to delete any inappropriate posts
Contribute
This project is hosted on GitLab, project repos:https://gitlab.com/chuxinyuan/dailyr.
Add your rss address and dates to the
R/list.txtfile.Use
getrssfrom scifetch to convert rss xml file into dataframe and use the following code to generatemdfiles and PR to this repo.
if (!dir.exists("content")) dir.create("content")
if (!dir.exists("content/post")) dir.create("content/post")
x = scifetch::getrss('path-to-blog-rss-xml-file')
for (i in 1:NROW(x)) {
name = gsub("^http[s]?://|/$", "", tolower(x[i, 'linkTitle']))
name = gsub("%", "", name)
name = gsub("[^a-z0-9]+", "-", name)
name = gsub("--+", "-", name)
# file name too long issue
name = substr(name, 1, 100)
p = sprintf('content/post/%s.md', paste0(name))
sink(p)
cat('---\n')
cat(yaml::as.yaml(x[i, ], ))
cat('disable_comments: true\n')
cat('---\n')
cat(as.character(x[i, 5]))
sink()
}
Recipe
- daily provides all the source code, thanks to yufree and others for their great work.
- blogdown to build the site from yihui.
- xmag layout also from yihui and yufree made some modifications here.
- scifetch to analysis RSS(support xml, atom and json) from yufree, modified from tidyRSS from RobertMyles.
- Yihui’s Twitter Feeds by yihui was the template to be hacked.
- Github Action
- Cron Job
- Your PR to rss list