diff --git a/src/Better Note Markdown.js b/src/Better Note Markdown.js index f026c81..f327b22 100644 --- a/src/Better Note Markdown.js +++ b/src/Better Note Markdown.js @@ -1647,15 +1647,19 @@ let bundle; // annotation.uri was used before note-editor v4 let uri = annotation.attachmentURI || annotation.uri; let position = annotation.position; + Zotero.debug("----Debug Link----"); + Zotero.debug(annotation); if ( Zotero.getOption("includeAppLinks") && typeof uri === "string" && typeof position === "object" ) { + Zotero.debug(uri); let openURI; let uriParts = uri.split("/"); let libraryType = uriParts[3]; - let key = uriParts[6]; + let key = uri.split("/").pop(); + Zotero.debug(key); if (libraryType === "users") { openURI = "zotero://open-pdf/library/items/" + key; } diff --git a/src/wizard.ts b/src/wizard.ts index 463abf3..b3bbc67 100644 --- a/src/wizard.ts +++ b/src/wizard.ts @@ -14,8 +14,192 @@ class AddonWizard extends AddonBase { this.enableCollection = true; this.collectionName = ""; this.enableNote = true; - this.template = `

Zotero Better Notes User Guide: Workflow

\n

Welcome to Zotero Better Notes !

\n

This note helps you quickly learn how to use this addon in 3 min!

\n

Let's start now.

\n

View documentation with images on GitHub: User Guide(EN) | User Guide(CN)

\n

1 What is Better Notes

\n

Better Notes is an extension of Zotero's built-in note function.

\n

Zotero's note is much like a markdown/rich-text editor. You can edit the format with the tools above⬆️.

\n

1.1 Workspace Window

\n

The knowledge workspace window contains an outline area(left side⬅️), the main note area, and the preview area(right side➡️).

\n

|---------------||----------------||----------------|

\n

|                  ||                  ||                  |

\n

|    Outline    ||  Main Note  ||   Preview    |

\n

|                  ||                  ||                  |

\n

|------------ --||---------------||----------------|

\n

Open workspace by clicking the 'Open Workspace' line above the 'My Library' line in Zotero main window. Alternatively, open it with the '🏠home' button on the top-left of note editors.

\n

\n

1.2 Main note

\n

This addon uses a Zotero note item as the main note. It will show up on the main area of the workspace window.

\n

All links will be added to the main note.

\n

Change the main note with the '📂folder' button on the bottom of the outline area(left side⬅️).

\n

\n

2 Gather Ideas to Main Note

\n

2.1 From Note

\n

Select a note outside the workspace window(in Zotero items view or PDF viewer), you may realize a button with the addon's icon on the top of the note editor toolbar.

\n

Click it, the current note link will be inserted into the main note's cursor position;

\n

Select a heading, the note's link will be inserted into the end of this heading.

\n
\n

💡 Try it now!

\n

Open a PDF and open/create a note(in the right side bar of PDF viewer). Add a link below.

\n
\n

\n

2.1.1 INSERT HERE

\n

You can insert the link here.

\n

\n

2.2 From Annotation

\n

You can find a button with the addon's icon on every annotation(in the left sidebar of PDF viewer).

\n

Click it, and a new note with this annotation will be created under the PDF item. You can also add the link to the main note in the note editor.

\n
\n

💡 Try it now!

\n

Open a PDF and open/create an annotation(in the left sidebar of PDF viewer). Add a link.

\n
\n

\n

3 Check Linked Notes in Workspace Window

\n

3.1 View Linked Notes

\n

Suppose you have added a lot of links to the main note. Now, it's time to view what you've got.

\n

Go back to the workspace window.

\n

Click links, the linked note will show up in the preview area(right side➡️).

\n
\n

💡 Try it now!

\n

Open a note link.

\n
\n

3.2 View Linked Note's PDF

\n

Click the '📄PDF' button on the top-left of the preview area.

\n
\n

💡 Try it now!

\n

Open a linked note's PDF.

\n
\n

\n

4 Outline Mode

\n

Switch the outline mode with the '📊mode' button on the bottom of the outline area.

\n
\n

💡 Try it now!

\n

Try different outline modes.

\n
\n

\n

5 Export

\n

Click the '⬆️export' button on the top-right of the main note area. Choose a format to export, e.g. MarkDown.

\n

If you are using MS Word/OneNote, export to clipboard and paste there.

\n
\n

💡 Try it now!

\n

Export this main note!

\n
\n

\n

6 Start a New Job

\n

