notion_to_md 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +40 -1
- data/lib/notion_to_md/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6f3d20369829f0cf5f2245eec32fcfc98a01b12edbf143451234922421ba2e1
|
4
|
+
data.tar.gz: eb3465f0295b9514fcf120efc1330d432d378c449ac5e1e279b19f0e6b8801f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 927753e91887ac4d10b6a325f77f862e55676c607936c2b7a193eb6a5dd9bddf8dcc5824c7d02e714c90037a119921d114cec116e8989d1c789ff63993a2791d
|
7
|
+
data.tar.gz: b3a457117754849fff34035373385811260c0bf25093208747f3dda6800a0107acf7d1ae46328bb25583428975e8155960f03cb84a53f070afc4bd15d7836949
|
data/README.md
CHANGED
@@ -1,2 +1,41 @@
|
|
1
1
|
# notion_to_md
|
2
|
-
Notion Markdown Exporter in Ruby
|
2
|
+
Notion Markdown Exporter in Ruby.
|
3
|
+
|
4
|
+
## Installation
|
5
|
+
Use gem to install.
|
6
|
+
```bash
|
7
|
+
$ gem install 'notion_to_md'
|
8
|
+
```
|
9
|
+
|
10
|
+
Or add it to the `Gemfile`.
|
11
|
+
```ruby
|
12
|
+
# Gemfile
|
13
|
+
gem 'notion_to_md'
|
14
|
+
```
|
15
|
+
|
16
|
+
## Usage
|
17
|
+
Before using the gem create an integration and generate a secret token. Check [notion getting started guide](https://developers.notion.com/docs/getting-started) to learn more.
|
18
|
+
|
19
|
+
Pass the page id and secret token to the constructor and execute the `convert` method.
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require 'notion_to_md'
|
23
|
+
|
24
|
+
notion_converter = NotionToMd::Converter.new(page_id: 'b91d5...', token: 'secret_...')
|
25
|
+
md = notion_converter.convert
|
26
|
+
```
|
27
|
+
|
28
|
+
If the secret token is provided as an environment variable —`NOTION_TOKEN`—, there's no need to pass it as an argument to the constructor.
|
29
|
+
|
30
|
+
```bash
|
31
|
+
$ export NOTION_TOKEN=<secret_...>
|
32
|
+
```
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
require 'notion_to_md'
|
36
|
+
|
37
|
+
notion_converter = NotionToMd::Converter.new(page_id: 'b91d5...')
|
38
|
+
md = notion_converter.convert
|
39
|
+
```
|
40
|
+
|
41
|
+
And that's all. The `md` is a string variable containing the notion page formatted in markdown.
|
data/lib/notion_to_md/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notion_to_md
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Enrique Arias
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: notion-ruby-client
|
@@ -48,7 +48,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
48
48
|
requirements:
|
49
49
|
- - ">="
|
50
50
|
- !ruby/object:Gem::Version
|
51
|
-
version:
|
51
|
+
version: '0'
|
52
52
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - ">="
|