Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zhgchgli0718 committed Jun 10, 2022
1 parent 3bd9b9b commit 3bac01d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ZMediumToMarkdown.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
gem.files = Dir['lib/**/*.*']
gem.executables = ['ZMediumToMarkdown']
gem.name = 'ZMediumToMarkdown'
gem.version = '1.7.0'
gem.version = '1.7.1'

gem.license = "MIT"

Expand Down
2 changes: 1 addition & 1 deletion ZMediumToMarkdown_Github.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
gem.files = Dir['lib/**/*.*']
gem.executables = ['ZMediumToMarkdown']
gem.name = 'zmediumtomarkdown'
gem.version = '1.7.0'
gem.version = '1.7.1'

gem.license = "MIT"

Expand Down
8 changes: 4 additions & 4 deletions bin/ZMediumToMarkdown
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,29 @@ class Main
opts.banner = "Usage: ZMediumFetcher [options]"

opts.on('-uUSERNAME', '--username=USERNAME', 'Downloading all posts from user') do |username|
outputFilePath = PathPolicy.new(filePath, "/")
outputFilePath = PathPolicy.new(filePath, "Output")
fetcher.downloadPostsByUsername(username, outputFilePath)

Helper.printNewVersionMessageIfExists()
end

opts.on('-pPOST_URL', '--postURL=POST_URL', 'Downloading single post') do |postURL|
outputFilePath = PathPolicy.new(filePath, "/")
outputFilePath = PathPolicy.new(filePath, "Output")
fetcher.downloadPost(postURL, outputFilePath)

Helper.printNewVersionMessageIfExists()
end

opts.on('-jUSERNAME', '--jekyllUsername=USERNAME', 'Downloading all posts from user with Jekyll friendly') do |username|
outputFilePath = PathPolicy.new(filePath, "Output")
outputFilePath = PathPolicy.new(filePath, "/")
fetcher.isForJekyll = true
fetcher.downloadPostsByUsername(username, outputFilePath)

Helper.printNewVersionMessageIfExists()
end

opts.on('-kpPOST_URL', '--jekyllPostURL=POST_URL', 'Downloading single post with Jekyll friendly') do |postURL|
outputFilePath = PathPolicy.new(filePath, "Output")
outputFilePath = PathPolicy.new(filePath, "/")
fetcher.isForJekyll = true
fetcher.downloadPost(postURL, outputFilePath)

Expand Down
4 changes: 0 additions & 4 deletions lib/ZMediumFetcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,6 @@ def downloadPost(postURL, pathPolicy)
if !linkParser.nil?
result = linkParser.parse(result, paragraph.markupLinks)
end

if paragraph.orgText == "延伸閱讀" or result.include? "Like Z Realm" or paragraph.orgText == "有任何問題及指教歡迎與我聯絡。"
break
end

file.puts(result)

Expand Down

0 comments on commit 3bac01d

Please sign in to comment.