From 58cb8a29f82fd14b7aa64dc219a2fc48a3f8d4d0 Mon Sep 17 00:00:00 2001 From: windingwind <33902321+windingwind@users.noreply.github.com> Date: Wed, 17 Aug 2022 19:56:29 +0800 Subject: [PATCH] Update TemplateUsage.md --- TemplateUsage.md | 205 +---------------------------------------------- 1 file changed, 3 insertions(+), 202 deletions(-) diff --git a/TemplateUsage.md b/TemplateUsage.md index 90590dc..162c7f3 100644 --- a/TemplateUsage.md +++ b/TemplateUsage.md @@ -33,12 +33,13 @@ Only the template with specific name will be called. - QuickInsert: Called when inserting a note link to main note. - QuickBackLink: Called when inserting a note link to main note. The template will be inserted to the end of the sub-note and point to the main note by default. - QuickImport: Called when importing a sub-note to main note. -- QuickNote: Called when creating a note from an annotation. +- QuickNoteV2: Called when creating a note from an annotation. + > QuickNote is deprecated since v0.6.25 - ExportMDFileName: Called when exporting notes to markdown in batch/linked notes to markdown mode. The rendered template will be file name. ## Template Examples -Welcome to share & contribute your template! +Welcome to share & contribute your template! See [Templates From Community](https://github.com/windingwind/zotero-better-notes/issues/85) for more templates. ### [Note] with meta-data @@ -57,203 +58,3 @@ ${topItem?`

Title: ${topItem.getField('title')}

Author: ${topItem.getField('firstCreator')}

Date: ${topItem.getField('date')}

``` - -### [Item] item-notes with metadata: - -shared by @zyx335588 -![image](https://user-images.githubusercontent.com/33902321/169704517-14faa474-0273-4357-99af-982f48576533.png) - -```js -

${topItem.getField('title')}

-

💡 Meta Data

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Title

-
- ${topItem.getField('title')} -
-

Journal

-
- ${topItem.getField('publicationTitle')} -
-

1st Author

-
- ${topItem.getField('firstCreator')} -
-

Authors

-
- ${topItem.getCreators().map((v)=>v.firstName+" "+v.lastName).join("; ")} -
-

Pub. date

-
- ${topItem.getField('date')} -
-

DOI

-
- ${topItem.getField('DOI')} -
-

Archive

-
- ${topItem.getField('archive')} -
-

Archive Location

-
- ${topItem.getField('archiveLocation')} -
-

Call No.

-
- ${topItem.getField('callNumber')} -
-${itemNotes.map((noteItem)=>{ -const noteLine = `

📜 Note: ${noteItem.key}

-
- ${noteItem.getNote()} -

Merge Date: ${new Date().toISOString().substr(0,10)+" "+ new Date().toTimeString()}

-
-

📝 Comments

-
-

Make your comments

-

-
`; -copyNoteImage(noteItem); -return noteLine; -}).join("\n")} -``` - -### [Item] metadata for CS - -Modified on the previous template. Auto-ajust metadata according to item type. -![image](https://user-images.githubusercontent.com/33902321/171443309-1cb54d09-8e8a-40ae-8465-96f2f808c96d.png) - -```js -

${topItem.getField('title')}

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Title

-
- ${topItem.getField('title')} -
-

${(()=>{ - if(topItem.itemType === "conferencePaper") return "Conference"; - if(topItem.itemType === "journalArticle") return "Journal"; - if(topItem.itemType === "report") return "Publisher"; - return "Publisher";})()}

-
${(()=>{ - if(topItem.itemType === "conferencePaper") { - const res = topItem.getField("conferenceName"); - return res?res:topItem.getField("proceedingsTitle"); - }; - if(topItem.itemType === "journalArticle") return topItem.getField("publicationTitle"); - if(topItem.itemType === "report") return topItem.getField("institution"); - return topItem.getField("publicationTitle");})()} -
-

Authors

-
- ${topItem.getCreators().map((v)=>v.firstName+" "+v.lastName).join("; ")} -
-

Pub. date

-
- ${topItem.getField('date')} -
-

DOI

-
- ${topItem.getField('DOI')} -
-

URL

-
- ${topItem.getField('url')} -
-

CitationKey

-
- ${topItem.citationKey?topItem.citationKey:''} -
-``` - -### [Text] today - -```js -

TODO: ${new Date().toLocaleDateString()}

-

Tasks

- -
-

Insert more items with meta-data in workspace window->Edit

-
-

-

Done Tasks

-

-

Todo Tomorrow

-

- -```