mirror of
https://github.com/jxpeng98/obsidian-to-NotionNext
synced 2026-07-30 17:18:36 +08:00
Compare commits
5 Commits
fc47d36e8d
...
2.4.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc166d8db1 | ||
|
|
7612637951 | ||
|
|
e8b1617916 | ||
|
|
fd29ed820e | ||
|
|
1f58670906 |
10
CHANGELOG.md
10
CHANGELOG.md
@@ -1,8 +1,4 @@
|
|||||||
## Features
|
## Fix
|
||||||
|
|
||||||
- Support WebP format images. 支持 WebP 格式图片。
|
|
||||||
- Support sync with long notes. 支持长文章同步。
|
|
||||||
|
|
||||||
Long articles or notes have been split into multiple parts, and the parts are synchronized in order.
|
|
||||||
长文章同步是通过将长文章或笔记拆分为多个部分,按顺序同步这些部分。
|
|
||||||
|
|
||||||
|
- Fix code block not being highlighted in Notion after syncing.
|
||||||
|
- 修复代码块同步之后,在 Notion 中未高亮的问题。
|
||||||
|
|||||||
10
README.md
10
README.md
@@ -9,24 +9,24 @@
|
|||||||
|
|
||||||
[//]: # ([中文文档](README-zh.md))
|
[//]: # ([中文文档](README-zh.md))
|
||||||
|
|
||||||
**Now, support both NotionNext and General databases with customised properties.**
|
**Now, support All Notion databases, including NotionNext and General Notion databases, and customise the database list.**
|
||||||
|
|
||||||
**现在支持NotionNext和普通Notion数据库,可自定义数据库列表。**
|
**现在支持所有Notion数据库,包括NotionNext和一般Notion数据库,以及自定义数据库列表。**
|
||||||
|
|
||||||
## Precautions
|
## Precautions
|
||||||
|
|
||||||
### For customised database users
|
### For customised database users before version 2.3.0
|
||||||
|
|
||||||
**⚠️⚠️⚠️: The existing customised database should be recreated if you want to update to version 2.3.0. The new version has a new database structure, and the old database structure is not compatible with the new version to build the index properly.**
|
**⚠️⚠️⚠️: The existing customised database should be recreated if you want to update to version 2.3.0. The new version has a new database structure, and the old database structure is not compatible with the new version to build the index properly.**
|
||||||
|
|
||||||
### 自定义数据库用户
|
### 在2.3.0版本之前的自定义数据库用户
|
||||||
|
|
||||||
**⚠️⚠️⚠️: 如果你想要更新到2.3.0版本,你需要重新创建自定义数据库。新版本有一个新的数据库结构,旧的数据库结构无法构建索引。**
|
**⚠️⚠️⚠️: 如果你想要更新到2.3.0版本,你需要重新创建自定义数据库。新版本有一个新的数据库结构,旧的数据库结构无法构建索引。**
|
||||||
|
|
||||||
## TODO List
|
## TODO List
|
||||||
|
|
||||||
- [x] Modify the Edit function for the custom properties. 改进自定义属性的编辑功能
|
- [x] Modify the Edit function for the custom properties. 改进自定义属性的编辑功能
|
||||||
- [x] Support sync with long notes. 支持长文章同步
|
- [x] Support sync with long notes (From `v2.4.0`). 从`v2.4.0`开始支持长笔记同步
|
||||||
- [x] Support custom properties for Notion General database. 支持自定义属性
|
- [x] Support custom properties for Notion General database. 支持自定义属性
|
||||||
- [x] Support preview for database details in plugin settings. 支持预览数据库详情
|
- [x] Support preview for database details in plugin settings. 支持预览数据库详情
|
||||||
- [x] Support edit for database details in plugin settings. 支持编辑数据库详情
|
- [x] Support edit for database details in plugin settings. 支持编辑数据库详情
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "share-to-notionnext",
|
"id": "share-to-notionnext",
|
||||||
"name": "Share to NotionNext",
|
"name": "Share to NotionNext",
|
||||||
"version": "2.3.5",
|
"version": "2.4.1",
|
||||||
"minAppVersion": "0.0.1",
|
"minAppVersion": "0.0.1",
|
||||||
"description": "Shares obsidian md file to notion with notion api for NotionNext web deploy, originally created by EasyChris/obsidian-to-notion.",
|
"description": "Shares obsidian md file to notion with notion api for NotionNext web deploy, originally created by EasyChris/obsidian-to-notion.",
|
||||||
"author": "EasyChris, jxpeng98",
|
"author": "EasyChris, jxpeng98",
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "share-to-notionnext",
|
"name": "share-to-notionnext",
|
||||||
"version": "2.3.5",
|
"version": "2.4.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"description": "Shares obsidian md file to notion with notion api for NotionNext web deploy, originally created by EasyChris/obsidian-to-notion.",
|
"description": "Share files to any Notion database using the Notion API, originally created by EasyChris/obsidian-to-notion.",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "node esbuild.config.mjs",
|
"dev": "node esbuild.config.mjs",
|
||||||
|
|||||||
@@ -58,6 +58,19 @@ export class Upload2NotionGeneral extends UploadBaseGeneral {
|
|||||||
notionAPI
|
notionAPI
|
||||||
} = this.dbDetails;
|
} = this.dbDetails;
|
||||||
|
|
||||||
|
// remove the annotations from the childArr if type is code block
|
||||||
|
childArr.forEach((block: any) => {
|
||||||
|
if (block.type === "code") {
|
||||||
|
block.code.rich_text.forEach((item: any) => {
|
||||||
|
if (item.type === "text" && item.annotations) {
|
||||||
|
delete item.annotations;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
// check the length of the childArr and split it into chunks of 100
|
// check the length of the childArr and split it into chunks of 100
|
||||||
const childArrLength = childArr.length;
|
const childArrLength = childArr.length;
|
||||||
let extraArr: any[] = [];
|
let extraArr: any[] = [];
|
||||||
|
|||||||
@@ -82,6 +82,19 @@ export class Upload2NotionNext extends UploadBaseNext {
|
|||||||
) {
|
) {
|
||||||
const {databaseID, notionAPI} = this.dbDetails;
|
const {databaseID, notionAPI} = this.dbDetails;
|
||||||
|
|
||||||
|
// remove the annotations from the childArr if type is code block
|
||||||
|
childArr.forEach((block: any) => {
|
||||||
|
if (block.type === "code") {
|
||||||
|
block.code.rich_text.forEach((item: any) => {
|
||||||
|
if (item.type === "text" && item.annotations) {
|
||||||
|
delete item.annotations;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
// check the length of the childArr
|
// check the length of the childArr
|
||||||
// if it is too long, split it into multiple pages
|
// if it is too long, split it into multiple pages
|
||||||
const childArrLength = childArr.length;
|
const childArrLength = childArr.length;
|
||||||
|
|||||||
@@ -54,6 +54,19 @@ export class Upload2NotionCustom extends UploadBaseCustom {
|
|||||||
notionAPI
|
notionAPI
|
||||||
} = this.dbDetails;
|
} = this.dbDetails;
|
||||||
|
|
||||||
|
// remove the annotations from the childArr if type is code block
|
||||||
|
childArr.forEach((block: any) => {
|
||||||
|
if (block.type === "code") {
|
||||||
|
block.code.rich_text.forEach((item: any) => {
|
||||||
|
if (item.type === "text" && item.annotations) {
|
||||||
|
delete item.annotations;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
// check the length of the childArr and split it into chunks of 100
|
// check the length of the childArr and split it into chunks of 100
|
||||||
const childArrLength = childArr.length;
|
const childArrLength = childArr.length;
|
||||||
let extraArr: any[] = [];
|
let extraArr: any[] = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user