{"id":14068855,"url":"https://github.com/jaredlander/RepoGenerator","last_synced_at":"2025-07-30T04:32:35.005Z","repository":{"id":56937225,"uuid":"132343936","full_name":"jaredlander/RepoGenerator","owner":"jaredlander","description":"This builds a repo from a template for use in workshop instruction","archived":false,"fork":false,"pushed_at":"2018-09-08T19:32:30.000Z","size":329,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-12T21:01:40.792Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaredlander.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-06T14:03:18.000Z","updated_at":"2023-08-05T01:04:08.000Z","dependencies_parsed_at":"2022-08-21T01:10:13.142Z","dependency_job_id":null,"html_url":"https://github.com/jaredlander/RepoGenerator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jaredlander/RepoGenerator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredlander%2FRepoGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredlander%2FRepoGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredlander%2FRepoGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredlander%2FRepoGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaredlander","download_url":"https://codeload.github.com/jaredlander/RepoGenerator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredlander%2FRepoGenerator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267809570,"owners_count":24147496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-13T07:06:26.749Z","updated_at":"2025-07-30T04:32:34.447Z","avatar_url":"https://github.com/jaredlander.png","language":"R","readme":"---\noutput:\n  md_document:\n    variant: markdown_github\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"README-\"\n)\n```\n\n[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/RepoGenerator)](https://cran.r-project.org/package=RepoGenerator)\n[![Travis-CI Build Status](https://travis-ci.org/jaredlander/RepoGenerator.svg?branch=master)](https://travis-ci.org/jaredlander/RepoGenerator)\n[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/jaredlander/RepoGenerator?branch=master\u0026svg=true)](https://ci.appveyor.com/project/jaredlander/RepoGenerator)\n[![Coverage Status](https://img.shields.io/codecov/c/github/jaredlander/RepoGenerator/master.svg)](https://codecov.io/github/jaredlander/RepoGenerator?branch=master)\n\n# RepoGenerator\n\nGenerates a project and repo for easy initialization of a workshop.\n\n# GitHub Token\n\nThis is dependent on having a GitHub [Personal Access Token](https://blog.github.com/2013-05-16-personal-api-tokens/) (PAT).\n\nFirst, go to GitHub user settings. Then click on `Developer Settings`.\n\n```{r settings-image,echo=FALSE}\nknitr::include_graphics('tools/readme/GitHub-Settings.png')\n```\n\nOn the following page click `Personal Access Token`.\n\n```{r dev-settings-image,echo=FALSE}\nknitr::include_graphics('tools/readme/GitHub-Developer-Settings.png')\n```\n\nThen click `Generate new token`.\n\n```{r token-generation-image,echo=FALSE}\nknitr::include_graphics('tools/readme/GitHub-Token-Generation.png')\n```\n\nFinally, select the `Repo` option.\n\n```{r repo-option-image,echo=FALSE}\nknitr::include_graphics('tools/readme/PAT-Options.png')\n```\n\nThe way some of the packages this package depends on are written, require that this code be saved in an environment variable. The best way to do this is to have a file named `.Renviron` in your home directory which can be located with `Sys.getenv('HOME')`. The file should look like this.\n\n```{sh,eval=FALSE}\nGITHUB_PAT='LongStringOfNumbersAndLetters'\n```\n\n# Generating a Project\n\nTo create a project and turn it into a GitHub repo use the `createRepo` function.\n\nIf you have a list of data files stored somewhere that you want the user to download, build a `data.frame` listing at least the local name to be used for the data, the URL where the data are stored and the mode to write the data such as 'w' or 'wb'. If you don't provide one, the default data stored in my [data.world](https://data.world/landeranalytics/training) repo will be used. You should also specify a set of packages for the users to install.\n\n```{r data-list}\ndata(datafiles, package='RepoGenerator')\ndatafiles[, c('Local', 'Remote', 'Mode')]\n```\n\n```{r package-list}\npackages \u003c- c('caret', 'coefplot','DBI', 'dbplyr', 'doParallel', 'dygraphs', \n              'foreach', 'ggthemes', 'glmnet', 'jsonlite', 'leaflet', 'odbc', \n              'recipes', 'rmarkdown', 'rprojroot', 'RSQLite', 'rvest', \n              'tidyverse', 'threejs', 'usethis', 'UsingR', 'xgboost', 'XML', \n              'xml2')\n```\n\n```{r example,eval=FALSE}\ncreateRepo(\n    # the name to use for the repo and project\n    name='WorkshopExampleRepo', \n    # the location on disc to build the project\n    path='~/WorkshopExampleRepo',\n    # the list of data files for the user to download\n    data=datafiles,\n    # vector of packages the user should install\n    packages=packages,\n    # the GitHub username to create the repo for\n    user='jaredlander',\n    # the new repo's README has the name of who is organizing the class\n    organizer='Lander Analytics',\n    # the name of the environment variable storing the GitHub PAT\n    token='MyGitHubPATEnvVar'\n)\n```\n\n# GitHub\n\nThe earlier code created [this repo](https://github.com/jaredlander/WorkshopExampleRepo) on GitHub. You can point your attendees to the repo you created for easy instructions on getting ready for the workshop!\n","funding_links":[],"categories":["R"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredlander%2FRepoGenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredlander%2FRepoGenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredlander%2FRepoGenerator/lists"}