Repository navigation
Releases
rghcard 0.4.0
-
Four new cards, so that each card stays uncluttered:
activity_card(): the pull requests, issues, reviews and new repositories of the user, their
followers, their contributions by type as a ring, their contributions by day of the week,
and the repositories they commit to most.visitors_card(): the unique visitors and cloners of the repositories in the last 14 days,
the sites that sent them and the pages they viewed.actions_card(): the GitHub Actions runs, the share that succeeded, those that failed, the
time they took, the busiest workflows and the repositories whose runs take longest.code_card(): the bytes of code in each language as a ring, the stars at the end of each
month, the largest repositories, and the forks and watchers.
Any card can show the charts of any other:
panelschooses from all of them. The article
More cards explains them. -
The rghcard action draws the six cards, as SVG files: sharp on any screen, and a tenth of the
size of a PNG, which counts in a profile repository that keeps every version of its cards. Its
new inputs arecards, which chooses the cards,format,svg,pngor both, and the charts
of the new cards,activity-panels,visitors-panels,actions-panelsandcode-panels.
daysalso sets the days of the GitHub Actions card. -
A profile that shows the PNG cards of rghcard 0.3.0 shows cards that are no longer updated, and
the run warns of them: change.pngto.svgin its README and delete the PNG cards, or keep
PNG cards withformat: png. -
collect_stats()collects more, in new tables of the history:traffic(GitHub's totals of
its 14 days, with the unique visitors and cloners),referrersandpages(the ten top
referring sites and the ten most viewed pages of each repository),languages(the bytes of
code of each repository in each language),stars(the time of each star, not who gave it),
profile(the followers, and the users followed) andcontribution_types(the contributions
of each year by type).reposhas the watchers of each repository, andactionsthe start
and the end of each run. A history of rghcard 0.3.0 still draws every card: the new tables
start with the next collection, and the runs collected before have no times. -
use_rghcard_action()has the argumentscardsandformat, and prints the README code of the
cards it draws. -
A ring whose legend has long names, such as "Jupyter Notebook", is a little smaller and thinner,
so that the names fit, with the same room for the total in the middle.
Latest build
Built automatically from main: the source tarball and the PDF manual.
rghcard 0.3.0
- The languages, by commits (
"commit_languages") and by repositories ("languages"), are rings:
each language in the colour that GitHub gives it, as in the language bar of a repository, with
a legend of the colour, the name and the share of each, and the total in the middle. A ring has
five languages at most, and the rest together as "Other". The colours come from GitHub
Linguist, MIT licence (inst/COPYRIGHTS);data-raw/language-colors.Rupdates them. - The rghcard action reads the contributions with the token of its workflow, which sees the
profile as others see it. With the token of the user, a fine-grained one that reads only the
traffic, GitHub left the private contributions out: on a profile that shows them, the card had
half of them and shorter streaks.collect_stats()has a new argument,contributions_token,
for the token of the contributions. use_rghcard_action()prints a link that fills in GitHub's form for the token: its name, the
one permission it needs and no expiration, which GitHub would otherwise set to 30 days. The
README and the Get started article give the same link, and the README says how to create the
workflow on GitHub's website.
rghcard 0.2.0
- rghcard is also a GitHub Action, for those who do not use R:
uses: sedzinfo/rghcard@v0in a
workflow of the profile repository installs R and rghcard on GitHub's machine, collects the
statistics, draws both cards and commits them, with their history. Its inputs choose the themes,
the days and the charts of the cards, private repositories and forks, the folders, and whether
to commit. The README shows the workflow and the inputs. use_rghcard_action()writes a workflow that runs the action.
rghcard 0.1.0
First version.
collect_stats()collects the statistics of the repositories a GitHub user owns: repositories,
stars, forks, languages, release downloads and GitHub Actions runs, and, with a token of the
user, page views and clones. It adds them to a history of CSV files, which keeps the traffic
beyond the 14 days that GitHub keeps. Private repositories and forks are left out unless asked
for. A token that GitHub refuses, because it expired or was revoked, stops it with a message on
how to replace it.stats_card()draws the statistics as a card for a GitHub profile, a PNG or an SVG file, in the
colours of GitHub's dark or light mode: a row of key figures and up to three charts, from page
views, clones and GitHub Actions runs per day, the most viewed, cloned and starred repositories,
and the languages.contributions_card()draws the contributions of the user, the numbers of the contribution
graph of their profile, as a card: the contributions since joining GitHub and in the last 12
months, the commits, the current and longest streaks, the contributions per month, and the
languages by commits and by repositories.collect_stats()collects them from GitHub's GraphQL
API.use_rghcard_action()writes a GitHub Actions workflow into a profile repository, which
installs the latest release of rghcard, collects the statistics, draws both cards and commits
them every week.read_stats()reads the history again, andexample_stats()returns made-up statistics to try
the cards without a token.