generated from obsidianmd/obsidian-sample-plugin
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from RyoJerryYu/feat-move-file-into-package
feat: move file into package
- Loading branch information
Showing
62 changed files
with
183 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Obsidian Memos Sync Plugin | ||
|
||
中文 | [English](README.md) | ||
|
||
这是一个用于 [Obsidian](https://obsidian.md) 的插件。 | ||
|
||
这个插件提供了一些命令,可以将来自 [Memos](https://github.com/usememos/memos) 服务器账号里的记录同步到你的 Obsidian 笔记库的每日笔记中。如果每日笔记不存在,它还会根据规则创建一个。 | ||
|
||
## 兼容性 | ||
|
||
这个插件与官方的 [Daily Notes 插件](https://help.obsidian.md/Plugins/Daily+notes) 、 [Calendar 插件](https://github.com/liamcain/obsidian-calendar-plugin) 和 [Periodic Notes 插件](https://github.com/liamcain/obsidian-periodic-notes) 完全兼容。 | ||
|
||
这个插件兼容 Memos API 的各个版本,包括 v0.22.0 之后新版以及之前的旧版。 | ||
|
||
## 命令 | ||
|
||
### 同步每日 Memos | ||
|
||
这个命令将从 Memos 服务器增量同步记录到每日笔记。 | ||
这个插件会记住上次同步的时间,并且只同步那个时间之后的记录。 | ||
|
||
### 强制同步每日 Memos | ||
|
||
这个命令将重新同步 Memos 服务器上的所有的记录。 | ||
|
||
### 强制同步当前每日 Memos | ||
|
||
这个命令将为光标所在的当前每日笔记重新同步 Memos 服务器上的记录。 | ||
当你想要为特定一天同步记录时,这个命令非常有用。 | ||
|
||
## 配置 | ||
|
||
| Key | 描述 | 例子 | | ||
| ------------------ | ------------------------------------------------------------------------- | --------------------------------- | | ||
| Daily Memos Header | 每日笔记中的标题, Memos 记录会替换这个章节下的内容。 | `Memos` | | ||
| Attachment Folder | 存储附件的文件夹。 | `attachments/memos_daily` | | ||
| Memos API Version | Memos 服务器的版本。 | `after v0.22.x`, `before v0.21.x` | | ||
| Memos API URL | Memos API的URL。 | `http://localhost:5230` | | ||
| Memos API Token | Memos API的令牌。你可以在 Memos 页面 -> 设置 -> 我的账户 界面上创建一个。 | | | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,40 @@ | ||
# Obsidian Memos Sync Plugin | ||
|
||
This is a sample plugin for Obsidian (https://obsidian.md). | ||
[中文](README-ZH.md) | English | ||
|
||
This plugin provides a few commands to sync memos from a [memos](https://github.com/usememos/memos) server to daily notes in your Obsidian vault. | ||
This is a plugin for Obsidian (https://obsidian.md). | ||
|
||
This plugin is fully compatible with official Daily Notes plugin, [Calendar plugin](https://github.com/liamcain/obsidian-calendar-plugin) and [Periodic Notes plugin](https://github.com/liamcain/obsidian-periodic-notes). | ||
This plugin provides a few commands to sync memos from a [Memos](https://github.com/usememos/memos) server to daily notes in your Obsidian vault. It will also create a daily note if it does not exist. | ||
|
||
## Compatibility | ||
|
||
This plugin is fully compatible with official [Daily Notes plugin](https://help.obsidian.md/Plugins/Daily+notes), [Calendar plugin](https://github.com/liamcain/obsidian-calendar-plugin) and [Periodic Notes plugin](https://github.com/liamcain/obsidian-periodic-notes). | ||
|
||
This plugin is compatible with each version of Memos API, both for that after v0.22.0 and before. | ||
|
||
## Commands | ||
|
||
- Sync daily memos | ||
- Force sync daily memos | ||
- Force sync current daily memos | ||
### Sync daily memos | ||
|
||
This command will sync memos from the Memos server incrementally to the daily notes. | ||
This plugin will remember the last sync time and only sync memos after that time. | ||
|
||
### Force sync daily memos | ||
|
||
This command will resync all memos from the Memos server. | ||
|
||
### Force sync current daily memos | ||
|
||
This command will resync memos from the Memos server for the current daily note that cursor is on. | ||
Useful when you want to sync memos for a specific day. | ||
|
||
## Configuration | ||
|
||
| Key | Description | Example | | ||
| ------------------ | ------------------------------------------------------------------------------------- | --------------------------------- | | ||
| Daily Memos Header | The header in daily notes, where memos will be replaced in. | `Memos` | | ||
| Attachment Folder | The folder to store attachments. | `attachments/memos_daily` | | ||
| Memos API Version | Which version the Memos Server is. | `after v0.22.x`, `before v0.21.x` | | ||
| Memos API URL | The URL of the Memos API. | `http://localhost:5230` | | ||
| Memos API Token | The token for the Memos API. You can create one on Memos UI -> Settings -> My Account | | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
cd ./api/memos-proto-v0.22.0/ | ||
cd ./src/api/memos-proto-v0.22.0/ | ||
buf generate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"id": "ryo-usememos-sync", | ||
"id": "obsidian-memos-sync", | ||
"name": "Memos Sync", | ||
"version": "1.0.0", | ||
"version": "0.3.0", | ||
"minAppVersion": "0.15.0", | ||
"description": "Syncing Memos to Obsidian daily note. Fully compatible with official Daily Notes plugin, Calendar plugin and Periodic Notes plugin.", | ||
"author": "Obsidian", | ||
"authorUrl": "https://obsidian.md", | ||
"fundingUrl": "https://obsidian.md/pricing", | ||
"isDesktopOnly": false | ||
"description": "Syncing memos from a [Memos](https://github.com/usememos/memos) server to Obsidian daily note. Fully compatible with official Daily Notes plugin, Calendar plugin and Periodic Notes plugin.", | ||
"author": "RyoJerryYu", | ||
"authorUrl": "https://github.com/RyoJerryYu", | ||
"isDesktopOnly": true, | ||
"js": "main.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
services/DailyMemos/DailyNoteModifier.ts → src/services/DailyMemos/DailyNoteModifier.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
services/DailyMemos/MemosPaginator.ts → src/services/DailyMemos/MemosPaginator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
services/DailyMemos/MemosResource.ts → src/services/DailyMemos/MemosResource.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
services/DailyMemos/MemosResourceFetcher.ts → ...rvices/DailyMemos/MemosResourceFetcher.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.