qiita_org 0.1.29 → 0.1.30

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c58fb11dfd57ea6232e6e98e928d8d27f794f6f6ad87ecdf1fdcffb2ce1a6dbf
4
- data.tar.gz: 1b882620532dfbc2f74e3ce758f9ff4b73bac938454c534918a927a1f66ec08a
3
+ metadata.gz: 0f288634b1ce2de7e2a34ddc3fd7399cdb2a1b9e63e6d4b2523ec7cf3fc84601
4
+ data.tar.gz: a08fb2191f4e6cc80e3c40701df53bae8ae983cfaa225dfba57ede608d846c97
5
5
  SHA512:
6
- metadata.gz: 778ca2f40420b1436bdc851602b5a7ba97ec6f22e7e8ea5992779e18d793e7ac9070615e02e0dd67411a09ce7768d9be0992738808918e497ee472bc9de1fdfb
7
- data.tar.gz: e847a505b58de91a61004d8a00bae41689c1197ba4d6b317717eb84a81f1a3afe899bab7e92954ffaca92414612794df68c74de721662c52be673112e58a8759
6
+ metadata.gz: 0d01c3f1937f7033f7e4a7e2989492251bc53e18e1717ba394a0385afefc217df08a756c61a3cb580e24139199de80ef065d34019d122f00443359879b3cc865
7
+ data.tar.gz: afd6c322d5d5de441b55b5784e630ca9c401b5f028ce7636d68a8b12dfec8a3b0feb07dd8d458043077e1d3130a65a617f946784be87266a8044c26db18595b7
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- qiita_org (0.1.28)
4
+ qiita_org (0.1.29)
5
5
  colorize
6
6
  command_line (> 2.0.0)
7
7
  fileutils
@@ -121,13 +121,11 @@ module QiitaOrg
121
121
  template = QiitaGetTemplate.new(os).run()
122
122
  end
123
123
 
124
- desc "all", "post all org files in the directory"
125
- method_options hoge: :string
124
+ desc "all [teams/public/private] [options]", "post all org files in the directory"
125
+
126
126
  def all(*argv)
127
- mode = argv[0] || false
128
- # p [argv[0], argv[1]]
129
- puts options[:hoge]
130
- QiitaAll.new(mode).run()
127
+ #mode = argv[0] || false
128
+ QiitaAll.new(argv).run()
131
129
  end
132
130
 
133
131
  desc "list [qiita/teams]", "view qiita report list"
@@ -1,16 +1,19 @@
1
1
  require "colorize"
2
2
 
3
3
  class QiitaAll
4
- def initialize(mode)
5
- @mode = mode
4
+ def initialize(argv)
5
+ # @mode = mode
6
+ check_options(argv)
6
7
  @files = Dir.glob("*.org")
7
8
  p @files
8
9
  end
9
10
 
10
11
  def run()
11
12
  @files.each do |file|
12
- if file == "template.org"
13
- next
13
+ unless @exclude_files.empty?
14
+ if @exclude_files.include?(file)
15
+ next
16
+ end
14
17
  end
15
18
 
16
19
  unless @mode
@@ -28,4 +31,20 @@ class QiitaAll
28
31
  end
29
32
  end
30
33
  end
34
+
35
+ def check_options(string)
36
+ ["teams", "private", "public"].each do |i|
37
+ if string.include?(i)
38
+ @mode = i
39
+ break
40
+ else
41
+ @mode = false
42
+ end
43
+ end
44
+
45
+ @exclude_files = []
46
+ if string.include?("--exclude")
47
+ @exclude_files = string.grep(/.org/)
48
+ end
49
+ end
31
50
  end
@@ -1,3 +1,3 @@
1
1
  module QiitaOrg
2
- VERSION = "0.1.29"
2
+ VERSION = "0.1.30"
3
3
  end
@@ -1,3 +1,4 @@
1
+ #+qiita_private: baededc5aa906407da33
1
2
  #+OPTIONS: ^:{}
2
3
  #+STARTUP: indent nolineimages
3
4
  #+TITLE: title
@@ -1,3 +1,4 @@
1
+ #+qiita_teams: 7e95d62ebdbedd022256
1
2
  #+qiita_private: 6ce39fa8ae7f7a472cf2
2
3
  #+OPTIONS: ^:{}
3
4
  #+STARTUP: indent nolineimages
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qiita_org
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.29
4
+ version: 0.1.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenta Yamamoto