search_github: Search GitHub and build a script index data frame

Description Usage Arguments Value Author(s) Examples

View source: R/search_github.R

Description

Use GitHub search API to search for YML files in phuse-scripts repository and output the list.

Usage

1
2
3
4
5
6
search_github(filename = "*.yml",
  rep_url = "https://github.com/phuse-org/phuse-scripts",
  rep_dir = "tree/master",
  rep_base = "https://raw.githubusercontent.com/phuse-org/phuse-scripts/master",
  out_type = "fn", work_dir = NULL, output_fn = NULL,
  days_to_update = 7, fn_only = FALSE)

Arguments

filename

file names to be searched; default to *.yml.

rep_url

a URL for a remote repository and default to 'https://github.com/phuse-org/phuse-scripts'

rep_dir

rep dir for file name; default to 'tree/master'

rep_base

a URL for repository base folder; default to "https://github.com/phuse-org/phuse-scripts/raw/master"

out_type

output type; default to 'fn' - just file names.

work_dir

a local directory to host the files containing a list of YML files; default to tempdir()/myRepo

output_fn

a CSV file name for outputing a list of YML files; default to "repo_name_yml.csv

days_to_update

number of days before the output_fn is updated; default to 7 days. Set it to a negative number make it to update immediately.

fn_only

return file name only; default to FALSE

Value

a list of YML files

Author(s)

Hanming Tu

Examples

1
2
3
4
## Not run: 
  r1 <- search_github('*.yml')

## End(Not run)

phuse documentation built on March 26, 2020, 6:31 p.m.