-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreference-note-template.html
55 lines (55 loc) · 2.07 KB
/
reference-note-template.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# This template is specifically for importing/sharing, using better
# notes 'import from clipboard': copy the content and
# goto Zotero menu bar, click Tools->New Template from Clipboard.
# Do not copy-paste this to better notes template editor directly.
name: "[item]Reference Note"
zoteroVersion: "7.0.12-beta.1+31bbf2acf"
pluginVersion: "2.2.3-beta.4"
savedAt: "2025-01-09T04:57:21.443Z"
content: |-
<!-- Based on [Paper Notes](https://github.com/windingwind/zotero-better-notes/discussions/1099) -->
<!-- Title -->
<header>
<h1>
<a href="zotero://select/items/1_${topItem.key}">
${Zotero.QuickCopy.getContentFromItems([topItem],'bibliography=1312348e-7e30-40e8-ae0a-20b3d3f030b6').html}
</a>
</h1>
<p><i>Reference notes</i></p>
</header>
<!-- Meta Data -->
<h2>Metadata</h2>
<ul>
<li><b>Item Type:</b>
${topItem.itemType}
</li>
<li><b>Date Added:</b>
${new Date().toLocaleString()}
</li>
<li> ${(() => {
const doi = topItem.getField("DOI");
if (doi) {
return `<b>DOI: </b> <a href="https://doi.org/${topItem.getField('DOI')}">${topItem.getField('DOI')}</a>`;
} else {
return `<b>URL: </b><a href="${topItem.getField('url')}">${topItem.getField('url')}</a>`;
}
})()}
</li>
<li><b>Attachments: </b>
${(() => {
const attachments = Zotero.Items.get(topItem.getAttachments());
const pdf = attachments.filter((i) => i.isPDFAttachment());
if (pdf && pdf.length > 0) {
return `<a href="zotero://open-pdf/library/items/${pdf[0].key}">${pdf[0].getFilename()}</a>`;
} else if (attachments && attachments.length > 0) {
return `<a href="zotero://open-pdf/library/items/${attachments[0].key}">${attachments[0].getFilename()}</a>`;
} else {
return ``;
}
})()}
</li>
</ul>
<h2>↑Referred from</h2>
<h2>↓References</h2>
<h2>↔︎Related to</h2>
<h2>Source notes</h2><br />