Skip to content

Commit

Permalink
Merge branch 'main' of github.com:caltechlibrary/irdmtools into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
rsdoiel committed Apr 15, 2024
2 parents f867f97 + b104e3d commit b02c864
Show file tree
Hide file tree
Showing 20 changed files with 31 additions and 34 deletions.
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ authors:


repository-code: "https://github.com/caltechlibrary/irdmtools"
version: 0.0.80
version: 0.0.81
license-url: "https://caltechlibrary.github.io/irdmtools/LICENSE"
keywords: [ "institutional repository", "data
management", "Invenio", "Invenio-RDM" ]
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.80">irdmtools 0.0.80</h2>
<h2 id="irdmtools-0.0.81">irdmtools 0.0.81</h2>
<h3 id="authors">Authors</h3>
<ul>
<li>R. S. Doiel</li>
Expand Down
4 changes: 2 additions & 2 deletions about.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ authors:
orcid: "https://orcid.org/0000-0001-9266-5146"

repository-code: "https://github.com/caltechlibrary/irdmtools"
version: 0.0.80
version: 0.0.81
license-url: "https://caltechlibrary.github.io/irdmtools/LICENSE"
keywords: [ "institutional repository", "data
management", "Invenio", "Invenio-RDM" ]
Expand All @@ -24,7 +24,7 @@ management", "Invenio", "Invenio-RDM" ]
About this software
===================

## irdmtools 0.0.80
## irdmtools 0.0.81

### Authors

Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dateModified": "2024-04-12",
"issueTracker": "https://github.com/caltechlibrary/irdmtools/issues",
"name": "irdmtools",
"version": "0.0.80",
"version": "0.0.81",
"description": "Tools for working with institutional repositories and data management systems. Current implementation targets Invenio-RDM.",
"applicationCategory": "library science",
"releaseNotes": "Proof of concept and refinements, piloting in production, bug fixes",
Expand Down
29 changes: 12 additions & 17 deletions datacite.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,30 +70,25 @@ func getObjectTitle(object map[string]interface{}) string {
return ""
}

// getObjectCiteProcType retrieves the `.access.types.citeproc` value if exists.
func getObjectCiteProcType(object map[string]interface{}) string {
// getObjectResourceType retrieves the `.data.types.resourceTypeGeneral` value if exists.
//
// ```
// resourceType := getObjectResourceType(object)
// ```
func getObjectResourceType(object map[string]interface{}) string {
if attrs, ok := getObjectDataAttributes(object); ok {
if types, ok := attrs["types"].(map[string]string); ok {
if citeproc, ok := types["citeproc"]; ok {
return citeproc
if types, ok := attrs["types"].(map[string]interface{}); ok {
// The path to type informaiton is .access.types, this has a map of types
// for various formats (e.g. .bibtex, .citeproc, .schemeOrg, .resourceType, .resourceTypeGeneral.
// Tom says `.resourceTypeGeneral` makes the most sense here.
if resourceType, ok := types["resourceTypeGeneral"].(string); ok {
return resourceType
}
}
}
return ""
}

// getObjectResourceType retrives the resource type from objects.message.type
// runs normalize
func getObjectResourceType(object map[string]interface{}) string {
// The path to type informaiton is .access.types, this has a map of types
// for various formats (e.g. .bibtex, .citeproc, .schemeOrg, .resourceType, .resourceTypeGeneral.
// I think using the .citeproc value makes the most sense here.
if data, ok := getObjectData(object); ok {
return getObjectCiteProcType(data)
}
return ""
}

// getObjectDescription retrieves the description (a.k.a. abstract) from the DataCite Object
// See example JSON <https://api.test.datacite.org/dois/10.82433/q54d-pf76?publisher=true&affiliation=true>
func getObjectDescription(object map[string]interface{}) string {
Expand Down
2 changes: 1 addition & 1 deletion doi2rdm.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%doi2rdm(1) irdmtools user manual | version 0.0.80 adeba12e
%doi2rdm(1) irdmtools user manual | version 0.0.81 57ce1991
% R. S. Doiel and Tom Morrell
% 2024-04-15

Expand Down
2 changes: 2 additions & 0 deletions doi2rdm.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ contributor_types:
# Map the CrossRef resource type to the RDM type
resource_types:
article: publication-article
Preprint: publication-preprint
preprint: publication-preprint
journal-article: publication-article
book: publication-book
book_section: publication-section
Expand Down
2 changes: 1 addition & 1 deletion ep3ds2citations.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%ep3ds2citations(1) irdmtools user manual | version 0.0.80 adeba12e
%ep3ds2citations(1) irdmtools user manual | version 0.0.81 57ce1991
% R. S. Doiel and Tom Morrell
% 2024-04-15

Expand Down
2 changes: 1 addition & 1 deletion ep3util.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%ep3util(1) irdmtools user manual | version 0.0.80 adeba12e
%ep3util(1) irdmtools user manual | version 0.0.81 57ce1991
% R. S. Doiel and Tom Morrell
% 2024-04-15

Expand Down
2 changes: 1 addition & 1 deletion eprint2rdm.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%eprint2rdm(1) irdmtools user manual | version 0.0.80 adeba12e
%eprint2rdm(1) irdmtools user manual | version 0.0.81 57ce1991
% R. S. Doiel and Tom Morrell
% 2024-04-15

Expand Down
2 changes: 1 addition & 1 deletion eprintrest.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%eprintrest(1) irdmtools user manual | version 0.0.80 adeba12e
%eprintrest(1) irdmtools user manual | version 0.0.81 57ce1991
% R. S. Doiel and Tom Morrell
% 2024-04-15

Expand Down
2 changes: 1 addition & 1 deletion installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Set the package name and version to install
#
PACKAGE="irdmtools"
VERSION="0.0.80"
VERSION="0.0.81"
GIT_GROUP="caltechlibrary"
RELEASE="https://github.com/$GIT_GROUP/$PACKAGE/releases/tag/v$VERSION"

Expand Down
Binary file added pagefind/fragment/unknown_38a9c6a.pf_fragment
Binary file not shown.
Binary file added pagefind/index/unknown_3bb87c0.pf_index
Binary file not shown.
2 changes: 1 addition & 1 deletion pagefind/pagefind-entry.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"1.0.4","languages":{"unknown":{"hash":"unknown_bae29fe6a2cba1d","wasm":null,"page_count":20}}}
{"version":"1.0.4","languages":{"unknown":{"hash":"unknown_ec40886e17d121c","wasm":null,"page_count":20}}}
Binary file added pagefind/pagefind.unknown_ec40886e17d121c.pf_meta
Binary file not shown.
2 changes: 1 addition & 1 deletion people2vocabulary.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%people2vocabulary(1) irdmtools user manual | version 0.0.80 adeba12e
%people2vocabulary(1) irdmtools user manual | version 0.0.81 57ce1991
% R. S. Doiel
% 2024-04-15

Expand Down
2 changes: 1 addition & 1 deletion rdm2eprint.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%rdm2eprint(1) irdmtools user manual | version 0.0.80 adeba12e
%rdm2eprint(1) irdmtools user manual | version 0.0.81 57ce1991
% R. S. Doiel and Tom Morrell
% 2024-04-15

Expand Down
2 changes: 1 addition & 1 deletion rdmutil.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%rdmutil(1) irdmtools user manual | version 0.0.80 adeba12e
%rdmutil(1) irdmtools user manual | version 0.0.81 57ce1991
% R. S. Doiel and Tom Morrell
% 2024-04-15

Expand Down
4 changes: 2 additions & 2 deletions version.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import (

const (
// Version number of release
Version = "0.0.80"
Version = "0.0.81"

// ReleaseDate, the date version.go was generated
ReleaseDate = "2024-04-15"

// ReleaseHash, the Git hash when version.go was generated
ReleaseHash = "adeba12e"
ReleaseHash = "57ce1991"

LicenseText = `
Redistribution and use in source and binary forms, with or without
Expand Down

0 comments on commit b02c864

Please sign in to comment.