update the readme and changelog

This commit is contained in:
Jiaxin Peng
2024-01-29 11:53:18 +00:00
parent 8c6aea8250
commit 0198898086
4 changed files with 84 additions and 30 deletions

View File

@@ -1,18 +1,19 @@
# Changelog v2.1.0
# Changelog v2.2.0
## Feature
- add confirmation interface for deleting a database
- 增加删除数据库的确认界面
- add the support for the customised properties of general databases
- 增加对普通数据库自定义属性的支持
## Fix
- fix the typo in the edit database modal
- improve the logic for the database editing
- 修复编辑数据库界面的标题错误
- 改进数据库编辑界面的逻辑
## TODO
- [ ] add the support for the customised properties of general databases
- [ ] 增加对普通数据库自定义属性的支持
- support
- [x] `title`, which is the first column of the database
- [x] 'Text'
- [x] 'Number'
- [x] 'Date'
- [x] 'Checkbox'
- [x] 'Select'
- [x] 'Multi-select'
- [x] 'URL'
- [x] 'Email'
- [x] 'Phone'
- [x] 'File' (**Only support external embedded files**)

View File

@@ -9,10 +9,6 @@
[中文文档](README-zh.md)
Thanks to the [original author](https://github.com/EasyChris/obsidian-to-notion) for developing such a useful plugin that can synchronize Obsidian to Notion. However, the original repository can only sync Name and Tag information. For those like me who use [NotionNext](https://github.com/tangly1024/NotionNext) to set up their website, this presents some limitations. Every time I import, I need to make a lot of modifications.
Thus, based on the [original author's work](https://github.com/EasyChris/obsidian-to-notion), I've added a feature to match the [NotionNext](https://github.com/tangly1024/NotionNext) template. This way, you can edit directly in Obsidian and publish with a single click after organizing.
**Now, support both NotionNext and General databases with customised properties.**
**现在支持NotionNext和普通Notion数据库可自定义数据库列表。**
@@ -26,15 +22,34 @@ Thus, based on the [original author's work](https://github.com/EasyChris/obsidia
## Update
### 2.2.0
### 2.2.0 (Big Update)
- add the support for custom properties in the Notion General database. 支持自定义属性
- [x] `title`, which is the first column of the database
- [x] 'Text'
- [x] 'Number'
- [x] 'Date'
- [x] 'Checkbox'
- [x] 'Select'
- [x] 'Multi-select'
- [x] 'URL'
- [x] 'Email'
- [x] 'Phone'
- [x] 'File' (**Only support external embedded files**)
![](https://minioapi.pjx.ac.cn/img1/2024/01/039760ee966c6c1e04410d3f69787f85.png)
![](https://minioapi.pjx.ac.cn/img1/2024/01/0cd99007409feede77bf5a3291e88af3.png)
- Once you create the properties, you can preview the database details in the plugin settings.
![](https://minioapi.pjx.ac.cn/img1/2024/01/665139962cc4cee2a0cb576b508b29f2.png)
Once you add the custom properties in the Notion General database, you can add the corresponding properties in the YAML frontmatter. **The name of the properties is case sensitive. You should use small letter.**
---
Thanks to the [original author](https://github.com/EasyChris/obsidian-to-notion) for developing such a useful plugin that can synchronize Obsidian to Notion. However, the original repository can only sync Name and Tag information. For those like me who use [NotionNext](https://github.com/tangly1024/NotionNext) to set up their website, this presents some limitations. Every time I import, I need to make a lot of modifications.
Thus, based on the [original author's work](https://github.com/EasyChris/obsidian-to-notion), I've added a feature to match the [NotionNext](https://github.com/tangly1024/NotionNext) template. This way, you can edit directly in Obsidian and publish with a single click after organizing.
---
## Archive Update
### 2.1.0
- add confirmation interface for deleting a database 增加删除数据库的确认界面

View File

@@ -42,7 +42,7 @@ export class CustomModal extends Modal {
this.properties[propertyIndex].customType = value; // Update the customType of the specific property
});
}
)
)
} else {
propertyLine
.setName("Property " + (propertyIndex))
@@ -64,19 +64,19 @@ export class CustomModal extends Modal {
.addOption("select", "Select")
.addOption("multi_select", "Multi-Select")
.addOption("date", "Date")
.addOption("person", "Person")
// .addOption("person", "Person")
.addOption("file", "Files & Media")
.addOption("checkbox", "Checkbox")
.addOption("url", "URL")
.addOption("email", "Email")
.addOption("phone_number", "Phone Number")
.addOption("formula", "Formula")
.addOption("relation", "Relation")
.addOption("rollup", "Rollup")
.addOption("created_time", "Created time")
.addOption("created_by", "Created by")
.addOption("last_edited_time", "Last Edited Time")
.addOption("last_edited_by", "Last Edited By")
// .addOption("formula", "Formula")
// .addOption("relation", "Relation")
// .addOption("rollup", "Rollup")
// .addOption("created_time", "Created time")
// .addOption("created_by", "Created by")
// .addOption("last_edited_time", "Last Edited Time")
// .addOption("last_edited_by", "Last Edited By")
.setValue("text")
.onChange(async (value) => {
this.properties[propertyIndex].customType = value; // Update the customType of the specific property

View File

@@ -159,6 +159,44 @@ export class Upload2NotionCustom extends UploadBaseCustom {
start: value || new Date().toISOString(),
},
};
case "number":
return {
number: Number(value),
};
case "phone_number":
return {
phone_number: value,
};
case "email":
return {
email: value,
};
case "url":
return {
url: value,
};
case "files":
return {
files: Array.isArray(value) ? value.map(url => ({
name: url,
type: "external",
external: {
url: url,
},
})) : [
{
name: value,
type: "external",
external: {
url: value,
},
},
],
};
case "checkbox":
return {
checkbox: Boolean(value) || false,
};
case "select":
return {
select: {