notion_to_md 1.1.0 → 1.1.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: edaf453c97dcc2d166335f7179ea81845b44da0991e07b75f2e230288b141655
4
- data.tar.gz: ff82f6e0a124195467797f10472bb3ce6e7460f43da2a5ff5f55cbdf0ae74cd6
3
+ metadata.gz: b11e8415fbf22af0f2a346cdb5e5ed5fd79cf3736f37d2d047d8d11bf1b4e362
4
+ data.tar.gz: 57b5b92fb1a01faa5334c85926742e50682553d44c5ef3d96c5b7278ca27a70f
5
5
  SHA512:
6
- metadata.gz: 9f6c340abef5d82806618e3e4a30abaa320b1bc996760cc0f1a80211277a313009367b7f74c271ff27b668c2fc7402819a87c3c45408a70d41fc515db0afb47c
7
- data.tar.gz: 764f05022696b17c425784ae8aa7ba7a1648b9fc4172914b21c0c7c7165bbded342596edad993e51ee78ed6e512985a9fa5c21e1b31d0746e5363896c86ee3e7
6
+ metadata.gz: 501c58bec83d950a0f7a1c69da2ff542d00745704c3557aea0b159fd87a587702def108b174915ec6beabb5b67509fbc790491493644e4be9859079fcd5ffb99
7
+ data.tar.gz: fc5cf12e22528194b2a877333b73c0d28ed1d76f19a49e204a002bff0ceee60654935009d09155b57b391e463e792522cf29e027d5e565326ae46c3f8bb7f966
data/README.md CHANGED
@@ -40,8 +40,24 @@ md = notion_converter.convert
40
40
 
41
41
  And that's all. The `md` is a string variable containing the notion page formatted in markdown.
42
42
 
43
+ ## Blocks
43
44
 
44
- ### Front matter
45
+ Everything in a notion page body is a [block object](https://developers.notion.com/reference/block#block-object-keys). Therefore, not every type can be mapped to Markdown. Below there's a list of current supported blocks types.
46
+
47
+ * `paragraph`
48
+ * `heading_1`
49
+ * `heading_2`
50
+ * `heading_3`
51
+ * `bulleted_list_item`
52
+ * `numbered_list_item` as `bulleted_list_item`
53
+ * `to_do`
54
+ * `image`
55
+ * `bookmark`
56
+ * `callout`
57
+ * `quote`
58
+ * `divider`
59
+
60
+ ## Front matter
45
61
 
46
62
  From version 0.2.0, notion_to_md supports front matter in markdown files.
47
63
 
@@ -51,7 +67,7 @@ By default, the front matter section is not included to the document. To do so,
51
67
  NotionToMd::Converter.new(page_id: 'b91d5...').convert(frontmatter: tue)
52
68
  ```
53
69
 
54
- Default notion properties are page `id`, `title`, `created_time`, `last_edited_time`, `icon`, `archived` and `cover`.
70
+ Default notion [properties](https://developers.notion.com/reference/property-object) are page `id`, `title`, `created_time`, `last_edited_time`, `icon`, `archived` and `cover`.
55
71
 
56
72
  ```yml
57
73
  ---
@@ -33,7 +33,6 @@ module NotionToMd
33
33
  "- #{convert_text(block)}"
34
34
  end
35
35
 
36
- # TODO: numbered_list_item
37
36
  def numbered_list_item(block)
38
37
  Logger.info('numbered_list_item type not supported. Shown as bulleted_list_item.')
39
38
  bulleted_list_item(block)
@@ -50,7 +49,7 @@ module NotionToMd
50
49
  language = block[:language]
51
50
  text = convert_text(block)
52
51
 
53
- "```#{language}\n\t#{text}\n```"
52
+ "```#{language}\n#{text}\n```"
54
53
  end
55
54
 
56
55
  def embed(block)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NotionToMd
4
- VERSION = '1.1.0'
4
+ VERSION = '1.1.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: 1.1.0
4
+ version: 1.1.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: 2022-03-09 00:00:00.000000000 Z
11
+ date: 2022-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport