ZMediumToMarkdown 1.9.7 → 1.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/Helper.rb +16 -11
- data/lib/ZMediumFetcher.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: cc121cbe8d2f06e2e6421872ff2f6950addd4affd46fe928172b9848da8e1517
|
4
|
+
data.tar.gz: 62e35936912a730a37c2424d6028fd3a780fe41aa0048ed717e81df02910dff2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e76c68cc1c4f1f56bf35bc6517a0814c8263367f6ebda4e33591dd29667ae597a7a0b6da1ca1485245522e45d1a7dfbe739e9e996c0addb8ffc6d1600b1940b
|
7
|
+
data.tar.gz: cfe0bce95d184b67fb1afb2c84407478384b617665162dae9908fda1cfd8ff68094bbde65016b2872eea9d91e5e5987890f04e41e572175712cf0cdfa6210064
|
data/lib/Helper.rb
CHANGED
@@ -98,7 +98,7 @@ class Helper
|
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
101
|
-
def self.createPostInfo(postInfo)
|
101
|
+
def self.createPostInfo(postInfo, isForJekyll)
|
102
102
|
|
103
103
|
title = postInfo.title.gsub("[","")
|
104
104
|
title = title.gsub("]","")
|
@@ -110,7 +110,9 @@ class Helper
|
|
110
110
|
result += "categories: #{postInfo.collectionName}\n"
|
111
111
|
result += "tags: [#{postInfo.tags.join(",")}]\n"
|
112
112
|
result += "description: #{postInfo.description}\n"
|
113
|
-
|
113
|
+
if isForJekyll
|
114
|
+
result += "render_with_liquid: false\n"
|
115
|
+
end
|
114
116
|
result += "---\n"
|
115
117
|
result += "\r\n"
|
116
118
|
|
@@ -184,16 +186,19 @@ class Helper
|
|
184
186
|
|
185
187
|
|
186
188
|
def self.createWatermark(postURL)
|
187
|
-
text = "
|
188
|
-
|
189
|
-
text += "\r\n"
|
190
|
-
text += "
|
191
|
-
text += "
|
192
|
-
text += "\r\n"
|
193
|
-
text += "
|
194
|
-
text += "
|
195
|
-
text += "\r\n"
|
189
|
+
text = ""
|
190
|
+
|
191
|
+
# text += "\r\n\r\n\r\n"
|
192
|
+
# text += "+-----------------------------------------------------------------------------------+"
|
193
|
+
# text += "\r\n"
|
194
|
+
# text += "\r\n"
|
195
|
+
# text += "| **[View original post on Medium](#{postURL}) - Converted by [ZhgChgLi](https://zhgchg.li)/[ZMediumToMarkdown](https://github.com/ZhgChgLi/ZMediumToMarkdown)** |"
|
196
|
+
# text += "\r\n"
|
197
|
+
# text += "\r\n"
|
198
|
+
# text += "+-----------------------------------------------------------------------------------+"
|
199
|
+
# text += "\r\n"
|
196
200
|
|
201
|
+
# no need to show any watermark :)
|
197
202
|
text
|
198
203
|
end
|
199
204
|
end
|
data/lib/ZMediumFetcher.rb
CHANGED
@@ -239,7 +239,7 @@ class ZMediumFetcher
|
|
239
239
|
Helper.createDirIfNotExist(postPathPolicy.getAbsolutePath(nil))
|
240
240
|
File.open(absolutePath, "w+") do |file|
|
241
241
|
# write postInfo into top
|
242
|
-
file.puts(Helper.createPostInfo(postInfo))
|
242
|
+
file.puts(Helper.createPostInfo(postInfo, isForJekyll))
|
243
243
|
|
244
244
|
index = 0
|
245
245
|
paragraphs.each do |paragraph|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ZMediumToMarkdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ZhgChgLi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|