qiita_org 0.1.33 → 0.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/qiita_org.rb +18 -36
- data/lib/qiita_org/all.rb +4 -3
- data/lib/qiita_org/base.rb +10 -0
- data/lib/qiita_org/config.rb +0 -2
- data/lib/qiita_org/error_message.rb +6 -2
- data/lib/qiita_org/get.rb +0 -4
- data/lib/qiita_org/get_multiple_files.rb +1 -4
- data/lib/qiita_org/get_template.rb +0 -15
- data/lib/qiita_org/list.rb +0 -5
- data/lib/qiita_org/md_converter_for_image.rb +1 -1
- data/lib/qiita_org/{file_open.rb → old_programs/file_open.rb} +0 -0
- data/lib/qiita_org/post.rb +12 -21
- data/lib/qiita_org/upload.rb +7 -29
- data/lib/qiita_org/version.rb +1 -1
- metadata +3 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aeb87f387d30d9841544ed8ffc39ed661551eb18e2b08349784bcec52f4536b7
|
4
|
+
data.tar.gz: cae658785a60089b2c831ff19ae50fff9fcfb10763f135016f5bf1449330543c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 852b7ce6c726f8912c1767872d590f4b1397ff2474603daae95c4405b4f3e89ed4b4660cd214b4970c02332e53be5b7498debd7f4ff221d9f340a0a9ff82471b
|
7
|
+
data.tar.gz: 17bc4ff9137207256e5c903cace754290a141242e069d6f93210394ee66bcaf8cb565dc56a7a9f4dc12c24bd6bc6de91ef0bab4ce54a2ea2274551dce291a53a
|
data/Gemfile.lock
CHANGED
data/lib/qiita_org.rb
CHANGED
@@ -9,21 +9,12 @@ require "qiita_org/get"
|
|
9
9
|
require "qiita_org/list"
|
10
10
|
require "qiita_org/all"
|
11
11
|
require "qiita_org/get_template"
|
12
|
-
#require "qiita_org/check_pc_os"
|
13
12
|
require "qiita_org/upload"
|
14
|
-
#require "qiita_org/get_file_path"
|
15
|
-
#require "qiita_org/show_file_and_url"
|
16
|
-
#require "qiita_org/decide_option"
|
17
13
|
require "qiita_org/get_multiple_files"
|
18
14
|
require "qiita_org/base"
|
19
|
-
#require "qiita_org/qiita_org_thor"
|
20
15
|
|
21
16
|
module QiitaOrg
|
22
17
|
class CLI < Thor
|
23
|
-
# def initialize(*argv)
|
24
|
-
# super(*argv)
|
25
|
-
# end
|
26
|
-
#
|
27
18
|
def initialize(*argv)
|
28
19
|
super(*argv)
|
29
20
|
@base = QiitaBase.new()
|
@@ -39,28 +30,25 @@ module QiitaOrg
|
|
39
30
|
desc "post [FILE] [private/public/teams]", "post to qiita from org"
|
40
31
|
|
41
32
|
def post(*argv)
|
42
|
-
#checkos = CheckPcOs.new
|
43
|
-
#os = checkos.return_os()
|
44
33
|
os = @base.check_pc_os()
|
45
34
|
|
46
35
|
if argv.size > 2
|
47
36
|
GetMultipleFiles.new(argv, os, "post").run()
|
48
|
-
|
37
|
+
else #if argv.size > 1
|
49
38
|
if argv[-1].match(/(.+).org/)
|
50
39
|
GetMultipleFiles.new(argv, os, "post").run()
|
51
|
-
end
|
52
|
-
else
|
53
|
-
p ["in qiita_org.rb", argv]
|
54
|
-
p file = argv[0] || "README.org"
|
55
|
-
#p mode = argv[1] || DecideOption.new(file).decide_option()
|
56
|
-
p mode = argv[1] || @base.pick_up_option(file)
|
57
|
-
qiita = QiitaPost.new(file, mode, os)
|
58
|
-
begin
|
59
|
-
qiita.select_option(mode)
|
60
|
-
rescue RuntimeError => e
|
61
|
-
puts $!
|
62
40
|
else
|
63
|
-
|
41
|
+
p ["in qiita_org.rb", argv]
|
42
|
+
p file = argv[0] || "README.org"
|
43
|
+
p mode = argv[1] || @base.pick_up_option(file)
|
44
|
+
qiita = QiitaPost.new(file, mode, os)
|
45
|
+
begin
|
46
|
+
qiita.select_option(mode)
|
47
|
+
rescue RuntimeError => e
|
48
|
+
puts $!
|
49
|
+
else
|
50
|
+
qiita.run
|
51
|
+
end
|
64
52
|
end
|
65
53
|
end
|
66
54
|
end
|
@@ -68,22 +56,19 @@ module QiitaOrg
|
|
68
56
|
desc "upload [FILE] [teams/public/private]", "upload about image to qiita"
|
69
57
|
|
70
58
|
def upload(*argv)
|
71
|
-
#checkos = CheckPcOs.new
|
72
|
-
#os = checkos.return_os()
|
73
59
|
os = @base.check_pc_os()
|
74
60
|
|
75
61
|
if argv.size > 2
|
76
62
|
GetMultipleFiles.new(argv, os, "upload").run()
|
77
|
-
|
63
|
+
else #if argv.size > 1
|
78
64
|
if argv[-1].match(/(.+).org/)
|
79
65
|
GetMultipleFiles.new(argv, os, "upload").run()
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
#p mode = argv[1] || DecideOption.new(file).decide_option()
|
84
|
-
p mode = argv[1] || @base.pick_up_option(file)
|
66
|
+
else
|
67
|
+
p file = argv[0] || "README.org"
|
68
|
+
p mode = argv[1] || @base.pick_up_option(file)
|
85
69
|
|
86
|
-
|
70
|
+
qiita = QiitaFileUpLoad.new(file, mode, os).upload()
|
71
|
+
end
|
87
72
|
end
|
88
73
|
end
|
89
74
|
|
@@ -109,8 +94,6 @@ module QiitaOrg
|
|
109
94
|
desc "template", "make template.org"
|
110
95
|
|
111
96
|
def template(*argv)
|
112
|
-
#checkos = CheckPcOs.new
|
113
|
-
#os = checkos.return_os()
|
114
97
|
os = @base.check_pc_os()
|
115
98
|
filename = argv[0] || "template.org"
|
116
99
|
filename = (filename.include?(".org"))? filename : "#{filename}.org"
|
@@ -121,7 +104,6 @@ module QiitaOrg
|
|
121
104
|
desc "all [teams/public/private] [options]", "post all org files in the directory"
|
122
105
|
|
123
106
|
def all(*argv)
|
124
|
-
#mode = argv[0] || false
|
125
107
|
QiitaAll.new(argv).run()
|
126
108
|
end
|
127
109
|
|
data/lib/qiita_org/all.rb
CHANGED
@@ -10,9 +10,10 @@ class QiitaAll
|
|
10
10
|
def run()
|
11
11
|
@files.each do |file|
|
12
12
|
unless @exclude_files.empty?
|
13
|
-
if @exclude_files.include?(file)
|
14
|
-
|
15
|
-
|
13
|
+
next if @exclude_files.include?(file)
|
14
|
+
#if @exclude_files.include?(file)
|
15
|
+
# next
|
16
|
+
#end
|
16
17
|
end
|
17
18
|
|
18
19
|
unless @mode
|
data/lib/qiita_org/base.rb
CHANGED
@@ -85,4 +85,14 @@ class QiitaBase
|
|
85
85
|
system "xdg-open #{order}"
|
86
86
|
end
|
87
87
|
end
|
88
|
+
|
89
|
+
def get_report_id(src, option)
|
90
|
+
conts = File.read(src)
|
91
|
+
if conts.match?(/^\#\+qiita_#{option}:\s(.+)/)
|
92
|
+
id = conts.match(/\#\+qiita_#{option}: (.+)/)[1]
|
93
|
+
else
|
94
|
+
id = nil
|
95
|
+
end
|
96
|
+
return id
|
97
|
+
end
|
88
98
|
end
|
data/lib/qiita_org/config.rb
CHANGED
@@ -7,8 +7,6 @@ class QiitaConfig
|
|
7
7
|
@option = option
|
8
8
|
@input = input
|
9
9
|
if status == "local"
|
10
|
-
#search = SearchConfPath.new(Dir.pwd, Dir.home)
|
11
|
-
#conf_dir = search.search_conf_path()
|
12
10
|
conf_dir = QiitaBase.new().search_conf_path(Dir.pwd, Dir.home)
|
13
11
|
if @option == "set"
|
14
12
|
@setup = File.join(Dir.pwd, ".qiita.conf")
|
@@ -8,6 +8,8 @@ class ErrorMessage
|
|
8
8
|
def access_token_error(access_token)
|
9
9
|
if access_token == ""
|
10
10
|
puts "Please setting ACCESS_TOKEN".red
|
11
|
+
puts "Hint: qiita config global access_token 'your access_token'".red
|
12
|
+
puts "Hint: qiita config local access_token 'your access_token'".red
|
11
13
|
exit
|
12
14
|
end
|
13
15
|
end
|
@@ -15,6 +17,8 @@ class ErrorMessage
|
|
15
17
|
def teams_url_error(teams_url)
|
16
18
|
if teams_url == ""
|
17
19
|
puts "Please setting teams_url".red
|
20
|
+
puts "Hint: qiita config global teams_url 'https://foge.qiita.com/'".red
|
21
|
+
puts "Hint: qiita config local teams_url 'https://foge.qiita.com/'".red
|
18
22
|
exit
|
19
23
|
end
|
20
24
|
end
|
@@ -77,8 +81,8 @@ class ErrorMessage
|
|
77
81
|
|
78
82
|
def md_file_exists?(src, res)
|
79
83
|
unless File.exists?(src.gsub(".org", ".md"))
|
80
|
-
puts "Can not
|
81
|
-
puts "Please confirm emacs version.".red
|
84
|
+
puts "Can not transform #{src.gsub(".org", ".md")} from #{src}, please chech org syntax.".red
|
85
|
+
puts "Please confirm emacs version it 26 or more.".red
|
82
86
|
exit
|
83
87
|
else
|
84
88
|
p res
|
data/lib/qiita_org/get.rb
CHANGED
@@ -3,8 +3,6 @@ require "json"
|
|
3
3
|
require "open-uri"
|
4
4
|
require "io/console"
|
5
5
|
require "colorize"
|
6
|
-
#require "qiita_org/select_path.rb"
|
7
|
-
#require "qiita_org/set_config.rb"
|
8
6
|
require "qiita_org/error_message.rb"
|
9
7
|
require "qiita_org/access_qiita.rb"
|
10
8
|
|
@@ -13,7 +11,6 @@ class QiitaGet
|
|
13
11
|
@mode = mode
|
14
12
|
@get_id = id
|
15
13
|
@base = QiitaBase.new()
|
16
|
-
# @selectpath = SelectPath.new()
|
17
14
|
end
|
18
15
|
|
19
16
|
# select report
|
@@ -104,7 +101,6 @@ EOS
|
|
104
101
|
@path = "api/v2/items/#{@get_id}"
|
105
102
|
|
106
103
|
@items = AccessQiita.new(@access_token, @qiita, @path).access_qiita()
|
107
|
-
#access_qiita()
|
108
104
|
|
109
105
|
@title = @items["title"]
|
110
106
|
@id = @items["id"]
|
@@ -1,8 +1,6 @@
|
|
1
1
|
require "colorize"
|
2
|
-
#require "../qiita_org/qiita_org.rb"
|
3
2
|
require "qiita_org/post.rb"
|
4
3
|
require "qiita_org/upload.rb"
|
5
|
-
#require "qiita_org/decide_option.rb"
|
6
4
|
|
7
5
|
class GetMultipleFiles
|
8
6
|
def initialize(files, os, type)
|
@@ -17,9 +15,8 @@ class GetMultipleFiles
|
|
17
15
|
end
|
18
16
|
|
19
17
|
def run()
|
20
|
-
puts "
|
18
|
+
puts "#{@type} files: #{@files}".green
|
21
19
|
@files.each do |file|
|
22
|
-
#mode = @option || DecideOption.new(file).decide_option()
|
23
20
|
mode = @option || QiitaBase.new().pick_up_option(file)
|
24
21
|
puts "qiita #{@type} #{file} #{mode}".green
|
25
22
|
if @type == "post"
|
@@ -1,17 +1,13 @@
|
|
1
1
|
require "fileutils"
|
2
2
|
require "colorize"
|
3
3
|
require "kconv"
|
4
|
-
#require "qiita_org/search_conf_path"
|
5
4
|
require "qiita_org/error_message.rb"
|
6
5
|
|
7
6
|
class QiitaGetTemplate
|
8
7
|
def initialize(os, filename)
|
9
8
|
@os = os
|
10
9
|
@filename = filename
|
11
|
-
#search = SearchConfPath.new(Dir.pwd, Dir.home)
|
12
|
-
# @conf_dir = search.search_conf_path()
|
13
10
|
@conf_dir = QiitaBase.new().search_conf_path(Dir.pwd, Dir.home)
|
14
|
-
# check_write_header()
|
15
11
|
end
|
16
12
|
|
17
13
|
def get_macos_version()
|
@@ -106,17 +102,6 @@ class QiitaGetTemplate
|
|
106
102
|
end
|
107
103
|
end
|
108
104
|
|
109
|
-
def check_write_header()
|
110
|
-
["name", "email"].each do |src|
|
111
|
-
print "Write your #{src}?(y/n) "
|
112
|
-
ans = STDIN.gets.chomp
|
113
|
-
next if ans == "n"
|
114
|
-
if ans == "y"
|
115
|
-
send("get_#{src}")
|
116
|
-
end
|
117
|
-
end
|
118
|
-
end
|
119
|
-
|
120
105
|
def set_name_and_email()
|
121
106
|
conf_path = File.join(@conf_dir, ".qiita.conf")
|
122
107
|
conf = JSON.load(File.read(conf_path))
|
data/lib/qiita_org/list.rb
CHANGED
@@ -2,8 +2,6 @@ require "net/https"
|
|
2
2
|
require "json"
|
3
3
|
require "open-uri"
|
4
4
|
require "colorize"
|
5
|
-
#require "qiita_org/select_path.rb"
|
6
|
-
#require "qiita_org/set_config.rb"
|
7
5
|
require "qiita_org/error_message.rb"
|
8
6
|
require "qiita_org/access_qiita.rb"
|
9
7
|
|
@@ -11,13 +9,11 @@ class QiitaList
|
|
11
9
|
def initialize(mode)
|
12
10
|
@mode = mode
|
13
11
|
@base = QiitaBase.new
|
14
|
-
# @access_token, @teams_url, @display, @ox_qmd_load_path = SetConfig.new().set_config()
|
15
12
|
@access_token, @teams_url, @display, @ox_qmd_load_path = @base.set_config()
|
16
13
|
if @mode == "teams"
|
17
14
|
ErrorMessage.new().teams_url_error(@teams_url)
|
18
15
|
end
|
19
16
|
|
20
|
-
# @qiita, @path = SelectPath.new().select_path(@mode, @teams_url)
|
21
17
|
@qiita, @path = @base.select_access_path(@mode, @teams_url)
|
22
18
|
@items = AccessQiita.new(@access_token, @qiita, @path).access_qiita()
|
23
19
|
view_list()
|
@@ -35,6 +31,5 @@ class QiitaList
|
|
35
31
|
end
|
36
32
|
puts ""
|
37
33
|
end
|
38
|
-
# p @items[0]["user"]["id"]
|
39
34
|
end
|
40
35
|
end
|
File without changes
|
data/lib/qiita_org/post.rb
CHANGED
@@ -5,9 +5,7 @@ require "json"
|
|
5
5
|
require "command_line/global"
|
6
6
|
require "colorize"
|
7
7
|
require "qiita_org/md_converter_for_image"
|
8
|
-
#require "qiita_org/set_config.rb"
|
9
8
|
require "qiita_org/error_message"
|
10
|
-
require "qiita_org/file_open.rb"
|
11
9
|
require "qiita_org/access_qiita.rb"
|
12
10
|
|
13
11
|
class QiitaPost
|
@@ -23,10 +21,6 @@ class QiitaPost
|
|
23
21
|
m = conts.match(/\#\+(TITLE|title|Title): (.+)/)
|
24
22
|
@title = m ? m[2] : "テスト"
|
25
23
|
@tags = if m = conts.match(/\#\+(TAG|tag|Tag|tags|TAGS|Tags): (.+)/)
|
26
|
-
#if m[2].count(",") >= 5
|
27
|
-
# puts "The maximum number of tag is five. Please delete some tags.".red
|
28
|
-
#exit
|
29
|
-
#end
|
30
24
|
ErrorMessage.new().many_tags_error(m[2])
|
31
25
|
m[2].split(",").inject([]) do |l, c|
|
32
26
|
l << { name: c.strip } #, versions: []}
|
@@ -42,7 +36,6 @@ class QiitaPost
|
|
42
36
|
def convert_org_to_md()
|
43
37
|
command = "emacs #{@src} --batch -l #{@ox_qmd_load_path} -f org-qmd-export-to-markdown --kill"
|
44
38
|
res = command_line command
|
45
|
-
#p res
|
46
39
|
ErrorMessage.new().md_file_exists?(@src, res)
|
47
40
|
end
|
48
41
|
|
@@ -54,15 +47,17 @@ class QiitaPost
|
|
54
47
|
end
|
55
48
|
|
56
49
|
# patch or post selector by qiita_id
|
57
|
-
def select_patch_or_post(
|
58
|
-
m = []
|
50
|
+
def select_patch_or_post(src, option)
|
51
|
+
#m = []
|
59
52
|
patch = false
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
53
|
+
qiita_id = @base.get_report_id(src, option)
|
54
|
+
patch = true if qiita_id != nil
|
55
|
+
#if m = conts.match(/\#\+qiita_#{option}: (.+)/)
|
56
|
+
# qiita_id = m[1]
|
57
|
+
#patch = true
|
58
|
+
#else
|
59
|
+
# qiita_id = ""
|
60
|
+
#end
|
66
61
|
return qiita_id, patch
|
67
62
|
end
|
68
63
|
|
@@ -93,8 +88,6 @@ class QiitaPost
|
|
93
88
|
|
94
89
|
def select_option(option)
|
95
90
|
qiita = (option == "teams")? @teams_url : "https://qiita.com/"
|
96
|
-
#qiita = (option == "teams")? "https://nishitani.qiita.com/" :
|
97
|
-
# "https://qiita.com/"
|
98
91
|
case option
|
99
92
|
when "teams", "qiita", "public", "open"
|
100
93
|
private = false
|
@@ -171,7 +164,6 @@ class QiitaPost
|
|
171
164
|
def run()
|
172
165
|
@conts = File.read(@src)
|
173
166
|
@title, @tags = get_title_tags(@conts)
|
174
|
-
# @access_token, @teams_url, @display, @ox_qmd_load_path = SetConfig.new().set_config()
|
175
167
|
@access_token, @teams_url, @display, @ox_qmd_load_path = @base.set_config()
|
176
168
|
|
177
169
|
if @option == "teams"
|
@@ -181,15 +173,14 @@ class QiitaPost
|
|
181
173
|
convert_org_to_md()
|
182
174
|
add_source_path_in_md()
|
183
175
|
@lines = MdConverter.new().convert_for_image(@lines)
|
184
|
-
@qiita_id, @patch = select_patch_or_post(@
|
176
|
+
@qiita_id, @patch = select_patch_or_post(@src, @option)
|
185
177
|
@conts, @option = check_change_public(@conts, @option, @qiita_id) if (@patch and @option == "private")
|
186
178
|
@twitter = select_twitter(@conts, @option)
|
187
179
|
@qiita, @private = select_option(@option)
|
188
180
|
@res = qiita_post()
|
189
181
|
get_and_print_qiita_return()
|
190
182
|
|
191
|
-
|
192
|
-
FileOpen.new(@os).file_open(@res_body["url"]) if @display != "suppress"
|
183
|
+
@base.file_open(@os, @res_body["url"]) if @display != "suppress"
|
193
184
|
|
194
185
|
add_qiita_id_on_org()
|
195
186
|
|
data/lib/qiita_org/upload.rb
CHANGED
@@ -1,9 +1,5 @@
|
|
1
1
|
require "colorize"
|
2
2
|
require "io/console"
|
3
|
-
#require "qiita_org/get_file_path.rb"
|
4
|
-
#require "qiita_org/show_file_and_url.rb"
|
5
|
-
require "qiita_org/file_open.rb"
|
6
|
-
#require "qiita_org/set_config.rb"
|
7
3
|
require "qiita_org/access_qiita.rb"
|
8
4
|
|
9
5
|
class QiitaFileUpLoad
|
@@ -11,31 +7,21 @@ class QiitaFileUpLoad
|
|
11
7
|
@src = src
|
12
8
|
@option = (option == "qiita" || option == "open")? "public" : option
|
13
9
|
@os = os
|
14
|
-
@
|
15
|
-
# @access_token, @teams_url, @display, @ox_qmd_load_path = SetConfig.new().set_config()
|
10
|
+
@base = QiitaBase.new()
|
16
11
|
@access_token, @teams_url, @display, @ox_qmd_load_path = QiitaBase.new().set_config()
|
17
|
-
if @option == "teams"
|
18
|
-
ErrorMessage.new().teams_url_error(@teams_url)
|
19
|
-
end
|
12
|
+
ErrorMessage.new().teams_url_error(@teams_url) if @option == "teams"
|
20
13
|
end
|
21
14
|
|
22
15
|
def upload()
|
23
|
-
#paths = GetFilePath.new(@src).get_file_path()
|
24
16
|
paths = get_file_path(@src)
|
25
17
|
unless paths.empty?
|
26
|
-
#showfile = ShowFile.new(paths, @src, @option, @os)
|
27
|
-
#showfile.open_file_dir()
|
28
18
|
open_file_dir(paths)
|
29
|
-
#showfile.open_qiita()
|
30
19
|
open_qiita()
|
31
20
|
|
32
21
|
puts "Overwrite file URL's on #{@src}? (y/n)".green
|
33
22
|
ans = STDIN.getch
|
34
23
|
|
35
|
-
if ans == "y"
|
36
|
-
#showfile.input_url_to_org()
|
37
|
-
input_url_to_org(paths)
|
38
|
-
end
|
24
|
+
input_url_to_org(paths) if ans == "y"
|
39
25
|
else
|
40
26
|
puts "file path is empty.".red
|
41
27
|
end
|
@@ -60,27 +46,19 @@ class QiitaFileUpLoad
|
|
60
46
|
def open_file_dir(paths)
|
61
47
|
previous_paths = []
|
62
48
|
previous_paths << File.join(paths[0].split("/")[0..-2])
|
63
|
-
@
|
49
|
+
@base.file_open(@os, File.join(paths[0].split("/")[0..-2]))
|
64
50
|
|
65
51
|
paths.each do |path|
|
66
52
|
dir_path = File.join(path.split("/")[0..-2])
|
67
53
|
unless previous_paths.include?(dir_path)
|
68
54
|
previous_paths << dir_path
|
69
|
-
@
|
55
|
+
@base.file_open(@os, dir_path)
|
70
56
|
end
|
71
57
|
end
|
72
58
|
end
|
73
59
|
|
74
60
|
def open_qiita()
|
75
|
-
|
76
|
-
id = conts.match(/\#\+qiita_#{@option}: (.+)/)[1]
|
77
|
-
|
78
|
-
=begin
|
79
|
-
@access_token, @teams_url, @display, @ox_qmd_load_path = SetConfig.new().set_config()
|
80
|
-
if @option == "teams"
|
81
|
-
ErrorMassage.new().teams_url_error(@teams_url)
|
82
|
-
end
|
83
|
-
=end
|
61
|
+
id = QiitaBase.new().get_report_id(@src, @option)
|
84
62
|
|
85
63
|
qiita = (@option == "teams") ? @teams_url : "https://qiita.com/"
|
86
64
|
path = "api/v2/items/#{id}"
|
@@ -88,7 +66,7 @@ class QiitaFileUpLoad
|
|
88
66
|
@access = AccessQiita.new(@access_token, qiita, path)
|
89
67
|
items = @access.access_qiita()
|
90
68
|
|
91
|
-
@
|
69
|
+
@base.file_open(@os, items["url"])
|
92
70
|
end
|
93
71
|
|
94
72
|
def input_url_to_org(paths)
|
data/lib/qiita_org/version.rb
CHANGED
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.34
|
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-12-
|
11
|
+
date: 2020-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -562,10 +562,7 @@ files:
|
|
562
562
|
- gems/ruby/2.7.0/cache/yard-activesupport-concern-0.0.1.gem
|
563
563
|
- gems/ruby/2.7.0/extensions/x86_64-darwin-17/2.7.0/ffi-1.13.1/ffi_c.bundle
|
564
564
|
- gems/ruby/2.7.0/extensions/x86_64-darwin-17/2.7.0/ffi-1.13.1/gem.build_complete
|
565
|
-
- gems/ruby/2.7.0/extensions/x86_64-darwin-17/2.7.0/ffi-1.13.1/gem_make.out
|
566
|
-
- gems/ruby/2.7.0/extensions/x86_64-darwin-17/2.7.0/ffi-1.13.1/mkmf.log
|
567
565
|
- gems/ruby/2.7.0/extensions/x86_64-darwin-17/2.7.0/redcarpet-3.5.0/gem.build_complete
|
568
|
-
- gems/ruby/2.7.0/extensions/x86_64-darwin-17/2.7.0/redcarpet-3.5.0/gem_make.out
|
569
566
|
- gems/ruby/2.7.0/extensions/x86_64-darwin-17/2.7.0/redcarpet-3.5.0/redcarpet.bundle
|
570
567
|
- gems/ruby/2.7.0/gems/coderay-1.1.3/MIT-LICENSE
|
571
568
|
- gems/ruby/2.7.0/gems/coderay-1.1.3/README_INDEX.rdoc
|
@@ -784,7 +781,6 @@ files:
|
|
784
781
|
- gems/ruby/2.7.0/gems/ffi-1.13.1/ext/ffi_c/libffi-x86_64-darwin17/.libs/libffi.lai
|
785
782
|
- gems/ruby/2.7.0/gems/ffi-1.13.1/ext/ffi_c/libffi-x86_64-darwin17/.libs/libffi_convenience.la
|
786
783
|
- gems/ruby/2.7.0/gems/ffi-1.13.1/ext/ffi_c/libffi-x86_64-darwin17/Makefile
|
787
|
-
- gems/ruby/2.7.0/gems/ffi-1.13.1/ext/ffi_c/libffi-x86_64-darwin17/config.log
|
788
784
|
- gems/ruby/2.7.0/gems/ffi-1.13.1/ext/ffi_c/libffi-x86_64-darwin17/config.status
|
789
785
|
- gems/ruby/2.7.0/gems/ffi-1.13.1/ext/ffi_c/libffi-x86_64-darwin17/fficonfig.h
|
790
786
|
- gems/ruby/2.7.0/gems/ffi-1.13.1/ext/ffi_c/libffi-x86_64-darwin17/include/Makefile
|
@@ -2562,7 +2558,6 @@ files:
|
|
2562
2558
|
- lib/qiita_org/config.json
|
2563
2559
|
- lib/qiita_org/config.rb
|
2564
2560
|
- lib/qiita_org/error_message.rb
|
2565
|
-
- lib/qiita_org/file_open.rb
|
2566
2561
|
- lib/qiita_org/get.rb
|
2567
2562
|
- lib/qiita_org/get_multiple_files.rb
|
2568
2563
|
- lib/qiita_org/get_template.rb
|
@@ -2571,6 +2566,7 @@ files:
|
|
2571
2566
|
- lib/qiita_org/md_converter_for_image.rb
|
2572
2567
|
- lib/qiita_org/old_programs/check_pc_os.rb
|
2573
2568
|
- lib/qiita_org/old_programs/decide_option.rb
|
2569
|
+
- lib/qiita_org/old_programs/file_open.rb
|
2574
2570
|
- lib/qiita_org/old_programs/get_file_path.rb
|
2575
2571
|
- lib/qiita_org/old_programs/get_file_url.rb
|
2576
2572
|
- lib/qiita_org/old_programs/search_conf_path.rb
|