github_user_name   <- "petermeissner"
codecov_user_name  <- github_user_name
travis_user_name   <- github_user_name
appveyor_user_name <- github_user_name
knitr::opts_chunk$set(
  fig.path = "man/figures/README-"
)
options("width"=110)

# get package info
tmp <- packageDescription( "caldav" )
#tmp <- packageDescription( basename(getwd()) )

package_name <- tmp$Package
cat("#", tmp$Title)

Status

AppVeyor build status Codecov

filelist.R   <- list.files("R", recursive = TRUE, pattern="\\.R$", ignore.case = TRUE, full.names = TRUE)
filelist.tests   <- list.files("tests", recursive = TRUE, pattern="\\.R$", ignore.case = TRUE, full.names = TRUE)
filelist.cpp <- list.files("src", recursive = TRUE, pattern="\\.cpp$", ignore.case = TRUE, full.names = TRUE)
lines.R      <- unlist(lapply(filelist.R, readLines))
lines.tests  <- unlist(lapply(filelist.tests, readLines))
lines.cpp    <- unlist(lapply(filelist.cpp, readLines))
length.R     <- length(grep("(^\\s*$)|(^\\s*#)|(^\\s*//)", lines.R,  value = TRUE, invert = TRUE))
length.tests <- length(grep("(^\\s*$)|(^\\s*#)|(^\\s*//)", lines.tests,  value = TRUE, invert = TRUE))
length.cpp   <- length(grep("(^\\s*$)|(^\\s*#)|(^\\s*//)", lines.cpp,  value = TRUE, invert = TRUE))

lines of R code: r length.R, lines of test code: r length.tests

Version

source_files <-
  grep(
    "/R/|/src/|/tests/",
    list.files(recursive = TRUE, full.names = TRUE),
    value = TRUE
  )
last_change <-
  as.character(
    format(max(file.info(source_files)$mtime), tz="UTC")
  )
cat(tmp$Version, "(",last_change,")")

Description

cat(tmp$Description)

License

cat(tmp$License, "<br>")
cat(tmp$Author)

Citation

cat("```r\n")
cat("citation(\"",package_name,"\")", sep = "")
cat("\n```\n")
cat("```r\n")
print_text <- capture.output(print(citation(package_name), style = "text"))
cat(gsub("_", "", print_text))
cat("\n```\n")

BibTex for citing

cat("```r\n")
cat("toBibtex(citation(\"",package_name,"\"))", sep = "")
cat("\n```\n")
cat("```\n")
cat(as.character(toBibtex(citation(package_name))), sep = "\n")
cat("\n```\n")

Installation

Stable version from CRAN:

cat("```r\n")
cat("install.packages(\"",package_name,"\")", sep = "")
cat("\n```\n")

Usage

starting up ...

cat("```\n")
cat("library(\"",package_name,"\")", sep = "")
cat("\n```\n")
cal_data <- 
  caldav_get_all_simple_auth(
    url = "https://nextcloud03.webo.cloud/remote.php/dav/calendars/usah_nameahh/personal/",
    user = "usah_nameahh",
    password =  "*********"
  )

cat(cal_data$calendar[1])
## BEGIN:VCALENDAR
## CALSCALE:GREGORIAN
## VERSION:2.0
## PRODID:-//IDN nextcloud.com//Calendar app 2.0.3//EN
## BEGIN:VEVENT
## CREATED:20200904T111126Z
## DTSTAMP:20200907T200537Z
## LAST-MODIFIED:20200907T200537Z
## SEQUENCE:3
## UID:8d9e7fb1-ea44-4986-80bb-ab009924c27e
## DTSTART;TZID=Europe/Berlin:20200904T140026
## DTEND;TZID=Europe/Berlin:20200904T150026
## SUMMARY:Whatever
## RRULE:FREQ=WEEKLY;BYDAY=FR,WE
## END:VEVENT
## BEGIN:VTIMEZONE
## TZID:Europe/Berlin
## BEGIN:DAYLIGHT
## TZOFFSETFROM:+0100
## TZOFFSETTO:+0200
## TZNAME:CEST
## DTSTART:19700329T020000
## RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
## END:DAYLIGHT
## BEGIN:STANDARD
## TZOFFSETFROM:+0200
## TZOFFSETTO:+0100
## TZNAME:CET
## DTSTART:19701025T030000
## RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
## END:STANDARD
## END:VTIMEZONE
## END:VCALENDAR  


petermeissner/caldav documentation built on Sept. 13, 2020, 12:16 a.m.