Codync
免费开源的 1:1 Grok Bot 与 Muse 替代方案。可在 iPhone、Mac 或 Linux 桌面上将 Claude 代码、Codex、Cursor 以及 40 多个编码代理作为持久机器人使用。支持群组聊天、线程、应用。
AI 翻译
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 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"