Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

公开页面元数据 #23

Open
northword opened this issue May 6, 2024 · 4 comments · May be fixed by #31
Open

公开页面元数据 #23

northword opened this issue May 6, 2024 · 4 comments · May be fixed by #31
Labels
enhancement New feature or request

Comments

@northword
Copy link
Member

northword commented May 6, 2024

ref:

把页面的元数据暴露给 Zotero Connector,并在路由切换时强制 Zotero Connector 重新读取元数据。以方便用户将网站存到 Zotero (恢复 RSS 新开 issue 进行标记)。


Embedded Metadata 转换器:https://github.com/zotero/translators/blob/master/Embedded%20Metadata.js

可以嵌入页面的元数据有:

type?

我们也许可以对 wiki 设置 book 或 document,对 plugins/translators/styles 等页面保持 webpage。

但是没有直接的字段表明 type。og 协议倒是有 <meta name="type" content="website"> ,然而 z 似乎并没有读取,转换器仅从有无 isbn 判断是否为 book:

转换器获取 itemType 的逻辑:https://github.com/zotero/translators/blob/d0e7827d061329d9830675ef9effafe590f0b06d/Embedded%20Metadata.js#L306-L342

@jiaojiaodubai 关于条目类别这个,有什么建议吗?

官方文档其实也没有适配这些,识别出来的还是 webpage。

标题

填入 citation_title,用当前页面一级标题。

日期

citation_date 用页面创建时间

链接

<link rel=“canonical”> 保持最大兼容,而不是 citation_public_url

作者/贡献者

citation_author 直接填成社区?还是每个贡献者写一个(好像不大好实现,只能页面加载后进行dom操作好像,可以调研一下 vite 插件数据怎么共享出来)?

??

以及其他字段?

@northword northword added the enhancement New feature or request label May 7, 2024
@jiaojiaodubai
Copy link
Contributor

转换器仅从有无 isbn 判断是否为 book。

是的,Embedded Metadata.js 一般是供其他转换器调用,然后设置 handle 来干预 itemType

关于条目类别这个,有什么建议吗?

我认为不适宜用 book,因为作为 book 引用的话,缺少严格意义上的 publisherISBN 之类的属性。载为 document 也不是很合适,详见 translators_CN/pull/308 的讨论。根据 Zotero 的 类型说明,机构发布的手册更适合用 report

我遇到过的 meta 规范有好多种,除了前面已经提到的 citation_* (即 DCMI),建议同时顾及 dc.*DataCite Schema),还有 og:*Open Graph Protocol),案例见仁和汇智的一些期刊网站,如《物理》

@northword
Copy link
Member Author

我认为不适宜用 book,因为作为 book 引用的话,缺少严格意义上的 publisherISBN 之类的属性。载为 document 也不是很合适,详见 translators_CN/pull/308 的讨论。根据 Zotero 的 类型说明,机构发布的手册更适合用 report

感觉 Report 不是很符合咱们这种呢,感觉 Report 更多是一些结果类的,而不是咱们这种文档类的;

网上有说应该分为图书:
https://zhidao.baidu.com/question/587634549487233765.html >
软件手册属于书籍类文献,引用的时候按照书籍类文献引用。
用户手册属于图书或者专著。文献代号为[M]。

或者:Encyclopedia Article ?
An article or chapter published as part of an encyclopedia.

但是 Embedded Metadata 并不支持 Embedded Metadata,如果我们用这种的话可能需要修改这个转换器或者为网站单独写转换器(我觉得最理想的就是网站放把元数据放好,不需要再写转换器了)

我遇到过的 meta 规范有好多种,除了前面已经提到的 citation_* (即 DCMI),建议同时顾及 dc.*DataCite Schema),还有 og:*Open Graph Protocol),案例见仁和汇智的一些期刊网站,如《物理》

Zotero 文档上注明了他们支持的 DCMI,同时,转换器对其他规范是做了兼容的,因此我们主要保留 DCMI 和 Open Graph Protocol 就好。(Open Graph Protocol 不少搜素引擎使用)

@northword northword linked a pull request May 15, 2024 that will close this issue
@jiaojiaodubai
Copy link
Contributor

@zepinglee
这个任务似乎停滞在选择条目类型上了

@zepinglee
Copy link

文档似乎可以算作“manual”?按照 https://www.zotero.org/support/kb/item_types_and_fields 使用 report 更合适。

For government documents, technical reports, manuals, etc., use Report instead. This item type can also be adapted to fit many types of unusual items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants