hexo2notionnext


Namehexo2notionnext JSON
Version 0.0.9 PyPI version JSON
download
home_pagehttps://github.com/zhangweidev/hexo2notionnext
SummaryConvert hexo to notionnext
upload_time2023-04-10 06:34:42
maintainer
docs_urlNone
authorzhangwei
requires_python
licenseMIT
keywords hexo notion notion.so notion-py markdown md converter
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Hexo to NotionNext

## [中文](README.md) [English](README.EN.md)

一个简单的 hexo 导入到 [NotionNext](https://github.com/tangly1024/NotionNext) 或 [nobelium](https://github.com/craigary/nobelium)   database 的库


## 使用

在使用此库之前,您需要完成以下准备工作:

1. Notion Database 
   
   notionnext:  https://tangly1024.com/article/vercel-deploy-notion-next 
   
   nobelium:  https://github.com/craigary/nobelium


2. Hexo 博客的 _post 目录


3. 安装
```
pip install hexo2notionnext 
```

4. 在安装完库之后,创建配置文件 config.yaml 的配置
```
token_v2: <your_token>
database_url: <your_notion_database_url>
hexo_post_path: <your_hexo_post_path>
sulg_format: ':year-:day-:month-:name'
type: notionnext # or nobelium 
```
  
- **token_v2**
notion.so  cookie 中 token_v2 的值

- **database_url**
如果没有, duplicate 下面的到你的 notion
notionNext  Duplicate 这个 [notionNext Notion template](https://tanghh.notion.site/02ab3b8678004aa69e9e415905ef32a5?v=b7eb215720224ca5827bfaa5ef82cf2d) 

nobelium Duplicate 这个 [ nobeliumNotion template](https://craigary.notion.site/866916e3b939468b9b6f1d47dce99f9c)

- **hexo_post_path**
本地 Hexo 目录 的 `source/_posts` 目录

- **sulg_format**
路径的格式参考 https://hexo.io/zh-cn/docs/permalinks ,不支持 :id,  

- **type**
notionnext  or nobelium 


5. 配置完成后,使用以下命令将Hexo文章导入到NotionNext 的 database 中:

```
hexo2notionnext -c config.yaml 
```

## 问题
- For those getting 'HTTPError( requests.exceptions.HTTPError: Invalid input.)' 
  出现这个问题 
1. 在终端上运行 `pip show notion`
2. 获取 notion 包位置并访问其内容(例如`/usr/local/lib/python3.9/site-packages/notion` )。
3. 将 `store.py`  第 280 行更改为 `limit: 100`
https://github.com/paperboi/kindle2notion/issues/14 

    
## 感谢

https://github.com/Cobertos/md2notion 

https://github.com/jamalex/notion-py

## 许可证

The MIT License.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/zhangweidev/hexo2notionnext",
    "name": "hexo2notionnext",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "hexo notion notion.so notion-py markdown md converter",
    "author": "zhangwei",
    "author_email": "chxxiu+dev@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/2b/4e/f2f244d8bdc0ce8451eca4b14eb6cea7c8dc4269653f6350bb6f0de94fe0/hexo2notionnext-0.0.9.tar.gz",
    "platform": null,
    "description": "# Hexo to NotionNext\n\n## [\u4e2d\u6587](README.md) [English](README.EN.md)\n\n\u4e00\u4e2a\u7b80\u5355\u7684 hexo \u5bfc\u5165\u5230 [NotionNext](https://github.com/tangly1024/NotionNext) \u6216 [nobelium](https://github.com/craigary/nobelium)   database \u7684\u5e93\n\n\n## \u4f7f\u7528\n\n\u5728\u4f7f\u7528\u6b64\u5e93\u4e4b\u524d\uff0c\u60a8\u9700\u8981\u5b8c\u6210\u4ee5\u4e0b\u51c6\u5907\u5de5\u4f5c\uff1a\n\n1. Notion Database \n   \n   notionnext:  https://tangly1024.com/article/vercel-deploy-notion-next \n   \n   nobelium:  https://github.com/craigary/nobelium\n\n\n2. Hexo \u535a\u5ba2\u7684 _post \u76ee\u5f55\n\n\n3. \u5b89\u88c5\n```\npip install hexo2notionnext \n```\n\n4. \u5728\u5b89\u88c5\u5b8c\u5e93\u4e4b\u540e\uff0c\u521b\u5efa\u914d\u7f6e\u6587\u4ef6 config.yaml \u7684\u914d\u7f6e\n```\ntoken_v2: <your_token>\ndatabase_url: <your_notion_database_url>\nhexo_post_path: <your_hexo_post_path>\nsulg_format: ':year-:day-:month-:name'\ntype: notionnext # or nobelium \n```\n  \n- **token_v2**\nnotion.so  cookie \u4e2d token_v2 \u7684\u503c\n\n- **database_url**\n\u5982\u679c\u6ca1\u6709, duplicate \u4e0b\u9762\u7684\u5230\u4f60\u7684 notion\nnotionNext  Duplicate \u8fd9\u4e2a [notionNext Notion template](https://tanghh.notion.site/02ab3b8678004aa69e9e415905ef32a5?v=b7eb215720224ca5827bfaa5ef82cf2d) \n\nnobelium Duplicate \u8fd9\u4e2a [ nobeliumNotion template](https://craigary.notion.site/866916e3b939468b9b6f1d47dce99f9c)\n\n- **hexo_post_path**\n\u672c\u5730 Hexo \u76ee\u5f55 \u7684 `source/_posts` \u76ee\u5f55\n\n- **sulg_format**\n\u8def\u5f84\u7684\u683c\u5f0f\u53c2\u8003 https://hexo.io/zh-cn/docs/permalinks ,\u4e0d\u652f\u6301 :id,  \n\n- **type**\nnotionnext  or nobelium \n\n\n5. \u914d\u7f6e\u5b8c\u6210\u540e,\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5c06Hexo\u6587\u7ae0\u5bfc\u5165\u5230NotionNext \u7684 database \u4e2d\uff1a\n\n```\nhexo2notionnext -c config.yaml \n```\n\n## \u95ee\u9898\n- For those getting 'HTTPError( requests.exceptions.HTTPError: Invalid input.)' \n  \u51fa\u73b0\u8fd9\u4e2a\u95ee\u9898 \n1. \u5728\u7ec8\u7aef\u4e0a\u8fd0\u884c `pip show notion`\n2. \u83b7\u53d6 notion \u5305\u4f4d\u7f6e\u5e76\u8bbf\u95ee\u5176\u5185\u5bb9\uff08\u4f8b\u5982`/usr/local/lib/python3.9/site-packages/notion` \uff09\u3002\n3. \u5c06 `store.py`  \u7b2c 280 \u884c\u66f4\u6539\u4e3a `limit: 100`\nhttps://github.com/paperboi/kindle2notion/issues/14 \n\n    \n## \u611f\u8c22\n\nhttps://github.com/Cobertos/md2notion \n\nhttps://github.com/jamalex/notion-py\n\n## \u8bb8\u53ef\u8bc1\n\nThe MIT License.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Convert hexo  to notionnext",
    "version": "0.0.9",
    "split_keywords": [
        "hexo",
        "notion",
        "notion.so",
        "notion-py",
        "markdown",
        "md",
        "converter"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4ef92834ec23536d74ebe2fbf06d85e52e52521b913eabf3a010421bd86cb8e5",
                "md5": "602f43204588e3080399f3e840152fbc",
                "sha256": "68091a311cb711164ebcd75308b052aa2e68c7405ebcec04e45c3428fa06cd63"
            },
            "downloads": -1,
            "filename": "hexo2notionnext-0.0.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "602f43204588e3080399f3e840152fbc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6493,
            "upload_time": "2023-04-10T06:34:39",
            "upload_time_iso_8601": "2023-04-10T06:34:39.561982Z",
            "url": "https://files.pythonhosted.org/packages/4e/f9/2834ec23536d74ebe2fbf06d85e52e52521b913eabf3a010421bd86cb8e5/hexo2notionnext-0.0.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2b4ef2f244d8bdc0ce8451eca4b14eb6cea7c8dc4269653f6350bb6f0de94fe0",
                "md5": "8c01c4c398705049e62180d404dd887f",
                "sha256": "db0db225de92ff76c2b5f38384898e6647cb8dc822f9b20543d658bf5bf40ba8"
            },
            "downloads": -1,
            "filename": "hexo2notionnext-0.0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "8c01c4c398705049e62180d404dd887f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5718,
            "upload_time": "2023-04-10T06:34:42",
            "upload_time_iso_8601": "2023-04-10T06:34:42.173968Z",
            "url": "https://files.pythonhosted.org/packages/2b/4e/f2f244d8bdc0ce8451eca4b14eb6cea7c8dc4269653f6350bb6f0de94fe0/hexo2notionnext-0.0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-10 06:34:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "zhangweidev",
    "github_project": "hexo2notionnext",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "hexo2notionnext"
}
        
Elapsed time: 0.05419s