ZMediumToMarkdown 1.7.4 → 1.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/ZMediumToMarkdown +0 -8
- data/lib/Parsers/IMGParser.rb +3 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c346ebddf4a54f030cce4ea3248ccf3fe9d2f564f02a2d43771224677385f94a
|
4
|
+
data.tar.gz: 5a69488e4d00b56480237693bff409ee8890039ef7e9470df5226882af64a7c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e078b4d7d914cee844222f45dcbbd0fb756d52786e01c15cbcc5495356b35b48dca9c7d303b4fa9c2e1c11e8086f1751b4cc6df8c759573432fd546491c4a60b
|
7
|
+
data.tar.gz: 586e5b2e6b6a9947ff73237edfde4c4786853eac3ec513ef089e12b018c3cc27feca53ca584f9f9ed63d74bb1990dbd3219ff02ca92744a8f142a0827d3b634d
|
data/bin/ZMediumToMarkdown
CHANGED
@@ -48,14 +48,6 @@ class Main
|
|
48
48
|
Helper.printNewVersionMessageIfExists()
|
49
49
|
end
|
50
50
|
|
51
|
-
opts.on('-cPOST_URL', '--jekyllPostURL=POST_URL', 'Downloading single post with Jekyll friendly') do |postURL|
|
52
|
-
outputFilePath = PathPolicy.new(filePath, "/")
|
53
|
-
fetcher.isForJekyll = true
|
54
|
-
fetcher.downloadPost(postURL, outputFilePath)
|
55
|
-
|
56
|
-
Helper.printNewVersionMessageIfExists()
|
57
|
-
end
|
58
|
-
|
59
51
|
opts.on('-n', '--new', 'Update to latest version') do
|
60
52
|
if Helper.getRemoteVersionFromGithub() > Helper.getLocalVersion()
|
61
53
|
Helper.downloadLatestVersion()
|
data/lib/Parsers/IMGParser.rb
CHANGED
@@ -24,20 +24,16 @@ class IMGParser < Parser
|
|
24
24
|
absolutePath = imagePathPolicy.getAbsolutePath(fileName)
|
25
25
|
|
26
26
|
result = ""
|
27
|
-
comment = ""
|
28
|
-
if paragraph.orgText != ""
|
29
|
-
comment = " \"#{paragraph.orgText}\""
|
30
|
-
end
|
31
27
|
|
32
28
|
if ImageDownloader.download(absolutePath, imageURL)
|
33
29
|
relativePath = "#{pathPolicy.getRelativePath(nil)}/#{imagePathPolicy.getRelativePath(fileName)}"
|
34
30
|
if isForJekyll
|
35
|
-
result = "\r\n![#{paragraph.
|
31
|
+
result = "\r\n![#{paragraph.orgText}](/#{relativePath} \"#{paragraph.orgText}\")\r\n"
|
36
32
|
else
|
37
|
-
result = "\r\n![#{paragraph.
|
33
|
+
result = "\r\n![#{paragraph.orgText}](#{relativePath} \"#{paragraph.orgText}\")\r\n"
|
38
34
|
end
|
39
35
|
else
|
40
|
-
result = "\r\n![#{paragraph.
|
36
|
+
result = "\r\n![#{paragraph.orgText}](#{imageURL} \"#{paragraph.orgText}\")\r\n"
|
41
37
|
end
|
42
38
|
|
43
39
|
if paragraph.text != ""
|