codemetagenerator

Interactive generator to create a CodeMeta SoftwareSourceCode description

https://github.com/cacoco/codemetagenerator

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.5%) to scientific vocabulary

Keywords

codemeta codemeta-generator
Last synced: 6 months ago · JSON representation

Repository

Interactive generator to create a CodeMeta SoftwareSourceCode description

Basic Info
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 10
Topics
codemeta codemeta-generator
Created about 2 years ago · Last pushed about 2 years ago
Metadata Files
Readme License Codemeta

README.md

codemetagenerator

GitHub Project Status: Active – The project has reached a stable, usable state and is being actively developed. go ci build codecov GitHub Release

This project is a CodeMeta project description generator written in Go.

Installation

Manually

To install this project, you need to have Go installed on your machine. Once you have Go installed, you can clone this repository and build the project.

bash git clone https://github.com/cacoco/codemetagenerator.git cd codemetagenerator go build

Then install via go install

Via Homebrew

bash brew tap cacoco/tap brew install codemetagenerator

Usage

To run this project, you can use the following commands:

bash codemetagenerator --help

Commands

bash Available Commands: add Adds resources [authors, contributors, keywords] to the in-progress codemeta.json file clean Clean the $HOME/.codemetagenerator directory delete Delete an arbitrary key and its value from the in-progress codemeta.json file generate Generate the resultant 'codemeta.json' file to the optional output file or to the console help Help about any command licenses List or refresh cached SPDX (https://spdx.org/licenses/) license IDs new Start a new codemeta.json file for editing. When complete, run "codemetagenerator generate" to generate the resultant 'codemeta.json' file set Set the value of an arbitrary key in the in-progress codemeta.json file validate Validates a codemeta.json file

New

'New' will walk you through an interactive session and will store an "in-progress" codemeta.json file. To start a new codemeta.json file:

bash codemetagenerator new [-i | --input]

The expectation is that you will continue to add more metadata, e.g., author, contributor, or keyword.

Optionally, the -i | --input flag can be passed with a path to an input file to load as a "new" starting point. This allows for editing and updating an existing file that you can then 'generate' into the original location.

Add

'Add' helps with the addition of 3 specific fields: author, contributor, or keyword. The command provides a wizard for adding these values.

For example to add an author:

bash codemetagenerator add author

will walk you through an interactive session to create a Person or Organization author. This command can be run multiple times to add more authors. This can also be done to add one or more contributors:

bash codemetagenerator add contributor

Again, this command can be run multiple times to add more contributors.

To add one or more keywords:

bash codemetagenerator add keyword 'Java' 'JVM' 'etc'

The keyword command accepts multiple terms but can also be run multiple times to add more keywords.

Delete

'Delete' removes properties or values. This allows for removing any property or value in the codemeta.json file for a given property key specified via the Path Syntax.

bash codemetagenerator delete 'version'

Set

'Set' edits existing or inserts new properties or values in the codemeta.json file. Property keys must be specified via the Path Syntax.

bash codemetagenerator set 'relatedLink' 'https://thisisrelated.org'

Note that values can be JSON objects or arrays. E.g.,

bash codemetagenerator set 'author.-1' '{"@type":"Person", "@id":"https://orcid.org/0000-0000-1642-999Y", "givenName":"Alice", "familyName":"Smith", "email":"asmith@person.org"}'

In the Path Syntax, -1 denotes appending to an array. Thus this will append the given JSON object to the author JSON array. Note that if the given input cannot be parsed into a JSON object or array it will be treated as a string.

Similarly, to set a JSON array value:

bash codemetagenerator set 'processorRequirements' '["IA64", "IA32"]'

Will set the given JSON array as the value for the property key. Then you could append a value to the array:

bash codemetagenerator set 'processorRequirements.-1' 'x86'

Generate

'Generate' produces a resultant codemeta.json file. Optionally, the -o | --output flag can be passed which allows for specifying an output file. If this flag is not provided, the output is generated to the console.

bash codemetagenerator generate [-o | --output]

Validate

'Validate' will determine if a file is a valid CodeMeta-3.0: https://w3id.org/codemeta/v3.0 codemeta.json file based on the https://schema.org defintions and CodeMeta terms.

bash codemetagenerator validate [-i | --input]

Licenses

'Licenses' will display the list of SPDX licenses downloaded from https://spdx.org/licenses/. The list is cached and can be refreshed by passing the refresh argument.

bash codemetagenerator licenses [refresh]

Clean

'Clean' deletes the codemetagenerator tool working directory (default location is $HOME/.codemetagenerator).

bash codemetagenerator clean

Path Syntax

The path syntax for property keys follows the Syntax from the excellent tidwall/sjson project.

CodeMeta

CodeMeta is a JSON-LD file format used to describe software projects.

CodeMeta Metadata Usage

A CodeMeta instance file describes the metadata of a software object using JSON-LD notation. An instance file is typically located at the root of your repository and can contain any of the properties described on the CodeMeta terms page. The instance file is generally named, codemeta.json.

JSON-LD uses a context file to associate JSON names with IRIs (Internationalized Resource Identifier). The JSON names then serve as abbreviated, local names for the IRIs that are universally unique identifiers for concepts from widely used schemas such as schema.org.

The context file codemeta.jsonld contains the complete set of JSON properties adopted by the CodeMeta project.

Example

A full example can be seen in the ropensci/codemeter GitHub project page: https://github.com/ropensci/codemetar/blob/main/codemeta.json.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

License

Apache License 2.0

Copyright 2024 Christopher Coco

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Owner

  • Name: Christopher Coco
  • Login: cacoco
  • Kind: user
  • Location: San Francisco, CA
  • Company: ex-Twitter

CodeMeta (codemeta.json)

{
  "@context": "https://w3id.org/codemeta/3.0",
  "@type": "SoftwareSourceCode",
  "codeRepository": "https://github.com/cacoco/codemetagenerator",
  "description": "Interactive generator to create a CodeMeta SoftwareSourceCode description.",
  "developmentStatus": "Active",
  "identifier": "codemetagenerator",
  "keywords": [
    "codemeta",
    "codemeta-generator",
    "go",
    "golang"
  ],
  "license": "https://spdx.org/licenses/Apache-2.0.html",
  "maintainer": {
    "@id": "https://orcid.org/0009-0002-8232-1782",
    "@type": "Person",
    "email": "christopher@angstrom.io",
    "familyName": "Coco",
    "givenName": "Christopher"
  },
  "name": "codemetagenerator",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "go",
    "url": "https://go.dev/"
  },
  "readme": "https://github.com/cacoco/codemetagenerator/blob/main/README.md",
  "runtimePlatform": "go version go1.21.6",
  "version": "0.49.0",
  "url": "https://angstrom.io/codemetagenerator"
}

