Skip to content

Commit

Permalink
modify mdAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
Yue Cai committed Nov 4, 2016
1 parent c75509b commit 1971988
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions smms.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
=begin
This is a Alfred 3.0 workflow. Used for getting image url from sm.ms.
Contact me at https://github.com/caiyue1993/smms-alfred-workflow or visit my blog http://soledad.me
=end

require 'rest-client'
require 'json'


filename = ARGV[0].to_i

filePath = "/Users/caiyue/Desktop/" << "#{filename}" << ".png"
Expand All @@ -14,7 +14,8 @@
returnData = JSON.parse(response)

url = returnData["data"]["url"]
mdAddress = "!" << url
mdAddress = "![](" << url << ")"

xml = <<EOS
<xml>
<items>
Expand Down

0 comments on commit 1971988

Please sign in to comment.