make_link_table: Create a table of parsed URLs from a single Episode object.

View source: R/make_link_table.R

make_link_tableR Documentation

Description

Create a table of parsed URLs from a single Episode object.

Usage

make_link_table(yrn)

Arguments

yrn

an Episode class object

Value

a data frame containing the following columns:

  • scheme The scheme for the URL (http, https, mailto, ftp, etc...)

  • server The first part of the URL (e.g. doi.org or github.com)

  • port the port number if it exists (note: liquid tags produce weird ports)

  • user associated with port, usually blank

  • path the path element of the link

  • query anything after a "?" in a URL

  • fragment navigation within a page; anything after "#" in a URL

  • orig the original, unparsed URL

  • text the text associated with the URL (stripped of markup)

  • title the title (if any) of the URL

  • type the type of URL (image or link)

  • rel if it's a relative URL, the name of the anchor, otherwise NA.

  • anchor logical if the URL is an anchor

  • sourcepos the source position in the file

  • filepath relative path to the source file

  • parents list column of paths to the build parents

  • node a list column of the nodes with the links

Examples

loop <- fs::path(lesson_fragment(), "_episodes", "14-looping-data-sets.md")
make_link_table(Episode$new(loop))

carpentries/pegboard documentation built on Nov. 13, 2024, 8:53 a.m.