Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update readme #78

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 2 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,5 @@
# makeregistry

The goal of makeregistry is to create the JSON that's used to display packages on ropensci.org/packages
This is an R package used to create the JSON file in https://github.com/ropensci/roregistry that is in turn used to display packages on ropensci.org/packages.

## Installation

``` r
remotes::install_github("ropensci/codemetar")
remotes::install_github("ropenscilabs/makeregistry")
```

## Example

This is a basic example which shows you how to solve a common problem.

The codemeta creation needs to be run in the server where we have a repos/ folder with all clones. The `old_cm` parameter allows to use older entries for packages for which CodeMeta creation fails for some reason.

``` r

if(!file.exists("raw_cm.json")){
old_cm <- "https://github.com/ropensci/roregistry/blob/gh-pages/raw_cm.json?raw=true"
}else{
old_cm <- "raw_cm.json"
}

codemeta <- makeregistry::create_codemetas(old_cm = old_cm)

jsonlite::write_json(codemeta, path = "raw_cm.json",
pretty = TRUE, auto_unbox = TRUE)

makeregistry::create_registry(cm = "raw_cm.json",
outpat = "registry.json")

# find some way to upload raw_cm.json and registry.json to the roregistry repo.
```
This package includes one main function, `create_registry()`, which is run in the ["build-registry" workflow in ropensci/registry](https://github.com/ropensci/roregistry/blob/gh-pages/.github/workflows/build-registry.yml).
Loading