notion_to_md 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/notion_to_md/converter.rb +3 -1
- data/lib/notion_to_md/page.rb +3 -6
- data/lib/notion_to_md/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce6b39ba9cc39e1428bc8a654532d16b9ea99054e3fbd96cf30edd56cbed28a8
|
4
|
+
data.tar.gz: 6e38131568bb150a9ca7904f383fd8ade5721ccc5affe2949672b597b948ffe3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ccfa65a6877fd1bcdc9a36f72094cc8374934a2713abfc10441b23348b919818539c286469afad699f69594dc854a12f884299d2c335ff6cd9bc17d920bbcb6
|
7
|
+
data.tar.gz: fd638c9a53e8c6f6cf644e2e471fc7ecf8150bb1ef371d9f6f41215e4d1bd953d1929113c25dc703dd66647165adf84bbf9f7bddcb6494d8b0bcea5bd06f2741
|
@@ -37,7 +37,9 @@ module NotionToMd
|
|
37
37
|
|
38
38
|
def parse_frontmatter
|
39
39
|
notion_page = Page.new(page: page)
|
40
|
-
frontmatter = notion_page.props.to_a.map
|
40
|
+
frontmatter = notion_page.props.to_a.map do |k, v|
|
41
|
+
"#{k}: #{v}"
|
42
|
+
end.join("\n")
|
41
43
|
<<~CONTENT
|
42
44
|
---
|
43
45
|
#{frontmatter}
|
data/lib/notion_to_md/page.rb
CHANGED
@@ -73,8 +73,7 @@ module NotionToMd
|
|
73
73
|
class CustomProperty
|
74
74
|
class << self
|
75
75
|
def multi_select(prop)
|
76
|
-
|
77
|
-
"[#{multi_select}]"
|
76
|
+
prop.multi_select.map(&:name)
|
78
77
|
end
|
79
78
|
|
80
79
|
def select(prop)
|
@@ -82,13 +81,11 @@ module NotionToMd
|
|
82
81
|
end
|
83
82
|
|
84
83
|
def people(prop)
|
85
|
-
|
86
|
-
"[#{people}]"
|
84
|
+
prop.people.map(&:name)
|
87
85
|
end
|
88
86
|
|
89
87
|
def files(prop)
|
90
|
-
|
91
|
-
"[#{files}]"
|
88
|
+
prop.files.map { |f| f.file.url }
|
92
89
|
end
|
93
90
|
|
94
91
|
def phone_number(prop)
|
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.2.
|
4
|
+
version: 0.2.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-02-
|
11
|
+
date: 2022-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|