Sha256: 407295d6eff0b5dbdd8469399cff0aca582c5bb5d6c73f5093718b9a198d1717
Contents?: true
Size: 1.22 KB
Versions: 3
Compression:
Stored size: 1.22 KB
Contents
#! /usr/bin/ruby require 'thor' require './lib/git2pdf' #require 'password' class Git2PdfBash < Thor desc "gen <repository1,repository2>", "Create a PDF for the open issues in a given repository." option :repos, :default => "", aliases: :r option :user, aliases: :u option :password, aliases: :p, :default=>nil option :organisation, aliases: :o def gen(repositories="") repos = repositories.split(',').collect { |r| r.strip } if repos.empty? repos = options[:repos].split(',').collect { |r| r.strip } unless options[:repos] == "repos" end puts "Creating a PDF of GitHub issues for repos: #{repos.join(', ')}" puts "Using organisation #{options[:organisation]}" if options[:organisation] pass = options[:password] if options[:password] == "password" or options[:password].nil? or options[:password].strip.length == 0 #option[:password] = Password.get("GitHub Password:") puts "Password: " pass = STDIN.noecho(&:gets) pass = pass.strip.gsub(/\n/,'') end g = Git2Pdf.new repos: repos, basic_auth: [options[:user],pass], org: options[:organisation], user: options[:user] done = g.execute puts "\n#{done} cards output to issues.pdf" end end Git2PdfBash.start(ARGV)
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
git2pdf-0.1.2 | bin/git2pdf |
git2pdf-0.1.1 | bin/git2pdf |
git2pdf-0.1.0 | bin/git2pdf |