Skip to content

Commit

Permalink
Quick Save
Browse files Browse the repository at this point in the history
  • Loading branch information
R. S. Doiel committed Feb 13, 2025
1 parent 282bfa9 commit 7f0a61f
Show file tree
Hide file tree
Showing 45 changed files with 286 additions and 147 deletions.
7 changes: 4 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ management systems. Current implementation targets Invenio-RDM."
authors:
- family-names: Doiel
given-names: R. S.
orcid: "https://orcid.org/0000-0003-0900-6903"
orcid: ""
- family-names: Morrell
given-names: Tom
orcid: "https://orcid.org/0000-0001-9266-5146"
orcid: ""


repository-code: "https://github.com/caltechlibrary/irdmtools"
version: 0.0.89
version: 0.0.90
license-url: "https://caltechlibrary.github.io/irdmtools/LICENSE"
keywords: [ "institutional repository", "data
management", "Invenio", "Invenio-RDM" ]
date-released: 2025-02-13
2 changes: 1 addition & 1 deletion about.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<section>
<h1 id="about-this-software">About this software</h1>
<h2 id="irdmtools-0.0.89">irdmtools 0.0.89</h2>
<h2 id="irdmtools-0.0.90">irdmtools 0.0.90</h2>
<h3 id="authors">Authors</h3>
<ul>
<li>R. S. Doiel</li>
Expand Down
10 changes: 5 additions & 5 deletions about.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ management systems. Current implementation targets Invenio-RDM."
authors:
- family-names: Doiel
given-names: R. S.
orcid: "https://orcid.org/0000-0003-0900-6903"
orcid: ""
- family-names: Morrell
given-names: Tom
orcid: "https://orcid.org/0000-0001-9266-5146"
orcid: ""

repository-code: "https://github.com/caltechlibrary/irdmtools"
version: 0.0.89
version: 0.0.90
license-url: "https://caltechlibrary.github.io/irdmtools/LICENSE"
keywords: [ "institutional repository", "data
management", "Invenio", "Invenio-RDM" ]

date-released: 2025-02-13
---

About this software
===================

## irdmtools 0.0.89
## irdmtools 0.0.90

### Authors

Expand Down
6 changes: 5 additions & 1 deletion cmd/ep3util/ep3util.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ var (
# DESCRIPTION
__{app_name}__ provides a quick wrapper around EPrints 3.3 REST API.
By default {app_name} looks for five environment variables.
By default {app_name} looks for five environment variables.
# ENVIRONMENT
These can be specified in the shell or in a ".env" file.
REPO_ID
: the EPrints repository id (name of database and archive subdirectory).
Expand Down
14 changes: 14 additions & 0 deletions cmd/eprint2rdm/eprint2rdm.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,20 @@ customized resource type and person role mapping for the content
you harvest. This will allow you to be substantially closer to the
final record form needed to crosswalk EPrints data into Invenio RDM.
# ENVIRONMENT
Environment variables can be set at the shell level or in a ".env" file.
EPRINT_USER
: The eprint user id to access the REST API
EPRINT_PASSWORD
: The eprint user password to access the REST API
EPRINT_HOST
: The hostname of the EPrints service
# OPTIONS
-help
Expand Down
5 changes: 4 additions & 1 deletion cmd/eprintrest/eprintrest.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,11 @@ NOTE: the rest API does not enforce user permissions, restrictions
or roles. It is a minimal READ ONLY re-implementation of the EPrints 3.3
REST API!
# ENVIRONMENT
The application is configured from the environment. The following
environment variables need to be set.
environment variables need to be set. The environment variables can
be set at the shell level or in a ".env" file.
REPO_ID
: The repository id string (e.g. caltechauthors). Also the name of the database for the repository.
Expand Down
14 changes: 14 additions & 0 deletions cmd/rdm2eprint/rdm2eprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,20 @@ configuration. It can read data from a previously harvest RDM record
or directly from RDM via the API url. The tool is intended to run
in a pipe line so have minimal options.
# ENVIRONMENT
The following environment variables can be set at the shell level or
in a ".env" file.
RDM_URL
: The URL to the RDM instance
RDMTOK
: The application token needed to access the RDM API
RDM_COMMUNITY_ID
: The community id used for the RDM collection
# OPTIONS
-help
Expand Down
4 changes: 4 additions & 0 deletions cmd/rdmds2citations/rdmds2citations.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ that takes an dataset collection of RDM records and converts then
to a citations dataset collection. It can do so for a single record id
or read a JSON list of record ids to migrate.
# ENVIRONMENT
The environment variables can be set with in the shell environment
or read from a ".env" file.
RDM_DS is the dataset collection holding the eprint records.
Expand Down
5 changes: 5 additions & 0 deletions cmd/rdmutil/rdmutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,15 @@ database. It does NOT use the OAI-PMH API since that is far too slow.
{app_name} uses environment variables for configuration. For accessing the
JSON API it uses the following.
dataset related environment variables (i.e. for harvest action)
__{app_name}__ environment variable for storing harvested content.
# ENVIRONMENT
Environment can be read from the shell or loaded via a ".env" file.
C_NAME
: A dataset collection name. Collection must exist.
See ` + "`" + `dataset help init` + "`" + `
Expand Down
199 changes: 99 additions & 100 deletions codemeta.json
Original file line number Diff line number Diff line change
@@ -1,101 +1,100 @@
{
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"@type": "SoftwareSourceCode",
"license": "https://caltechlibrary.github.io/irdmtools/LICENSE",
"codeRepository": "https://github.com/caltechlibrary/irdmtools",
"dateCreated": "2022-10-27",
"dateRelease": "2024-09-25",
"dateModified": "2024-09-25",
"issueTracker": "https://github.com/caltechlibrary/irdmtools/issues",
"name": "irdmtools",
"version": "0.0.89",
"description": "Tools for working with institutional repositories and data management systems. Current implementation targets Invenio-RDM.",
"applicationCategory": "library science",
"releaseNotes": "Address case where CrossRef record only has family name populated",
"developmentStatus": "WIP",
"keywords": [
"institutional repository",
"data management",
"Invenio",
"Invenio-RDM"
],
"programmingLanguage": [
"Go",
"Python"
],
"operatingSystem": [
"Linux",
"macOS",
"Windows"
],
"softwareRequirements": [
"Go >= 1.23.1",
"PostgreSQL >= 16",
"PostgREST >= 12",
"Pandoc >= 3",
"MySQL >= 8",
"SQLite >= 3"
],
"relatedLink": [
"https://inveniosoftware.org/products/rdm/",
"https://eprints.org"
],
"author": [
{
"@type": "Person",
"@id": "https://orcid.org/0000-0003-0900-6903",
"givenName": "R. S.",
"familyName": "Doiel",
"email": "[email protected]",
"affiliation": {
"@type": "Organization",
"name": "Caltech Library, Caltech"
}
},
{
"@type": "Person",
"@id": "https://orcid.org/0000-0001-9266-5146",
"givenName": "Tom",
"familyName": "Morrell",
"email": "[email protected]",
"affiliation": {
"@type": "Organization",
"name": "Caltech Library, Caltech"
}
}
],
"contributor": [
{
"@type": "Person",
"@id": "https://orcid.org/0000-0002-0026-2516",
"givenName": "Kathy",
"familyName": "Johnson",
"email": "[email protected]",
"affiliation": {
"@type": "Organization",
"name": "Caltech Library, Caltech"
}
},
{
"@type": "Person",
"@id": "https://orcid.org/0000-0002-6539-638X",
"givenName": "George",
"familyName": "Porter",
"email": "[email protected]",
"affiliation": {
"@type": "Organization",
"name": "Caltech Library, Caltech"
}
},
{
"@type": "Person",
"@id": "https://orcid.org/0000-0002-0102-996X",
"givenName": "Cynthia",
"familyName": "Kiser",
"affiliation": {
"@type": "Organization",
"name": "Caltech IMSS, Caltech"
}
}
]
}
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"type": "SoftwareSourceCode",
"codeRepository": "https://github.com/caltechlibrary/irdmtools",
"author": [
{
"id": "https://orcid.org/0000-0003-0900-6903",
"type": "Person",
"givenName": "R. S.",
"familyName": "Doiel",
"affiliation": {
"@type": "Organization",
"name": "Caltech Library, Caltech"
},
"email": "[email protected]"
},
{
"id": "https://orcid.org/0000-0001-9266-5146",
"type": "Person",
"givenName": "Tom",
"familyName": "Morrell",
"affiliation": {
"@type": "Organization",
"name": "Caltech Library, Caltech"
},
"email": "[email protected]"
}
],
"contributor": [
{
"id": "https://orcid.org/0000-0002-0026-2516",
"type": "Person",
"givenName": "Kathy",
"familyName": "Johnson",
"affiliation": {
"@type": "Organization",
"name": "Caltech Library, Caltech"
},
"email": "[email protected]"
},
{
"id": "https://orcid.org/0000-0002-6539-638X",
"type": "Person",
"givenName": "George",
"familyName": "Porter",
"affiliation": {
"@type": "Organization",
"name": "Caltech Library, Caltech"
},
"email": "[email protected]"
},
{
"id": "https://orcid.org/0000-0002-0102-996X",
"type": "Person",
"givenName": "Cynthia",
"familyName": "Kiser",
"affiliation": {
"@type": "Organization",
"name": "Caltech IMSS, Caltech"
}
}
],
"dateCreated": "2022-10-27",
"dateModified": "2025-02-13",
"datePublished": "2025-02-13",
"description": "Tools for working with institutional repositories and data management systems. Current implementation targets Invenio-RDM.",
"keywords": [
"institutional repository",
"data management",
"Invenio",
"Invenio-RDM"
],
"name": "irdmtools",
"license": "https://caltechlibrary.github.io/irdmtools/LICENSE",
"operatingSystem": [
"Linux",
"macOS",
"Windows"
],
"programmingLanguage": [
"Go",
"Python"
],
"relatedLink": [
"https://inveniosoftware.org/products/rdm/",
"https://eprints.org"
],
"softwareRequirements": [
"Go >= 1.23.1",
"PostgreSQL >= 16",
"PostgREST >= 12",
"Pandoc >= 3",
"MySQL >= 8",
"SQLite >= 3"
],
"version": "0.0.90",
"developmentStatus": "WIP",
"issueTracker": "https://github.com/caltechlibrary/irdmtools/issues",
"releaseNotes": "This releasee adds support for \".env\" files to the Config struct and funcs."
}
8 changes: 8 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import (

// 3rd Party Libraries
"gopkg.in/yaml.v3"
"github.com/joho/godotenv"
)

// Config holds the common configuration used by all irdmtools
Expand Down Expand Up @@ -170,6 +171,10 @@ func (cfg *Config) LoadEnv(prefix string) error {
if cfg == nil {
cfg = NewConfig()
}
if err := godotenv.Load(); err != nil {
fmt.Fprint(os.Stderr, "WARNING: failed to find or read .env file, %s\n", err)
}

if repoID := os.Getenv(prefixVar("REPO_ID", prefix)); repoID != "" {
cfg.RepoID = repoID
}
Expand Down Expand Up @@ -246,6 +251,9 @@ func (cfg *Config) LoadConfig(configFName string) error {
if cfg == nil {
cfg = NewConfig()
}
if err := godotenv.Load(); err != nil {
fmt.Fprint(os.Stderr, "WARNING: failed to find or read .env file, %s\n", err)
}
if configFName == "" {
return fmt.Errorf("configuration filename is an empty string")
}
Expand Down
4 changes: 2 additions & 2 deletions doi2rdm.1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%doi2rdm(1) irdmtools user manual | version 0.0.89 5850ad61
%doi2rdm(1) irdmtools user manual | version 0.0.90 282bfa93
% R. S. Doiel and Tom Morrell
% 2024-10-03
% 2025-02-13

# NAME

Expand Down
Loading

0 comments on commit 7f0a61f

Please sign in to comment.