After the export, you may want to start a new job with a new empty main note.

\n

Create a note and right-click to set it as the main note, or just create a new main note.

\n

Switch between different main notes with the '📂folder' button on the bottom of the outline area.

\n
\n

✨ Hint

\n

Create a new collection and save all main notes there is the best way to manage them.

\n

The user guide should have done this for you.

\n
\n

\n

Congratulations!

\n

You can select a new main note and start working with Zotero Better Notes now. Have fun!

\n

\n

\n
`; - this.templateCN = `

Zotero Better Notes 用户指引:工作流

\n

欢迎使用 Zotero Better Notes !

\n

本笔记帮助您在3分钟内快速学习如何使用此插件!

\n

现在开始吧。

\n

在GitHub上阅读带有图片的文档: User Guide(EN) | 用户指引(中文)

\n

1 认识 Better Notes

\n

Better Notes是Zotero内置note功能的扩展。

\n

Zotero的note很像一个标记/富文本编辑器。您可以使用上方工具编辑格式⬆️。

\n

1.1 工作区窗口

\n

知识工作区窗口包含一个大纲区域(左侧⬅️),主笔记区域和预览区域(右侧➡️)。

\n

|---------------||----------------||----------------|

\n

|                  ||                  ||                  |

\n

|      大纲     ||    主笔记     ||      预览      |

\n

|                  ||                  ||                  |

\n

|------------ --||---------------||----------------|

\n

在Zotero主窗口中单击“我的文库”上方的“Open Workspace”来打开工作区。或者,用笔记编辑器左上角的“🏠主页”按钮.

\n

\n

1.2 主笔记

\n

这个插件使用某一个Zotero note作为主笔记。它将显示在工作区窗口的主笔记区域。

\n

所有链接都将添加到主笔记中。

\n

点击位于大纲区域左下方的📂“文件夹”按钮 来选择不同的note作为主笔记。

\n

\n

2 在主笔记中收集想法

\n

2.1 从Note

\n

在工作区窗口外选择一个note(在Zotero 条目视图或PDF阅读器中),您会在笔记编辑器工具栏顶部看到一个带有本插件图标的按钮

\n

点击它,当前笔记的链接将插入主笔记的光标位置;

\n

选择一个标题层级,笔记的链接将插入该标题的末尾。

\n
\n

💡 尝试一下!

\n

打开PDF并打开/创建笔记(在PDF 阅读器的右侧栏中)。用上面的方法在这条主笔记添加一个链接。

\n
\n

\n

2.1.1 用来插入链接的位置

\n

你可以在这里插入链接。

\n

\n

2.2 从Annotation(批注高亮)

\n

你可以在每个批注上找到一个带有插件图标的按钮(在PDF 阅读器的左侧栏中)。

\n

单击它,PDF项目下将创建一个带有此批注的新笔记。也可以在打开的笔记编辑器中将链接添加到主笔记。

\n
\n

💡 尝试一下!

\n

打开PDF并打开/创建批注高亮(在PDF 阅读器的左侧栏中)。用上面的方法在这条主笔记添加一个链接。

\n
\n

\n

3 查看工作区窗口中的链接笔记

\n

3.1 查看链接笔记

\n

假设你已经在主笔记添加了很多的链接。现在,是时候看看你的结果了。

\n

返回工作区窗口。

\n

单击链接,链接的笔记将显示在预览区域(右侧➡️)。

\n
\n

💡 尝试一下!

\n

在工作区窗口打开一个笔记链接。

\n
\n

3.2 查看链接笔记的 PDF

\n

在上一步打开的预览笔记中,点击预览区左上角的“📄PDF”按钮

\n
\n

💡尝试一下!

\n

打开一个链接笔记的 PDF。

\n
\n

\n

4 大纲视图

\n

点击大纲区域左下角的 ‘📊大纲模式‘ 按钮 来切换大纲视图模式。

\n
\n

💡 尝试一下!

\n

尝试不同的大纲模式(思维导图)

\n
\n

\n

5 导出

\n

点击主笔记区域右上角的“⬆️导出”按钮。选择要导出的格式,比如MarkDown。

\n

如果您使用的是MS Word/OneNote,请导出到剪贴板并粘贴到那里。

\n
\n

💡 尝试一下!

\n

导出这个主笔记!

\n
\n

\n

6 开始新的任务

\n

导出后,您可能希望使用新的空主笔记开始新任务。

\n

创建一个note笔记,然后右键单击将其设置为主笔记;或者直接创建一个新的主笔记。

\n