GitHub Events

Total
Last Year

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 7
proxy.golang.org: github.com/cacoco/codemetagenerator
  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 8.5%
Average: 9.0%
Dependent repos count: 9.6%
Last synced: 6 months ago

Dependencies

.github/workflows/ci.yaml actions
  • actions/checkout v4 composite
  • actions/setup-go v4 composite
  • codecov/codecov-action v3 composite
go.mod go
  • github.com/buger/goterm v1.0.3
  • github.com/fsnotify/fsnotify v1.7.0
  • github.com/google/go-cmp v0.6.0
  • github.com/hashicorp/hcl v1.0.0
  • github.com/inconshreveable/mousetrap v1.1.0
  • github.com/magiconair/properties v1.8.7
  • github.com/mitchellh/mapstructure v1.5.0
  • github.com/nexidian/gocliselect v1.0.0
  • github.com/ohler55/ojg v1.21.0
  • github.com/onsi/gomega v1.31.1
  • github.com/pelletier/go-toml/v2 v2.1.0
  • github.com/pkg/term v1.1.0
  • github.com/sagikazarmark/locafero v0.4.0
  • github.com/sagikazarmark/slog-shim v0.1.0
  • github.com/samber/lo v1.39.0
  • github.com/sourcegraph/conc v0.3.0
  • github.com/spf13/afero v1.11.0
  • github.com/spf13/cast v1.6.0
  • github.com/spf13/cobra v1.8.0
  • github.com/spf13/pflag v1.0.5
  • github.com/spf13/viper v1.18.2
  • github.com/subosito/gotenv v1.6.0
  • go.uber.org/atomic v1.9.0
  • go.uber.org/multierr v1.9.0
  • golang.org/x/exp v0.0.0-20230905200255-921286631fa9
  • golang.org/x/net v0.19.0
  • golang.org/x/sys v0.15.0
  • golang.org/x/text v0.14.0
  • gopkg.in/ini.v1 v1.67.0
  • gopkg.in/yaml.v3 v3.0.1
