qiita_org 0.1.20 → 0.1.21

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: 0bb85efad88dee4bf4f1e6516b492da4c91e49e957c7125826367cc83f99249b
4
- data.tar.gz: c4acfb2d0b07099a154fe9f0bda5293901614baf42bed61d6d54b3af0f78068e
3
+ metadata.gz: '08e12d5c8b442eedf009fa8f48b4e2f0b1af5379600ccf15a1c1d1d035481a05'
4
+ data.tar.gz: 3841ad75ffacd131b9f6dd55fa7dfd098e3ea78af2c1cf539158c193efaae356
5
5
  SHA512:
6
- metadata.gz: eaa82eb2bb51cf9c0a5f223c451475d54419638e25c49a933b872cfe6c5e71486b85292b61e4c6366d70f19eea3f83d8c6ea38028eb3e95a58a453b0482e80ae
7
- data.tar.gz: 387089efb347315589648aebbb144d773a85a20654b037bb16848051b79e98c0b928d10d294ad950669f1536ba821f7395828b644efd76be23e8ef3b74efda6f
6
+ metadata.gz: ca8bfb7e6d185931783d261776ae3335478df595b7411afd07a8fbf71f1f4e6d509eece8f661af95d97f4add8559f8b5bbf2d0b8cacee208077d1112c9e4e94e
7
+ data.tar.gz: f1a7b942323d6294f38bc4f21ca70ed081ca4bb331dad8d40e171fd3499bb7f6040fd3eef75a133fb00500cd209298d49156f0f0d97956a0d65c021fa34e41f1
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- qiita_org (0.1.19)
4
+ qiita_org (0.1.20)
5
5
  colorize
6
6
  command_line (> 2.0.0)
7
7
  fileutils
@@ -11,6 +11,7 @@ require "qiita_org/get_template"
11
11
  require "qiita_org/check_pc_os"
12
12
  require "qiita_org/get_file_path"
13
13
  require "qiita_org/show_file_and_url"
14
+ require "qiita_org/decide_option"
14
15
  #require "qiita_org/qiita_org_thor"
15
16
 
16
17
  module QiitaOrg
@@ -38,7 +39,7 @@ module QiitaOrg
38
39
 
39
40
  p ["in qiita_org.rb", argv]
40
41
  p file = argv[0] || "README.org"
41
- p mode = argv[1] || "private"
42
+ p mode = argv[1] || DecideOption.new(file).decide_option()
42
43
  qiita = QiitaPost.new(file, mode, os)
43
44
  begin
44
45
  qiita.select_option(mode)
@@ -0,0 +1,22 @@
1
+ class DecideOption
2
+ def initialize(src)
3
+ @src = src
4
+ end
5
+
6
+ def decide_option()
7
+ lines = File.readlines(@src)
8
+
9
+ lines.each do |line|
10
+ if line.match(/\#\+qiita_(.+): (.+)/)
11
+ option = line.match(/\#\+qiita_(.+): (.+)/)[1]
12
+ return option
13
+ end
14
+ end
15
+ option = "private"
16
+ return option
17
+ end
18
+ end
19
+
20
+ if __FILE__ == $0
21
+ DecideOption.new("test.org").decide_option()
22
+ end
@@ -165,6 +165,8 @@ class QiitaPost
165
165
  open_qiita()
166
166
 
167
167
  add_qiita_id_on_org()
168
+
169
+ system "rm #{@src.gsub(".org", ".md")}"
168
170
  end
169
171
  end
170
172
 
@@ -1,3 +1,3 @@
1
1
  module QiitaOrg
2
- VERSION = "0.1.20"
2
+ VERSION = "0.1.21"
3
3
  end
@@ -0,0 +1,15 @@
1
+ #+qiita_teams: bd41ced53b4b18701453
2
+ #+OPTIONS: ^:{}
3
+ #+STARTUP: indent nolineimages
4
+ #+TITLE: test
5
+ #+AUTHOR: Kenta Yamamoto
6
+ #+EMAIL: (concat "doi35077@kwansei.ac.jp")
7
+ #+LANGUAGE: jp
8
+ # +OPTIONS: H:4 toc:t num:2
9
+ #+OPTIONS: toc:nil
10
+ #+TAG: test
11
+ # +SETUPFILE: ~/.emacs.d/org-mode/theme-readtheorg.setup
12
+
13
+ ![Mac OS X-10.13.3](https://img.shields.io/badge/MacOSX-10.13.3-brightgreen) ![ruby-2.7.0p0](https://img.shields.io/badge/ruby-2.7.0p0-brightgreen)
14
+
15
+ fogefoge
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qiita_org
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20
4
+ version: 0.1.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenta Yamamoto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-27 00:00:00.000000000 Z
11
+ date: 2020-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -960,6 +960,7 @@ files:
960
960
  - lib/qiita_org/check_pc_os.rb
961
961
  - lib/qiita_org/config.json
962
962
  - lib/qiita_org/config.rb
963
+ - lib/qiita_org/decide_option.rb
963
964
  - lib/qiita_org/get.rb
964
965
  - lib/qiita_org/get_file_path.rb
965
966
  - lib/qiita_org/get_file_url.rb
@@ -976,10 +977,10 @@ files:
976
977
  - qiita_org.gemspec
977
978
  - tests/hoge.rb
978
979
  - tests/test.html
979
- - tests/test.md
980
980
  - tests/test.org
981
981
  - tests/test2.md
982
982
  - tests/test2.org
983
+ - tests/test3.org
983
984
  homepage: https://github.com/yamatoken/qiita_org
984
985
  licenses:
985
986
  - MIT
@@ -1,10 +0,0 @@
1
- \![Mac OS X-10.13.3](<https://img.shields.io/badge/MacOSX-10.13.3-brightgreen>) \![ruby-2.7.0p0](<https://img.shields.io/badge/ruby-2.7.0p0-brightgreen>)
2
-
3
- fogefoge
4
-
5
- [![img](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/612049/a3b2ab02-f903-f5d6-d8b9-5407e8db5a2a.png)](file:///Users/kentayamamoto/Github/qiita_org/figs/fig1.png)
6
-
7
- ![img](../figs/fig2.png "example qiita template command")
8
-
9
- ![img](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/612049/a3b2ab02-f903-f5d6-d8b9-5407e8db5a2a.png)
10
-