Skip to content

Commit a359dbd

Browse files
authored
Merge pull request #46 from kaedea/develop
Update README
2 parents 4fd3854 + d4d45fb commit a359dbd

File tree

1 file changed

+21
-12
lines changed

1 file changed

+21
-12
lines changed

README.md

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[🇨🇳](https://www.kaedea.com/2021/05/01/devops/project-notion-down/) [🇯🇵](https://www.kaedea.com/2021/05/01/devops/project-notion-down-jp/)
55

66
<!-- ColumnList BGN -->
7-
![](https://circleci.com/gh/kaedea/notion-down.svg?style=shield&circle-token=9f4dc656e94d8deccd362e52400c96e709c7e8b3&keep-url-source=true)
7+
![](https://github.com/kaedea/notion-down/actions/workflows/check-pr.yml/badge.svg)
88

99
<!-- ColumnList END -->
1010

@@ -60,35 +60,37 @@ What can NotionDown do now:
6060
- ~~HEXO generate~~
6161
- HEXO tags plugin
6262
- PyPI Publish
63+
- WIP
6364
- Notion APIs
64-
- ~~notion-py (3rd party)~~
65-
- notion-sdk (official)
65+
- ~~notion-py (3rd party)~~, as legacy mechanism, see **Support of Legacy APIs (token_v2)** part at bottom.
66+
- ~~notion-sdk (official)~~, current mechanism
6667

6768
## Hot It Works
6869

6970
![NotionDown Workflows](/assets/notiondown_workflows_notiondown.png)
7071

71-
NotionDown read Notion pages data using [notion-py](https://github.com/jamalex/notion-py), and then write pages into MD files.
72+
NotionDown read Notion pages data using [notion-sdk-py](https://github.com/ramnes/notion-sdk-py), and then write pages into MD files.
7273

7374
### Basic usage
7475

75-
> notion-down >> Notion APIs (notion-py) >> Notion pages data >> generating MD files
76+
> notion-down >> Notion APIs (notion-sdk-py) >> Notion pages data >> generating MD files
7677
7778
### Advanced usage
7879

79-
> WebHook >> notion-down >> Notion APIs (notion-py) >> Notion pages data >> generating MD files >> Copy into Hexo source >> generating webpages >> push to GitHub pages
80+
> WebHook >> notion-down >> Notion APIs (notion-sdk-py) >> Notion pages data >> generating MD files >> Copy into Hexo source >> generating webpages >> push to GitHub pages
8081
8182
## Getting Started
8283

8384
### Prepare
8485

8586
To get started with NotionDown, you should:
8687

87-
1. Prepare your Notion username(email) and password, or directly use `notion_token_v2`.
88+
1. Prepare your Notion [Integration Token](https://developers.notion.com/docs/getting-started).
8889
1. Prepare `public notion blog_url` as root post for NotionDown to get the pages you want to handle.
8990
1. Run `notion-down/main.py` with your configs.
9091

91-
Check [here](https://github.com/kaedea/notion-down/blob/master/dist/parse_readme/notiondown_gettokenv2.md) to get `notion_token_v2`.
92+
Check [here](https://developers.notion.com/docs/getting-started) to get `notion_token`.
93+
(For supported of legacy APIs with token_v2 & notion-py, see branch [archive/token-v2-support](https://github.com/kaedea/notion-down/tree/archive/token-v2-support).)
9294

9395
Duplicate [NotionDown Posts Template](https://www.notion.so/kaedea/NotionDown-Posts-Template-f77f3322915a4ab48caa0f2e76e9d733) to your own notion and take it as `blog_url` (or you can just use your existing blog post url). Note that, for now the root page should be public as well as placed in root path of notion workspace.
9496

@@ -101,9 +103,7 @@ Basically just run `notion-down/main.py` :
101103
# Run with cli cmd
102104
PYTHONPATH=./ python main.py \
103105
--blog_url <Notion Post Url> \
104-
--token_v2 <token_v2>
105-
--username <username> # Only when token_v2 is not presented
106-
--password <password> # Only when token_v2 is not presented
106+
--notion_token <notion_token>
107107

108108
# or
109109
PYTHONPATH=./ python main.py \
@@ -119,8 +119,13 @@ For custom configurations in details, see [Custom Configurations](https://github
119119
Also check the following procedures as showcase usages for NotionDown.
120120

121121
### CI Build Script
122+
See GitHub Actions building scripts at `/.github/workflows`.
122123

123-
See building script at `/.circleci/config.yaml`.
124+
- `build-readme.yml`: GitHub Actions workflow that generating README for this repo.
125+
- `build-hexo.yml`: GitHub Actions workflow that generating Hexo posts for https://github.com/kaedea/notion-down-hexo-showcase.
126+
- `pycorrector-test.yml`: GitHub Actions workflow that that executing spelling check for the test posts.
127+
128+
Also see building script at `/.circleci/config.yaml`.
124129

125130
- `test-build-readme`: CircleCI jobs generating README for this repo.
126131
- `test-build-hexo`: CircleCI jobs generating Hexo posts for [https://github.com/kaedea/notion-down-hexo-showcase](https://github.com/kaedea/notion-down-hexo-showcase).
@@ -140,6 +145,10 @@ See the usage showcase jobs at [/jobs](/jobs), and jobs outputs at [/dist](/dist
140145
See unittest cases at `test/`.
141146

142147

148+
## Support of Legacy APIs (token_v2)
149+
The lastest APIs of notion-down has been migrated form `3rd-party token_v2` to `official integration token`. For supported of legacy APIs with token_v2 & notion-py, see branch [archive/token-v2-support](https://github.com/kaedea/notion-down/tree/archive/token-v2-support).
150+
151+
143152
---
144153

145154
> This page is generated by [notion-down](https://github.com/kaedea/notion-down) from [notion.so NotionDown-README](https://www.notion.so/kaedea/NotionDown-README-d3463f3d398743879d663caf87efa029).

0 commit comments

Comments
 (0)