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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/qiita_org.rb +2 -1
- data/lib/qiita_org/decide_option.rb +22 -0
- data/lib/qiita_org/post.rb +2 -0
- data/lib/qiita_org/version.rb +1 -1
- data/tests/test3.org +15 -0
- metadata +4 -3
- data/tests/test.md +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08e12d5c8b442eedf009fa8f48b4e2f0b1af5379600ccf15a1c1d1d035481a05'
|
4
|
+
data.tar.gz: 3841ad75ffacd131b9f6dd55fa7dfd098e3ea78af2c1cf539158c193efaae356
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca8bfb7e6d185931783d261776ae3335478df595b7411afd07a8fbf71f1f4e6d509eece8f661af95d97f4add8559f8b5bbf2d0b8cacee208077d1112c9e4e94e
|
7
|
+
data.tar.gz: f1a7b942323d6294f38bc4f21ca70ed081ca4bb331dad8d40e171fd3499bb7f6040fd3eef75a133fb00500cd209298d49156f0f0d97956a0d65c021fa34e41f1
|
data/Gemfile.lock
CHANGED
data/lib/qiita_org.rb
CHANGED
@@ -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] ||
|
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
|
data/lib/qiita_org/post.rb
CHANGED
data/lib/qiita_org/version.rb
CHANGED
data/tests/test3.org
ADDED
@@ -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.
|
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-
|
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
|
data/tests/test.md
DELETED
@@ -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
|
-
|