Documentation
¶
Index ¶
- Constants
- func ArXivToDOI(s string) string
- func ArXivURLtoArXiv(s string) string
- func DisplayLicense(out io.Writer, appName string, license string)
- func DisplayUsage(out io.Writer, appName string, flagSet *flag.FlagSet, description string, ...)
- func DisplayVersion(out io.Writer, appName string)
- func FmtHelp(src string, appName string, version string, releaseDate string, ...) string
- func IsArXiv(s string) bool
- type DataCiteClient
- type Object
Constants ¶
View Source
const ( // Version number of release Version = "1.1.0" // ReleaseDate, the date version.go was generated ReleaseDate = "2024-04-11" // ReleaseHash, the Git hash when version.go was generated ReleaseHash = "48fc786" LicenseText = `` /* 1524-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func ArXivToDOI ¶ added in v1.0.3
ArXivToDOI converts an arXiv id to a DOI (without the "https://doi.org/" prefix) formatted id per Instructions in the announcement that all arXiv gets DOI at https://blog.arxiv.org/2022/02/17/new-arxiv-articles-are-now-automatically-assigned-dois/
func ArXivURLtoArXiv ¶ added in v1.0.3
ArXivURLtoArXiv will convert an absolute arxiv.org URL to an arXiv id format.
func DisplayLicense ¶ added in v1.0.2
func DisplayUsage ¶ added in v1.0.2
func DisplayVersion ¶ added in v1.0.2
Types ¶
type DataCiteClient ¶
type DataCiteClient struct {
AppName string
MailTo string `json:"mailto"`
API string `json:"api"`
RateLimitLimit int `json:"limit"`
RateLimitInterval int `json:"interval"`
Status string
StatusCode int
LastRequest time.Time `json:"last_request"`
}
func NewDataCiteClient ¶
func NewDataCiteClient(appName string, mailTo string) (*DataCiteClient, error)
NewDataCiteClient creates a client and makes a request and returns the JSON source as a []byte or error if their is a problem.
func (*DataCiteClient) Dois ¶ added in v1.1.0
func (c *DataCiteClient) Dois(doi string) (Object, error)
Dois returns the "dois" object from `https://api.datacite.org/dois/` path
func (*DataCiteClient) DoisJSON ¶ added in v1.1.0
func (c *DataCiteClient) DoisJSON(doi string) ([]byte, error)
DoisJSON return the "dois" JSON source from `https://api.datacite.org/dois/` path
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
dataciteapi
command
dataciteapi.go is a command line tool for access the DataCite API given a specific DOI.
|
dataciteapi.go is a command line tool for access the DataCite API given a specific DOI. |
Click to show internal directories.
Click to hide internal directories.