Sha256: d9b9d2612d624e7b973c44165118e36badbbf2dd68707e504b4b754c2c345f7c
Contents?: true
Size: 736 Bytes
Versions: 1
Compression:
Stored size: 736 Bytes
Contents
# encoding: utf-8 module Nokaya class App < Thor package_name "Nokaya" require_relative 'getter' require_relative 'image' require_relative 'status' desc "instagram", "Get the main photo from an Instagram page (nokaya -i url)" map "-i" => :instagram option :name, aliases: "-n", type: :string, desc: "Specify a file name without extension" def instagram *args abort Status.no_url if args.empty? nokaya = Getter.new options, :instagram, args page = nokaya.parse_page img_link = nokaya.get_link page puts Status.downloading img_link path = Image.photo_name nokaya Image.save_image(path, nokaya.get_image(img_link)) puts Status.saved path end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nokaya-0.0.2 | lib/nokaya/app.rb |