The work of each card function, such as stats_card(): checks its arguments,
draws the card with card_svg() and writes it to file, as a PNG through rsvg or as the SVG
code itself.
Arguments
- kind
The card:
"stats","contributions","activity","visitors","actions"or"code".- stats
The statistics: what
collect_stats()orread_stats()return, or the folder of the history.- file
The card: a
.pngor an.svgfile.NULLreturns the SVG code instead.- theme
"dark"or"light": the colours of GitHub's dark or light mode.- days
Count the traffic and runs of the last
daysdays, up to the last full day collected: the day before the collection, which GitHub was still counting.- panels
One to three charts:
"views","clones","actions","top_viewed","top_cloned","top_starred"and"languages", or those of the other cards. By defaultc("views", "clones", "top_viewed")with traffic,c("actions", "top_starred", "languages")without.- title
The title, by default the user name.
- width
Width of the card in pixels. A PNG has twice as many, to stay sharp on high-resolution screens.
Examples
rghcard:::draw_card("stats", example_stats(), tempfile(fileext = ".svg"), "dark", 30, NULL,
NULL, 900)