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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/Helper.rb +16 -11
  3. data/lib/ZMediumFetcher.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 521c7a377c1e9b93996dc31355a8e7d6afb90708d154f69e31f4f20675bed060
4
- data.tar.gz: 396d663eaf2f302168dde595842f092bd0051094baf2cbf4974018c0b2aaf270
3
+ metadata.gz: cc121cbe8d2f06e2e6421872ff2f6950addd4affd46fe928172b9848da8e1517
4
+ data.tar.gz: 62e35936912a730a37c2424d6028fd3a780fe41aa0048ed717e81df02910dff2
5
5
  SHA512:
6
- metadata.gz: 57d8f51c5fe1fa5d193e0cdd1e7d11152a5010520867e54966681d064d0f30a7d81b57fb389c765ed8c522f896b4fad4e5ddb3bff9d58f6ae4687172cc381cfd
7
- data.tar.gz: 9c5dfe1ff916f9f9d6c288c3537fd9b542a664959f34101f573f66dd0ce2655611b930fb78396a7392c1998b8ae2c52bee9276e1250c40861ad7a97f2dce0809
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
- result += "render_with_liquid: false\n"
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 = "\r\n\r\n\r\n"
188
- text += "+-----------------------------------------------------------------------------------+"
189
- text += "\r\n"
190
- text += "\r\n"
191
- text += "| **[View original post on Medium](#{postURL}) - Converted by [ZhgChgLi](https://zhgchg.li)/[ZMediumToMarkdown](https://github.com/ZhgChgLi/ZMediumToMarkdown)** |"
192
- text += "\r\n"
193
- text += "\r\n"
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
@@ -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.7
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-17 00:00:00.000000000 Z
11
+ date: 2022-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri