Skip to content

Commit f8a3631

Browse files
authored
Merge pull request #2 from Vaayne/featuer/notionai-chrome
add a chrome extension
2 parents 2dcc592 + 0a92a56 commit f8a3631

File tree

8 files changed

+811
-11
lines changed

8 files changed

+811
-11
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Package and Publish to Chrome Store
2+
# https://jam.dev/blog/automating-chrome-extension-publishing/
3+
4+
on:
5+
workflow_dispatch:
6+
push:
7+
tags:
8+
- chrome-v*.*.*
9+
10+
jobs:
11+
build-chrome-extension:
12+
name: Build Chrome extension artifact
13+
runs-on: ubuntu-latest
14+
defaults:
15+
run:
16+
working-directory: notionai-chrome
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
21+
- name: Build
22+
run: |-
23+
# fill in your build steps here...
24+
# we archive the dist folder and include SHA commit as the last step
25+
zip -r notionai-chrome-${{ github.event.pull_request.head.sha }}.zip notionai-chrome
26+
27+
- name: Archive chrome-extension artifact
28+
uses: actions/upload-artifact@v2
29+
with:
30+
name: notionai-chrome-${{ github.sha }}
31+
path: notionai-chrome-${{ github.event.pull_request.head.sha }}.zip

README.md

+23-11
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,32 @@ Unofficial NotionAI API
33

44
https://github.com/Vaayne/NotionAI
55

6-
## Feature
6+
## NotionAI Chrome Extension
7+
8+
[notionai-chrome](./notionai-chrome)
9+
10+
The NotionAI Chrome Extension is an open-source tool that provides a simple way to access the NotionAI API. It allows you to use NotionAI in any input field in Chrome with ease.
11+
12+
13+
## NotionAI Python SDK
14+
15+
NotionAI Python SDK, a wrapper for the NotionAI APIs with Python bindings. It simplifies integrating NotionAI solutions into your projects.
16+
17+
18+
### Feature
719

820
- Full APIs from Notion AI
921
- Support stream response
1022

11-
## API
23+
### API
1224

1325
We support all NotionAI's functionalites. You can find all the APIs in [NotionAI.py](./notionai/NotionAI.py)
1426

15-
### Basic API Shortcuts
27+
#### Basic API Shortcuts
1628

1729
APIs like blog_post, help_me_write, help_me_edit, summarize ... are shortcuts for the basic APIs.
1830

19-
### Advanced APIs
31+
#### Advanced APIs
2032

2133
Some times we don't want to call apis one by one, we want to dispatch by parameters, these are advanced APIs.
2234

@@ -58,26 +70,26 @@ We support these advanced APIs:
5870
```
5971
6072
61-
## Usage
73+
### Usage
6274
63-
### Install
75+
#### Install
6476
6577
```
6678
pip install --upgrade notionai-py
6779
```
6880
69-
### Get Notion Token
81+
#### Get Notion Token
7082
7183
1. Open Chrome / Firefix DevTools
7284
2. Find Cookies and copy value for `token_v2`
7385
7486
![](./docs/images/get_notion_token.png)
7587
76-
### Example
88+
#### Example
7789
7890
Please checkout [examples](./examples/)
7991
80-
#### Basic
92+
1. Basic
8193
8294
```python
8395
import os
@@ -95,7 +107,7 @@ if __name__ == "__main__":
95107
96108
```
97109

98-
#### Stream API
110+
2. Stream API
99111

100112
```python
101113
import os
@@ -116,6 +128,6 @@ if __name__ == "__main__":
116128
```
117129

118130

119-
#### WebUI
131+
3. WebUI
120132

121133
[webui](./examples/webui/README.md)

notionai-chrome/.gitignore

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# TypeScript v1 declaration files
45+
typings/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Microbundle cache
57+
.rpt2_cache/
58+
.rts2_cache_cjs/
59+
.rts2_cache_es/
60+
.rts2_cache_umd/
61+
62+
# Optional REPL history
63+
.node_repl_history
64+
65+
# Output of 'npm pack'
66+
*.tgz
67+
68+
# Yarn Integrity file
69+
.yarn-integrity
70+
71+
# dotenv environment variables file
72+
.env
73+
.env.test
74+
75+
# parcel-bundler cache (https://parceljs.org/)
76+
.cache
77+
78+
# Next.js build output
79+
.next
80+
81+
# Nuxt.js build / generate output
82+
.nuxt
83+
dist
84+
85+
# Gatsby files
86+
.cache/
87+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
88+
# https://nextjs.org/blog/next-9-1#public-directory-support
89+
# public
90+
91+
# vuepress build output
92+
.vuepress/dist
93+
94+
# Serverless directories
95+
.serverless/
96+
97+
# FuseBox cache
98+
.fusebox/
99+
100+
# DynamoDB Local files
101+
.dynamodb/
102+
103+
# TernJS port file
104+
.tern-port

notionai-chrome/README.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# NotionAI-Chrome
2+
3+
NotionAI Chrome Extension is an open-source tool that provides a simple way to access the NotionAI API. It allows you to use NotionAI in any input field in Chrome with ease.
4+
5+
## Requirements
6+
7+
To use the extension, your Chrome cookie must send requests to Notion. Therefore, you must first log in to https://notion.so and ensure that you have access to NotionAI.
8+
9+
## Usage
10+
11+
12+
I haven't uploaded it to the Chrome Store yet, so please download the repository and load it in developer mode.
13+
14+
1. Clone the repository: `git clone <https://github.com/Vaayne/NotionAI.git>`
15+
2. Go to `chrome://extensions/` and enable Developer mode
16+
3. Load the unpacked folder `notionai-chrome`
17+
4. Refresh any web page and select any text in an input box, then right-click to use NotionAI!

0 commit comments

Comments
 (0)