Codync
무료 오픈소스 1:1 대안, Grok Bot과 Muse 대신
메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗This is a go package for working with the Crossref API. It is inspired by the an excellent CrossRefAPI Python package listed in the Crossref API docs. This package is meant to follow the "polite" guidelines for interacting with the public API at api.crossref.org.
appName := path.Base(os.Args[0])
client, err := crossrefapi.NewCrossRefClient(appName, "[email protected]")
if err != nil {
// handle error...
}
works, err := client.Works("10.1037/0003-066x.59.1.29")
if err != nil {
// handle error...
}
// continue processing your "works" result...
You can compare two copies of a "works" response and see what has changed.
appName := path.Base(os.Args[0])
client, err := crossrefapi.NewCrossRefClient(appName, "[email protected]")
if err != nil {
// handle error...
}
newWorks, err := client.Works("10.1037/0003-066x.59.1.29")
if err != nil {
// handle error...
}
// Fetch our previously saved works document.
src, err := os.ReadFile("0003-066x.59.1.29.json")
if err != nil {
// handle error...
}
oldWorks := new(crossrefapi.Works)
if err := json.Unmarshal(src, &oldWorks); err != nil {
// handle error...
}
src, err = oldWorks.DiffAsJSON(newWorks)
if err != nil {
// handle error...
}
fmt.Println("Diff for 10.1037/0003-066x.59.1.29")
fmt.Printf("\n%s\n", src)
From v1.1.0 the package turns Crossref's marked-up titles and JATS abstracts
into text and HTML an institutional repository can use: tags removed,
subscripts and formulas converted, layout whitespace tidied, and abstracts as
HTML that Invenio RDM's sanitizer keeps, with formulas as TeX in \( ... \).
title, warnings := works.Message.FullTitle()
// Euclid preparation: CII. Non-Gaussianity of two-point statistics likelihood: ...
description, _ := works.Message.HTMLAbstract()
// <p>The extraction of cosmological information from two-point statistics ...</p>
others, _ := works.Message.AlternateTitles()
// the record's other titles, if it has any
crossrefapi.PlainText(s) and crossrefapi.HTMLAbstract(s) do the same for a
string. crossrefapi.NewNormalizer(path) makes a Normalizer that uses your own
override of the symbol table. Everything that cannot be converted cleanly comes
back as a warning, so a program can hand those records to a person. See
Text normalization for the rules, the warning codes and
the override file.
crossrefapi -mailto="[email protected]" works "10.1037/0003-066x.59.1.29"