使用大纲区域底部的“📂文件夹”按钮切换不同的主笔记。

\n
\n

✨ 提示

\n

创建一个新的文件夹并在其中专门保存所有的主笔记——这是管理主笔记的最佳方法。

\n

用户指引应该已经为您做到了这一点。

\n
\n

\n

恭喜!

\n

你现在可以选择或新建一个主笔记,然后开始使用 Zotero Better Notes了。用的开心!

\n

\n

\n
`; + this.template = `

Zotero Better Notes User Guide: Workflow

+

Welcome to Zotero Better Notes !

+

This note helps you quickly learn how to use this addon in 3 min!

+

Let's start now.

+

View full documentation with images on GitHub: User Guide(EN) | User Guide(CN)

+

+

1 What is Better Notes

+

Better Notes is an extension of Zotero's built-in note function.

+

Zotero's note is much like a markdown/rich-text editor. You can edit the format with the tools above⬆️.

+

1.1 Workspace Window

+

The knowledge workspace window contains an outline area(left side⬅️), the main note area, and the preview area(right side➡️).

+

|---------------||----------------||----------------|

+

|                  ||                  ||                  |

+

|    Outline    ||  Main Note  ||   Preview    |

+

|                  ||                  ||                  |

+

|------------ --||---------------||----------------|

+

Open workspace by clicking the 'Open Workspace' line above the 'My Library' line in Zotero main window. Alternatively, open it with the '🏠home' button on the top-left of note editors.

+

Most functions are integrated in the upper left menu bar of the workspace window (in MacOS, the upper left of the screen), which will be described in subsequent chapters.

+

+

1.2 Main note

+

This addon uses a Zotero note item as the main note. It will show up on the main area of the workspace window.

+

All links will be added to the main note.

+

Click File -> Open Main Note in the workspace window to select a note as the main note.

+

+

2 Gather Ideas to Main Note

+

2.1 From Note

+

Select a note outside the workspace window(in Zotero items view or PDF viewer), you may realize a button with the addon's icon on the top of the note editor toolbar.

+

Click it, the current note link will be inserted into the main note's cursor position;

+

Select a heading, the note's link will be inserted into the end of this heading.

+
+

💡 Try it now!

+

Open a PDF and open/create a note(in the right side bar of PDF viewer). Add a link below.

+
+

+

2.1.1 INSERT HERE

+

You can insert the link here.

+

+

2.2 From Annotation

+

You can find a button with the addon's icon on every annotation(in the left sidebar of PDF viewer).

+

Click it, and a new note with this annotation will be created under the PDF item. You can also add the link to the main note in the note editor.

+
+

💡 Try it now!

+

Open a PDF and open/create an annotation(in the left sidebar of PDF viewer). Add a link.

+
+

+

3 Check Linked Notes in Workspace Window

+

3.1 View Linked Notes

+

Suppose you have added a lot of links to the main note. Now, it's time to view what you've got.

+

Go back to the workspace window.

+

Click links, the linked note will show up in the preview area(right side➡️).

+
+

💡 Try it now!

+

Open a note link.

+
+

3.2 View Linked Note's PDF

+

Click the '📄PDF' button on the top-left of the preview area.

+
+

💡 Try it now!

+

Open a linked note's PDF.

+
+

+

4 Outline Mode

+

Switch the outline mode with the '📊mode' button on the bottom of the outline area.

+
+

💡 Try it now!

+

Try different outline modes.

+
+

+

5 LaTex Support

+

Click the 'TEX' button on the tool bar of note editor to switch between LaTex view and editor view.

+

+

6 Export

+

Click the '⬆️export' button on the top-right of the main note area. Choose a format to export, e.g. MarkDown.

+

If you are using MS Word/OneNote, export to clipboard and paste there.

+

You can also choose to keep the notes in Zotero, and the contents of the notes will be synchronized through Zotero synchronization settings.

+
+

💡 Try it now!

+

Export this main note!

+
+

+

7 Start a New Job

+

After the export, you may want to start a new job with a new empty main note.

+

Create a note and right-click to set it as the main note, or just create a new main note.

+

Switch between different main notes with the File -> Open Main Note/Create New Main Note.

+
+

✨ Hint

+

Create a new collection and save all main notes there is the best way to manage them.

+

The user guide should have done this for you.

+
+

+

Congratulations!

+

You can select a new main note and start working with Zotero Better Notes now. Have fun!

+

+
`; + this.templateCN = `

Zotero Better Notes 用户指引:工作流

+