go.sum go
  • github.com/buger/goterm v1.0.3
  • github.com/cpuguy83/go-md2man/v2 v2.0.3
  • github.com/davecgh/go-spew v1.1.0
  • github.com/davecgh/go-spew v1.1.1
  • github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
  • github.com/frankban/quicktest v1.14.6
  • github.com/fsnotify/fsnotify v1.7.0
  • github.com/go-logr/logr v1.3.0
  • github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572
  • github.com/google/go-cmp v0.6.0
  • github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38
  • github.com/hashicorp/hcl v1.0.0
  • github.com/inconshreveable/mousetrap v1.1.0
  • github.com/kr/pretty v0.3.1
  • github.com/kr/text v0.2.0
  • github.com/magiconair/properties v1.8.7
  • github.com/mitchellh/mapstructure v1.5.0
  • github.com/nexidian/gocliselect v1.0.0
  • github.com/ohler55/ojg v1.21.0
  • github.com/onsi/ginkgo/v2 v2.15.0
  • github.com/onsi/gomega v1.31.1
  • github.com/pelletier/go-toml/v2 v2.1.0
  • github.com/pkg/term v1.1.0
  • github.com/pmezard/go-difflib v1.0.0
  • github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
  • github.com/rogpeppe/go-internal v1.9.0
  • github.com/russross/blackfriday/v2 v2.1.0
  • github.com/sagikazarmark/locafero v0.4.0
  • github.com/sagikazarmark/slog-shim v0.1.0
  • github.com/samber/lo v1.39.0
  • github.com/sourcegraph/conc v0.3.0
  • github.com/spf13/afero v1.11.0
  • github.com/spf13/cast v1.6.0
  • github.com/spf13/cobra v1.8.0
  • github.com/spf13/pflag v1.0.5
  • github.com/spf13/viper v1.18.2
  • github.com/stretchr/objx v0.1.0
  • github.com/stretchr/objx v0.4.0
  • github.com/stretchr/objx v0.5.0
  • github.com/stretchr/testify v1.3.0
  • github.com/stretchr/testify v1.7.1
  • github.com/stretchr/testify v1.8.0
  • github.com/stretchr/testify v1.8.4
  • github.com/subosito/gotenv v1.6.0
  • go.uber.org/atomic v1.9.0
  • go.uber.org/multierr v1.9.0
  • golang.org/x/exp v0.0.0-20230905200255-921286631fa9
  • golang.org/x/net v0.19.0
  • golang.org/x/sys v0.0.0-20200909081042-eff7692f9009
  • golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54
  • golang.org/x/sys v0.15.0
  • golang.org/x/text v0.14.0
  • golang.org/x/tools v0.16.1
  • gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
  • gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15
  • gopkg.in/ini.v1 v1.67.0
  • gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
  • gopkg.in/yaml.v3 v3.0.1
.github/workflows/release.yaml actions
  • actions/checkout v4 composite
  • actions/setup-go v4 composite
  • crazy-max/ghaction-import-gpg v6 composite
  • goreleaser/goreleaser-action v5 composite
  • jossef/action-set-json-field v2.1 composite