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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: df84120caddccce07f99e140867a59ca176ee9c639a019785ef74faea03de32b
4
- data.tar.gz: 5d95ff8014362018d505944b3b1afaf6593fac9f3f90cab28f6abd645843b39f
3
+ metadata.gz: e6f3d20369829f0cf5f2245eec32fcfc98a01b12edbf143451234922421ba2e1
4
+ data.tar.gz: eb3465f0295b9514fcf120efc1330d432d378c449ac5e1e279b19f0e6b8801f4
5
5
  SHA512:
6
- metadata.gz: 24a41732b091218c1c3b9b428714419a9ce993669d5edde0baa011cfb6953cb4db433aa8dc4536670577062b7a304b4d686361b756580800afcb72ebe2ab95b1
7
- data.tar.gz: c2a9e707c602366f8f9e5d811c7010a65cdcf7c0a6fff17353b3a04a5cc28db7be452e453c5ee218b24a007c1c5d753aefb44c443c77e16cec1028097fcc71bf
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.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NotionToMd
4
- VERSION = '0.0.0'
4
+ VERSION = '0.0.1'
5
5
  end
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.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-28 00:00:00.000000000 Z
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: 2.7.3
51
+ version: '0'
52
52
  required_rubygems_version: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - ">="