欢迎使用 Zotero Better Notes !

+

本笔记帮助您在3分钟内快速学习如何使用此插件!

+

现在开始吧。

+

在GitHub上阅读带有图片的完整文档: User Guide(EN) | 用户指引(中文)

+

+

1 认识 Better Notes

+

Better Notes是Zotero内置note功能的扩展。

+

Zotero的note很像一个标记/富文本编辑器。您可以使用上方工具编辑格式⬆️。

+

1.1 工作区窗口

+

知识工作区窗口包含一个大纲区域(左侧⬅️),主笔记区域和预览区域(右侧➡️)。

+

|---------------||----------------||----------------|

+

|                  ||                  ||                  |

+

|      大纲     ||    主笔记     ||      预览      |

+

|                  ||                  ||                  |

+

|------------ --||---------------||----------------|

+

在Zotero主窗口中单击“我的文库”上方的“Open Workspace”来打开工作区。或者,用笔记编辑器左上角的“🏠主页”按钮

+

工作区窗口的左上方菜单栏(在MacOS中,是屏幕左上角)中集成了大多数功能,将在后续章节进行介绍。

+

1.2 主笔记

+

这个插件使用某一个Zotero note作为主笔记。它将显示在工作区窗口的主笔记区域。

+

所有链接都将添加到主笔记中。

+

点击工作区窗口中的菜单栏 -> 文件 -> 打开主笔记来选择不同的note作为主笔记。

+

+

2 在主笔记中收集想法

+

2.1 从Note

+

在工作区窗口外选择一个note(在Zotero 条目视图或PDF阅读器中),您会在笔记编辑器工具栏顶部看到一个带有本插件图标的按钮

+

点击它,当前笔记的链接将插入主笔记的光标位置;

+

选择一个标题层级,笔记的链接将插入该标题的末尾。

+
+

💡 尝试一下!

+

打开PDF并打开/创建笔记(在PDF 阅读器的右侧栏中)。用上面的方法在这条主笔记添加一个链接。

+
+

+

2.1.1 用来插入链接的位置

+

你可以在这里插入链接。

+

+

2.2 从Annotation(批注高亮)

+

你可以在每个批注上找到一个带有插件图标的按钮(在PDF 阅读器的左侧栏中)。

+

单击它,PDF项目下将创建一个带有此批注的新笔记。也可以在打开的笔记编辑器中将链接添加到主笔记。

+
+

💡 尝试一下!

+

打开PDF并打开/创建批注高亮(在PDF 阅读器的左侧栏中)。用上面的方法在这条主笔记添加一个链接。

+
+

+

3 查看工作区窗口中的链接笔记

+

3.1 查看链接笔记

+

假设你已经在主笔记添加了很多的链接。现在,是时候看看你的结果了。

+

返回工作区窗口。

+

单击链接,链接的笔记将显示在预览区域(右侧➡️)。

+
+

💡 尝试一下!

+

在工作区窗口打开一个笔记链接。

+
+

3.2 查看链接笔记的 PDF

+

在上一步打开的预览笔记中,点击预览区左上角的“📄PDF”按钮

+
+

💡尝试一下!

+

打开一个链接笔记的 PDF。

+
+

+

4 大纲视图

+

点击大纲区域左下角的 ‘📊大纲模式‘ 按钮 来切换大纲视图模式。

+
+

💡 尝试一下!

+

尝试不同的大纲模式(思维导图)

+
+

+

5 LaTex支持

+

点击笔记编辑器工具栏中'TEX'按钮来切换预览和编辑模式。

+

+

6 导出

+

点击主笔记区域右上角的“⬆️导出”按钮。选择要导出的格式,比如MarkDown。

+

如果您使用的是MS Word/OneNote,请导出到剪贴板并粘贴到那里。

+
+

💡 尝试一下!

+

导出这个主笔记!

+
+

+

7 开始新的任务

+

导出后,您可能希望使用新的空主笔记开始新任务。

+

创建一个note笔记,然后右键单击将其设置为主笔记;或者直接创建一个新的主笔记。

+

使用菜单栏中的文件->打开主笔记/创建新主笔记来切换不同的主笔记。

+
+

✨ 提示

+

创建一个新的文件夹并在其中专门保存所有的主笔记——这是管理主笔记的最佳方法。

+

用户指引应该已经为您做到了这一点。

+
+

+

恭喜!

+

你现在可以选择或新建一个主笔记,然后开始使用 Zotero Better Notes了。用的开心!

+

+
`; } init(_document: Document) { this._document = _document;