qiita_org 0.1.39 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +14 -14
- data/README.org +6 -4
- data/Rakefile +3 -7
- data/docs/README.org +14 -0
- data/docs/qiita_org/slide_1.png +0 -0
- data/docs/qiita_org.pptx +0 -0
- data/docs/~$qiita_org.pptx +0 -0
- data/lib/qiita_org/base.rb +6 -9
- data/lib/qiita_org/get_multiple_files.rb +5 -1
- data/lib/qiita_org/ox-qmd/ox-qmd.el +2 -0
- data/lib/qiita_org/post.rb +15 -5
- data/lib/qiita_org/template.org +2 -2
- data/lib/qiita_org/upload.rb +14 -12
- data/lib/qiita_org/version.rb +1 -1
- data/lib/qiita_org.rb +9 -6
- metadata +7 -13
- data/README.md +0 -209
- data/tests/hoge.rb +0 -14
- data/tests/tags_test.org +0 -16
- data/tests/tags_test2.org +0 -16
- data/tests/test.html +0 -280
- data/tests/test.org +0 -33
- data/tests/test2.org +0 -23
- data/tests/test3.org +0 -16
- data/tests/test4.org +0 -16
- data/tests/twitter_test.org +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f0806f99eee8e4022d6540303edc29ec64deaee91d6b9fd84c012d476a4573d
|
4
|
+
data.tar.gz: 485aa1d3ffc2212635a2dd4f925ee02f1638440ef330544c5900448dfe6ab14d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afab7a30b907cce6f48a84238edf2a4c6fd996434ef6c41a148559332ec0aa97cc135845032c907434e7b678d76c23c042d2b09e742066b8eeda591593b779ba
|
7
|
+
data.tar.gz: ad0052c672c30ccde9c9db0830b6df8628a36e87dcaf33ebe50df41d3378197e4316079eb5f57522306e9f9b62bac22cf498f3ae9d5d221f7a183340ad48960e
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
qiita_org (0.1.
|
4
|
+
qiita_org (0.1.41)
|
5
5
|
colorize
|
6
6
|
command_line (> 2.0.0)
|
7
7
|
fileutils
|
@@ -14,10 +14,10 @@ GEM
|
|
14
14
|
colorize (0.8.1)
|
15
15
|
command_line (2.0.1)
|
16
16
|
diff-lcs (1.4.4)
|
17
|
-
ffi (1.
|
18
|
-
fileutils (1.
|
19
|
-
formatador (0.
|
20
|
-
guard (2.
|
17
|
+
ffi (1.15.3)
|
18
|
+
fileutils (1.5.0)
|
19
|
+
formatador (0.3.0)
|
20
|
+
guard (2.17.0)
|
21
21
|
formatador (>= 0.2.4)
|
22
22
|
listen (>= 2.7, < 4.0)
|
23
23
|
lumberjack (>= 1.0.12, < 2.0)
|
@@ -29,7 +29,7 @@ GEM
|
|
29
29
|
guard-yard (2.2.1)
|
30
30
|
guard (>= 1.1.0)
|
31
31
|
yard (>= 0.7.0)
|
32
|
-
listen (3.
|
32
|
+
listen (3.5.1)
|
33
33
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
34
34
|
rb-inotify (~> 0.9, >= 0.9.10)
|
35
35
|
lumberjack (1.2.8)
|
@@ -38,11 +38,11 @@ GEM
|
|
38
38
|
notiffany (0.1.3)
|
39
39
|
nenv (~> 0.1)
|
40
40
|
shellany (~> 0.0)
|
41
|
-
pry (0.
|
41
|
+
pry (0.14.1)
|
42
42
|
coderay (~> 1.1)
|
43
43
|
method_source (~> 1.0)
|
44
44
|
rake (12.3.3)
|
45
|
-
rb-fsevent (0.
|
45
|
+
rb-fsevent (0.11.0)
|
46
46
|
rb-inotify (0.10.1)
|
47
47
|
ffi (~> 1.0)
|
48
48
|
redcarpet (3.5.1)
|
@@ -50,18 +50,18 @@ GEM
|
|
50
50
|
rspec-core (~> 3.10.0)
|
51
51
|
rspec-expectations (~> 3.10.0)
|
52
52
|
rspec-mocks (~> 3.10.0)
|
53
|
-
rspec-core (3.10.
|
53
|
+
rspec-core (3.10.1)
|
54
54
|
rspec-support (~> 3.10.0)
|
55
|
-
rspec-expectations (3.10.
|
55
|
+
rspec-expectations (3.10.1)
|
56
56
|
diff-lcs (>= 1.2.0, < 2.0)
|
57
57
|
rspec-support (~> 3.10.0)
|
58
|
-
rspec-mocks (3.10.
|
58
|
+
rspec-mocks (3.10.2)
|
59
59
|
diff-lcs (>= 1.2.0, < 2.0)
|
60
60
|
rspec-support (~> 3.10.0)
|
61
|
-
rspec-support (3.10.
|
61
|
+
rspec-support (3.10.2)
|
62
62
|
shellany (0.0.1)
|
63
|
-
thor (1.0
|
64
|
-
yard (0.9.
|
63
|
+
thor (1.1.0)
|
64
|
+
yard (0.9.26)
|
65
65
|
yard-activesupport-concern (0.0.1)
|
66
66
|
yard (>= 0.8)
|
67
67
|
|
data/README.org
CHANGED
@@ -1,17 +1,19 @@
|
|
1
|
-
|
1
|
+
# +qiita_teams: 79f1efa6ca0083c9f210
|
2
|
+
# +qiita_teams: 55b11d5449776ec36c77
|
2
3
|
#+OPTIONS: ^:{}
|
3
4
|
#+STARTUP: indent nolineimages
|
4
5
|
#+TITLE: QiitaOrg
|
5
6
|
#+AUTHOR: hoge
|
6
7
|
#+EMAIL: (concat "")
|
7
8
|
#+LANGUAGE: jp
|
8
|
-
|
9
|
+
#+OPTIONS: H:4 toc:t num:2
|
9
10
|
#+OPTIONS: toc:nil
|
10
11
|
#+TAG: api, org, qmd
|
11
12
|
|
13
|
+
* QiitaOrg
|
14
|
+
https://img.shields.io/badge/MacOSX-10.13.3-brightgreen.svg https://img.shields.io/badge/ruby-2.7.0p0-brightgree.svg
|
15
|
+
https://img.shields.io/badge/qiitaorg-0.1.8-brightgreen.svg
|
12
16
|
|
13
|
-
* QiitaOrg
|
14
|
-
![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) ![qiita_org version](https://img.shields.io/badge/qiitaorg-0.1.8-brightgreen)
|
15
17
|
** 概要
|
16
18
|
qiita_orgはqiitaへの投稿にあたって,テキストの作成から投稿までを
|
17
19
|
terminal上で一括で行いたいというコンセプトでできたgemです.
|
data/Rakefile
CHANGED
@@ -1,16 +1,12 @@
|
|
1
|
-
#
|
2
|
-
#require "rspec/core/rake_task"
|
3
|
-
#require "rake/testtask"
|
1
|
+
# frozen_string_literal: true
|
4
2
|
|
5
|
-
#RSpec::Core::RakeTask.new(:spec)
|
6
|
-
|
7
|
-
#task :default => :spec
|
8
3
|
require "bundler/gem_tasks"
|
9
4
|
require "rake/testtask"
|
10
|
-
#require 'yard'
|
11
5
|
|
12
6
|
Rake::TestTask.new(:test) do |t|
|
13
7
|
t.libs << "test"
|
14
8
|
t.libs << "lib"
|
15
9
|
t.test_files = FileList["test/**/*_test.rb"]
|
16
10
|
end
|
11
|
+
|
12
|
+
task default: %i[test]
|
data/docs/README.org
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#+qiita_private: e199a57085723fe56dfa
|
2
|
+
#+OPTIONS: ^:{}
|
3
|
+
#+STARTUP: indent nolineimages
|
4
|
+
#+TITLE: title
|
5
|
+
#+AUTHOR: Moeko Higashibata
|
6
|
+
#+EMAIL: (concat "ewh42930@kwansei.ac.jp")
|
7
|
+
#+LANGUAGE: jp
|
8
|
+
# +OPTIONS: H:4 toc:t num:2
|
9
|
+
#+OPTIONS: toc:nil
|
10
|
+
#+TAG: Qiita, org
|
11
|
+
#+TWITTER: off
|
12
|
+
# +SETUPFILE: ~/.emacs.d/org-mode/theme-readtheorg.setup
|
13
|
+
|
14
|
+
[[https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/636789/16c3ee73-120e-b4ba-937f-e32a41f3f0c6.png][file:./qiita_org/slide_1.png]]
|
Binary file
|
data/docs/qiita_org.pptx
ADDED
Binary file
|
Binary file
|
data/lib/qiita_org/base.rb
CHANGED
@@ -3,7 +3,6 @@ require "qiita_org/error_message.rb"
|
|
3
3
|
|
4
4
|
class QiitaBase
|
5
5
|
def initialize()
|
6
|
-
|
7
6
|
end
|
8
7
|
|
9
8
|
def check_pc_os()
|
@@ -76,14 +75,12 @@ class QiitaBase
|
|
76
75
|
return access_token, teams_url, display, ox_qmd_load_path
|
77
76
|
end
|
78
77
|
|
79
|
-
def file_open(os,
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
else
|
85
|
-
system "xdg-open #{order}"
|
86
|
-
end
|
78
|
+
def file_open(os, path)
|
79
|
+
p :open_path => path
|
80
|
+
case os
|
81
|
+
when "mac"; system "open #{path}"
|
82
|
+
when "windows"; system "explorer.exe #{path}"
|
83
|
+
else; system "xdg-open #{path}" end
|
87
84
|
end
|
88
85
|
|
89
86
|
def get_report_id(src, option)
|
@@ -29,7 +29,11 @@ class GetMultipleFiles
|
|
29
29
|
qiita.run
|
30
30
|
end
|
31
31
|
elsif @type == "upload"
|
32
|
-
|
32
|
+
begin
|
33
|
+
QiitaFileUpLoad.new(file, mode, @os).upload()
|
34
|
+
rescue Exception => ex
|
35
|
+
puts ex.message.red
|
36
|
+
end
|
33
37
|
end
|
34
38
|
end
|
35
39
|
end
|
data/lib/qiita_org/post.rb
CHANGED
@@ -44,8 +44,16 @@ class QiitaPost
|
|
44
44
|
tags << { name: tag.strip }
|
45
45
|
end
|
46
46
|
else
|
47
|
-
|
48
|
-
|
47
|
+
if tags.include?(",")
|
48
|
+
tags = tags.split(",").inject([]) do |l, c|
|
49
|
+
l << { name: c.strip } #, versions: []}
|
50
|
+
end
|
51
|
+
else
|
52
|
+
new_tags = tags
|
53
|
+
tags = []
|
54
|
+
new_tags.each do |tag|
|
55
|
+
tags << { name: tag.strip }
|
56
|
+
end
|
49
57
|
end
|
50
58
|
end
|
51
59
|
|
@@ -61,6 +69,8 @@ class QiitaPost
|
|
61
69
|
string = STDIN.gets.chomp
|
62
70
|
if string == 'e'
|
63
71
|
count = 5
|
72
|
+
elsif (string == "" and count >= 1)
|
73
|
+
count = 5
|
64
74
|
else
|
65
75
|
tags << string
|
66
76
|
end
|
@@ -151,8 +161,8 @@ class QiitaPost
|
|
151
161
|
else
|
152
162
|
@path = "api/v2/items"
|
153
163
|
end
|
154
|
-
p
|
155
|
-
p
|
164
|
+
p qiita: @qiita
|
165
|
+
p path: @path
|
156
166
|
p @qiita + @path
|
157
167
|
uri = URI.parse(@qiita + @path)
|
158
168
|
|
@@ -202,7 +212,7 @@ class QiitaPost
|
|
202
212
|
end
|
203
213
|
new_lines = File.readlines(@src)
|
204
214
|
new_lines.each_with_index do |line, i|
|
205
|
-
if line.match(/\#\+(TAG|tag|Tag|tags|TAGS|Tags)
|
215
|
+
if line.match(/\#\+(TAG|tag|Tag|tags|TAGS|Tags):/)
|
206
216
|
new_lines[i] = "#+TAG: #{new_tags.join(", ")}\n"
|
207
217
|
break
|
208
218
|
end
|
data/lib/qiita_org/template.org
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#+OPTIONS: ^:{}
|
2
|
-
#+STARTUP: indent nolineimages
|
2
|
+
#+STARTUP: indent nolineimages overview num
|
3
3
|
#+TITLE: title
|
4
4
|
#+AUTHOR: Your Name
|
5
5
|
#+EMAIL: (concat "hogehoge@example.com")
|
@@ -8,5 +8,5 @@
|
|
8
8
|
#+OPTIONS: toc:nil
|
9
9
|
#+TAG: hoge, hoge2
|
10
10
|
#+TWITTER: off
|
11
|
-
|
11
|
+
#+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
|
12
12
|
|
data/lib/qiita_org/upload.rb
CHANGED
@@ -3,9 +3,9 @@ require "io/console"
|
|
3
3
|
require "qiita_org/access_qiita.rb"
|
4
4
|
|
5
5
|
class QiitaFileUpLoad
|
6
|
-
def initialize(src, option, os)
|
7
|
-
@src = src
|
8
|
-
@option = (option == "qiita" || option == "open")? "public" : option
|
6
|
+
def initialize(src, option, os = "mac")
|
7
|
+
p @src = src
|
8
|
+
@option = (option == "qiita" || option == "open") ? "public" : option
|
9
9
|
@os = os
|
10
10
|
@base = QiitaBase.new()
|
11
11
|
@access_token, @teams_url, @display, @ox_qmd_load_path = QiitaBase.new().set_config()
|
@@ -14,17 +14,18 @@ class QiitaFileUpLoad
|
|
14
14
|
|
15
15
|
def upload()
|
16
16
|
paths = get_file_path(@src)
|
17
|
-
|
17
|
+
if paths.empty?
|
18
|
+
raise RuntimeError.new "No upload file path in #{@src}."
|
19
|
+
else
|
18
20
|
open_file_dir(paths)
|
19
21
|
open_qiita()
|
20
22
|
|
21
23
|
puts "Overwrite file URL's on #{@src}? (y/n)".green
|
22
24
|
ans = STDIN.getch
|
23
25
|
|
24
|
-
input_url_to_org(paths) if ans == "y"
|
25
|
-
else
|
26
|
-
puts "file path is empty.".red
|
26
|
+
input_url_to_org(paths) if ans[0].downcase == "y"
|
27
27
|
end
|
28
|
+
true
|
28
29
|
end
|
29
30
|
|
30
31
|
def get_file_path(src)
|
@@ -45,11 +46,12 @@ class QiitaFileUpLoad
|
|
45
46
|
|
46
47
|
def open_file_dir(paths)
|
47
48
|
previous_paths = []
|
48
|
-
previous_paths << File.join(paths[0].split("/")[0..-2])
|
49
|
-
@base.file_open(@os, File.join(paths[0].split("/")[0..-2]))
|
49
|
+
# previous_paths << File.join(paths[0].split("/")[0..-2])
|
50
|
+
# @base.file_open(@os, File.join(paths[0].split("/")[0..-2]))
|
50
51
|
|
51
|
-
paths.each do |path|
|
52
|
+
[paths].flatten.each do |path| # previous need for ommit multiple open of the identical dir
|
52
53
|
dir_path = File.join(path.split("/")[0..-2])
|
54
|
+
dir_path = "." if dir_path == ""
|
53
55
|
unless previous_paths.include?(dir_path)
|
54
56
|
previous_paths << dir_path
|
55
57
|
@base.file_open(@os, dir_path)
|
@@ -93,11 +95,11 @@ class QiitaFileUpLoad
|
|
93
95
|
end
|
94
96
|
|
95
97
|
def get_file_url(id, file_name)
|
96
|
-
qiita = (@option == "teams")? @teams_url : "https://qiita.com/"
|
98
|
+
qiita = (@option == "teams") ? @teams_url : "https://qiita.com/"
|
97
99
|
path = "api/v2/items/#{@id}"
|
98
100
|
|
99
101
|
items = @access.access_qiita()
|
100
|
-
|
102
|
+
puts items["body"].match?(/\!\[#{file_name}\]\(((.+))\)/)
|
101
103
|
if items["body"].match?(/\!\[#{file_name}\]\(((.+))\)/)
|
102
104
|
@file_url = items["body"].match(/\!\[#{file_name}\]\(((.+))\)/)[2]
|
103
105
|
puts "Wrote #{file_name}'s URL".green
|
data/lib/qiita_org/version.rb
CHANGED
data/lib/qiita_org.rb
CHANGED
@@ -57,7 +57,7 @@ module QiitaOrg
|
|
57
57
|
|
58
58
|
def upload(*argv)
|
59
59
|
os = @base.check_pc_os()
|
60
|
-
|
60
|
+
p :argv => argv
|
61
61
|
if argv.size > 2
|
62
62
|
GetMultipleFiles.new(argv, os, "upload").run()
|
63
63
|
else #if argv.size > 1
|
@@ -66,8 +66,11 @@ module QiitaOrg
|
|
66
66
|
else
|
67
67
|
p file = argv[0] || "README.org"
|
68
68
|
p mode = argv[1] || @base.pick_up_option(file)
|
69
|
-
|
70
|
-
|
69
|
+
begin
|
70
|
+
QiitaFileUpLoad.new(file, mode, os).upload()
|
71
|
+
rescue Exception => ex
|
72
|
+
puts ex.message.red
|
73
|
+
end
|
71
74
|
end
|
72
75
|
end
|
73
76
|
end
|
@@ -78,7 +81,7 @@ module QiitaOrg
|
|
78
81
|
status = argv[0] || "local"
|
79
82
|
option = argv[1] || nil
|
80
83
|
input = [argv[2], argv[3], argv[4]]
|
81
|
-
config =
|
84
|
+
config = QiitaConfig.new(status, option, input)
|
82
85
|
config.run
|
83
86
|
end
|
84
87
|
|
@@ -87,7 +90,7 @@ module QiitaOrg
|
|
87
90
|
def get(*argv)
|
88
91
|
p mode = argv[0] || "qiita"
|
89
92
|
p id = argv[1] || nil
|
90
|
-
get =
|
93
|
+
get = QiitaGet.new(mode, id)
|
91
94
|
get.run
|
92
95
|
end
|
93
96
|
|
@@ -96,7 +99,7 @@ module QiitaOrg
|
|
96
99
|
def template(*argv)
|
97
100
|
os = @base.check_pc_os()
|
98
101
|
filename = argv[0] || "template.org"
|
99
|
-
filename = (filename.include?(".org"))? filename : "#{filename}.org"
|
102
|
+
filename = (filename.include?(".org")) ? filename : "#{filename}.org"
|
100
103
|
|
101
104
|
template = QiitaGetTemplate.new(os, filename).run()
|
102
105
|
end
|
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.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenta Yamamoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -110,11 +110,14 @@ files:
|
|
110
110
|
- Gemfile
|
111
111
|
- Gemfile.lock
|
112
112
|
- LICENSE.txt
|
113
|
-
- README.md
|
114
113
|
- README.org
|
115
114
|
- Rakefile
|
116
115
|
- bin/console
|
117
116
|
- bin/setup
|
117
|
+
- docs/README.org
|
118
|
+
- docs/qiita_org.pptx
|
119
|
+
- docs/qiita_org/slide_1.png
|
120
|
+
- docs/~$qiita_org.pptx
|
118
121
|
- exe/qiita
|
119
122
|
- exe/qiita_org
|
120
123
|
- figs/fig1.png
|
@@ -150,15 +153,6 @@ files:
|
|
150
153
|
- lib/qiita_org/upload.rb
|
151
154
|
- lib/qiita_org/version.rb
|
152
155
|
- qiita_org.gemspec
|
153
|
-
- tests/hoge.rb
|
154
|
-
- tests/tags_test.org
|
155
|
-
- tests/tags_test2.org
|
156
|
-
- tests/test.html
|
157
|
-
- tests/test.org
|
158
|
-
- tests/test2.org
|
159
|
-
- tests/test3.org
|
160
|
-
- tests/test4.org
|
161
|
-
- tests/twitter_test.org
|
162
156
|
homepage: https://github.com/yamatoken/qiita_org
|
163
157
|
licenses:
|
164
158
|
- MIT
|
@@ -178,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
172
|
- !ruby/object:Gem::Version
|
179
173
|
version: '0'
|
180
174
|
requirements: []
|
181
|
-
rubygems_version: 3.
|
175
|
+
rubygems_version: 3.2.22
|
182
176
|
signing_key:
|
183
177
|
specification_version: 4
|
184
178
|
summary: this is qiita post gem from org.
|
data/README.md
DELETED
@@ -1,209 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
# QiitaOrg
|
4
|
-
|
5
|
-
\![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>) \![qiita\_org version](<https://img.shields.io/badge/qiitaorg-0.1.8-brightgreen>)
|
6
|
-
|
7
|
-
|
8
|
-
## 概要
|
9
|
-
|
10
|
-
qiita\_orgはqiitaへの投稿にあたって,テキストの作成から投稿までをterminal上で一括で行いたいというコンセプトでできたgemです.
|
11
|
-
|
12
|
-
emacs org-modeで作成したテキストをCUIでqiitaに投稿します.
|
13
|
-
|
14
|
-
注意点:command\_lineを使用しているのでrubyのバージョンは2.4.0以上にしてください.また,emacsのバージョンは26.3以上をお勧めします.
|
15
|
-
|
16
|
-
|
17
|
-
## 使用例
|
18
|
-
|
19
|
-
まず,org-modeの投稿用テンプレートを取得します.'qiita template'とコマンドを打ち,環境を書き込むかを決めtemplate.orgを作成します.![img](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/612049/76dc9d92-3a77-5523-7a21-571f691402bb.png)
|
20
|
-
|
21
|
-
すると,このようなorgが作成されます.![img](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/612049/4a38e62f-9cae-1bf1-ee51-080706c64f6f.png)
|
22
|
-
|
23
|
-
ここのtitle,tagをqiitaに載せる用のものに変更してあとは従来通り本文を書くだけ.
|
24
|
-
|
25
|
-
本文が作成できたら,あとは投稿用のコマンドを実行するだけ.試しに限定共有投稿へ投稿してみるとこんな感じ.![img](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/612049/3f7179f4-e150-7a63-b8ba-e936b925d7be.png)
|
26
|
-
|
27
|
-
ズラズラーっと出ますが,設定がちゃんとできていれば投稿が完了し,Safariで投稿したページが開きます.
|
28
|
-
|
29
|
-
投稿した記事にはSouceとしてどこのディレクトリに元のorgテキストがあるか表示されるので,少し前の記事を編集したい時でも便利なはず...
|
30
|
-
|
31
|
-
|
32
|
-
## インストール
|
33
|
-
|
34
|
-
```bash
|
35
|
-
gem install qiita_org
|
36
|
-
```
|
37
|
-
|
38
|
-
get commandにpandocを使っているのでインストールしてください.macなら
|
39
|
-
|
40
|
-
```bash
|
41
|
-
brew install pandoc
|
42
|
-
```
|
43
|
-
|
44
|
-
ubuntuなら
|
45
|
-
|
46
|
-
```bash
|
47
|
-
sudo apt update
|
48
|
-
sudo apt install pandoc
|
49
|
-
```
|
50
|
-
|
51
|
-
|
52
|
-
## 設定ファイルの作成
|
53
|
-
|
54
|
-
```bash
|
55
|
-
qiita config global
|
56
|
-
```
|
57
|
-
|
58
|
-
とし,設定ファイルをホームディレクトリに作成する.
|
59
|
-
|
60
|
-
|
61
|
-
### Qiitaのアクセストークンの作成方法と設定ファイルへの書き込み
|
62
|
-
|
63
|
-
[<https://qiita.com/settings/applications>](<https://qiita.com/settings/applications>)にて
|
64
|
-
|
65
|
-
個人用アクセストークンの'新しくトークンを発行する'をクリック.![img](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/612049/de93b61e-b42d-8364-7282-ee1bdbd572ad.png)
|
66
|
-
|
67
|
-
アクセストークンの説明を書き,スコープのところは画像のように全てにチェックを入れる.その後発行をおす.![img](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/612049/7012077d-fba8-e823-d29c-dc93939b4d6b.png)
|
68
|
-
|
69
|
-
ページが移動すると個人用アクセストークンのところにアクセストークンが表示されているので,コピーしてください.(この文字列はページを移動すると再表示できなくなるので注意してください.)
|
70
|
-
|
71
|
-
ターミナルに戻り,以下のように実行.
|
72
|
-
|
73
|
-
```bash
|
74
|
-
qiita config global access_token 'your accesstoken'
|
75
|
-
```
|
76
|
-
|
77
|
-
'your accesstoken'のところには先ほどコピーしたアクセストークンをペーストしてください.
|
78
|
-
|
79
|
-
|
80
|
-
### 名前の登録
|
81
|
-
|
82
|
-
```bash
|
83
|
-
qiita config global name 'your name'
|
84
|
-
```
|
85
|
-
|
86
|
-
|
87
|
-
### メールアドレスの登録
|
88
|
-
|
89
|
-
```bash
|
90
|
-
qiita config global email 'your email'
|
91
|
-
```
|
92
|
-
|
93
|
-
|
94
|
-
### QiitaTeamURLの登録
|
95
|
-
|
96
|
-
'teams'というoptionを使うために必要なので,所属しているQiitaTeamがあるのならこの設定を行なってください.なければ設定しなくて大丈夫です.
|
97
|
-
|
98
|
-
```bash
|
99
|
-
qiita config global teams_url 'https://foge.qiita.com/'
|
100
|
-
```
|
101
|
-
|
102
|
-
URLは最後に'/'をつけるのを忘れないように注意してください.
|
103
|
-
|
104
|
-
|
105
|
-
### localの設定ファイルを作る方法
|
106
|
-
|
107
|
-
複数のTeamに所属している場合や,ディレクトリごとにメールアドレスを設定したい場合があればlocalの設定ファイルを指定できます.
|
108
|
-
|
109
|
-
設定ファイルを作りたいディレクトリにて,
|
110
|
-
|
111
|
-
```bash
|
112
|
-
qiita config local set
|
113
|
-
```
|
114
|
-
|
115
|
-
とし,上記の初期設定のglobalをlocalに変えてそのほかを同じように書き込んでいくとできます.
|
116
|
-
|
117
|
-
|
118
|
-
# コマンド一覧
|
119
|
-
|
120
|
-
- qiita all
|
121
|
-
- qiita config [global/local] [option] [input]
|
122
|
-
- qiita get [qiita/teams] [記事のID]
|
123
|
-
- qiita list [qiita/teams]
|
124
|
-
- qiita post [FILE] [private/public/teams]
|
125
|
-
- qiita template
|
126
|
-
|
127
|
-
|
128
|
-
## qiita all
|
129
|
-
|
130
|
-
カレントディレクトリ内の全てのorgファイルをqiitaに投稿するコマンドです.
|
131
|
-
|
132
|
-
orgファイル内にidの記載のあるものは記事の更新,id記載のないものに関しては全て限定共有投稿に投稿されます.
|
133
|
-
|
134
|
-
|
135
|
-
## qiita config
|
136
|
-
|
137
|
-
qiita\_orgの設定ファイルの作成と確認を行うコマンドです.
|
138
|
-
|
139
|
-
設定方法については上記の通りです.
|
140
|
-
|
141
|
-
|
142
|
-
## qiita get
|
143
|
-
|
144
|
-
Qiitaの記事を取得するためのコマンドです.
|
145
|
-
|
146
|
-
|
147
|
-
## 特定記事の取得方法
|
148
|
-
|
149
|
-
qiita get [qiita/teams] [記事のID]
|
150
|
-
|
151
|
-
実行することで指定した記事をid.orgとしてディレクトリ内に作成します.
|
152
|
-
|
153
|
-
|
154
|
-
## 複数記事の取得方法
|
155
|
-
|
156
|
-
自分のQiitaもしくはQiitaTeamの記事を最新から100個まで表示し取得できます.
|
157
|
-
|
158
|
-
qiita get [qiita/teams]
|
159
|
-
|
160
|
-
実行するとタイトルが表示されるので,保存したければ'y'いらなければ'n'を入力する.終了は'e'
|
161
|
-
|
162
|
-
|
163
|
-
## qiita list
|
164
|
-
|
165
|
-
自分のQiitaもしくはQiitaTeamの記事を最新から100個までterminal上に表示するコマンドです.
|
166
|
-
|
167
|
-
qiita list [qiita/teams]
|
168
|
-
|
169
|
-
実行するとオプションがqiitaならtitle, URL, 記事の元となったorgファイルの場所が表示されます.
|
170
|
-
|
171
|
-
teamsの方ではさらに誰の記事かが表示されます.
|
172
|
-
|
173
|
-
|
174
|
-
## qiita post
|
175
|
-
|
176
|
-
Qiitaにorg-modeで書いたテキストを投稿するためのコマンドです.
|
177
|
-
|
178
|
-
qiita post [FILE] [private/public/teams]
|
179
|
-
|
180
|
-
FILEには投稿したいorgファイルを,privateは限定共有投稿,publicは公開記事,teamsはQiitaTeamに投稿されます.
|
181
|
-
|
182
|
-
例:
|
183
|
-
|
184
|
-
```
|
185
|
-
qiita post example.org private
|
186
|
-
```
|
187
|
-
|
188
|
-
と実行すると限定共有記事にexample.orgの内容が投稿されます.
|
189
|
-
|
190
|
-
|
191
|
-
## qiita template
|
192
|
-
|
193
|
-
qiita\_orgで投稿するためのヘッダーがついたorgファイルを取得するコマンドです.
|
194
|
-
|
195
|
-
カレントディレクトリにtemplate.orgを作成します.すでにtemplate.orgがある場合は作成されません.
|
196
|
-
|
197
|
-
|
198
|
-
# future features
|
199
|
-
|
200
|
-
- qiita post => refactoring
|
201
|
-
|
202
|
-
- configに登録する、git edit global. editor, mail, users…
|
203
|
-
- qiita config access\_token hogehoge
|
204
|
-
- qiita config teams hogehoge
|
205
|
-
- giita config => configを表示
|
206
|
-
|
207
|
-
- cui, 変数名を適切に選ぶ,teams\_path -> teams\_url
|
208
|
-
- qiita getの実装,
|
209
|
-
|
data/tests/hoge.rb
DELETED
data/tests/tags_test.org
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
#+qiita_private: e58d6513b42c9e1f3eb6
|
2
|
-
#+OPTIONS: ^:{}
|
3
|
-
#+STARTUP: indent nolineimages
|
4
|
-
#+TITLE: title
|
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: Qiita, Ruby
|
11
|
-
#+TWITTER: off
|
12
|
-
# +SETUPFILE: ~/.emacs.d/org-mode/theme-readtheorg.setup
|
13
|
-
|
14
|
-
![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)
|
15
|
-
|
16
|
-
hogehoge
|
data/tests/tags_test2.org
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
#+qiita_private: e58d6513b42c9e1f3eb6
|
2
|
-
#+OPTIONS: ^:{}
|
3
|
-
#+STARTUP: indent nolineimages
|
4
|
-
#+TITLE: title
|
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: hoge2
|
11
|
-
#+TWITTER: off
|
12
|
-
# +SETUPFILE: ~/.emacs.d/org-mode/theme-readtheorg.setup
|
13
|
-
|
14
|
-
![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)
|
15
|
-
|
16
|
-
hogehoge
|
data/tests/test.html
DELETED
@@ -1,280 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml" lang="jp" xml:lang="jp">
|
5
|
-
<head>
|
6
|
-
<!-- 2020-10-20 火 14:30 -->
|
7
|
-
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
9
|
-
<title>test</title>
|
10
|
-
<meta name="generator" content="Org mode" />
|
11
|
-
<meta name="author" content="Kenta Yamamoto" />
|
12
|
-
<style type="text/css">
|
13
|
-
<!--/*--><![CDATA[/*><!--*/
|
14
|
-
.title { text-align: center;
|
15
|
-
margin-bottom: .2em; }
|
16
|
-
.subtitle { text-align: center;
|
17
|
-
font-size: medium;
|
18
|
-
font-weight: bold;
|
19
|
-
margin-top:0; }
|
20
|
-
.todo { font-family: monospace; color: red; }
|
21
|
-
.done { font-family: monospace; color: green; }
|
22
|
-
.priority { font-family: monospace; color: orange; }
|
23
|
-
.tag { background-color: #eee; font-family: monospace;
|
24
|
-
padding: 2px; font-size: 80%; font-weight: normal; }
|
25
|
-
.timestamp { color: #bebebe; }
|
26
|
-
.timestamp-kwd { color: #5f9ea0; }
|
27
|
-
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
|
28
|
-
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
|
29
|
-
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
|
30
|
-
.underline { text-decoration: underline; }
|
31
|
-
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
|
32
|
-
p.verse { margin-left: 3%; }
|
33
|
-
pre {
|
34
|
-
border: 1px solid #ccc;
|
35
|
-
box-shadow: 3px 3px 3px #eee;
|
36
|
-
padding: 8pt;
|
37
|
-
font-family: monospace;
|
38
|
-
overflow: auto;
|
39
|
-
margin: 1.2em;
|
40
|
-
}
|
41
|
-
pre.src {
|
42
|
-
position: relative;
|
43
|
-
overflow: visible;
|
44
|
-
padding-top: 1.2em;
|
45
|
-
}
|
46
|
-
pre.src:before {
|
47
|
-
display: none;
|
48
|
-
position: absolute;
|
49
|
-
background-color: white;
|
50
|
-
top: -10px;
|
51
|
-
right: 10px;
|
52
|
-
padding: 3px;
|
53
|
-
border: 1px solid black;
|
54
|
-
}
|
55
|
-
pre.src:hover:before { display: inline;}
|
56
|
-
/* Languages per Org manual */
|
57
|
-
pre.src-asymptote:before { content: 'Asymptote'; }
|
58
|
-
pre.src-awk:before { content: 'Awk'; }
|
59
|
-
pre.src-C:before { content: 'C'; }
|
60
|
-
/* pre.src-C++ doesn't work in CSS */
|
61
|
-
pre.src-clojure:before { content: 'Clojure'; }
|
62
|
-
pre.src-css:before { content: 'CSS'; }
|
63
|
-
pre.src-D:before { content: 'D'; }
|
64
|
-
pre.src-ditaa:before { content: 'ditaa'; }
|
65
|
-
pre.src-dot:before { content: 'Graphviz'; }
|
66
|
-
pre.src-calc:before { content: 'Emacs Calc'; }
|
67
|
-
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
|
68
|
-
pre.src-fortran:before { content: 'Fortran'; }
|
69
|
-
pre.src-gnuplot:before { content: 'gnuplot'; }
|
70
|
-
pre.src-haskell:before { content: 'Haskell'; }
|
71
|
-
pre.src-hledger:before { content: 'hledger'; }
|
72
|
-
pre.src-java:before { content: 'Java'; }
|
73
|
-
pre.src-js:before { content: 'Javascript'; }
|
74
|
-
pre.src-latex:before { content: 'LaTeX'; }
|
75
|
-
pre.src-ledger:before { content: 'Ledger'; }
|
76
|
-
pre.src-lisp:before { content: 'Lisp'; }
|
77
|
-
pre.src-lilypond:before { content: 'Lilypond'; }
|
78
|
-
pre.src-lua:before { content: 'Lua'; }
|
79
|
-
pre.src-matlab:before { content: 'MATLAB'; }
|
80
|
-
pre.src-mscgen:before { content: 'Mscgen'; }
|
81
|
-
pre.src-ocaml:before { content: 'Objective Caml'; }
|
82
|
-
pre.src-octave:before { content: 'Octave'; }
|
83
|
-
pre.src-org:before { content: 'Org mode'; }
|
84
|
-
pre.src-oz:before { content: 'OZ'; }
|
85
|
-
pre.src-plantuml:before { content: 'Plantuml'; }
|
86
|
-
pre.src-processing:before { content: 'Processing.js'; }
|
87
|
-
pre.src-python:before { content: 'Python'; }
|
88
|
-
pre.src-R:before { content: 'R'; }
|
89
|
-
pre.src-ruby:before { content: 'Ruby'; }
|
90
|
-
pre.src-sass:before { content: 'Sass'; }
|
91
|
-
pre.src-scheme:before { content: 'Scheme'; }
|
92
|
-
pre.src-screen:before { content: 'Gnu Screen'; }
|
93
|
-
pre.src-sed:before { content: 'Sed'; }
|
94
|
-
pre.src-sh:before { content: 'shell'; }
|
95
|
-
pre.src-sql:before { content: 'SQL'; }
|
96
|
-
pre.src-sqlite:before { content: 'SQLite'; }
|
97
|
-
/* additional languages in org.el's org-babel-load-languages alist */
|
98
|
-
pre.src-forth:before { content: 'Forth'; }
|
99
|
-
pre.src-io:before { content: 'IO'; }
|
100
|
-
pre.src-J:before { content: 'J'; }
|
101
|
-
pre.src-makefile:before { content: 'Makefile'; }
|
102
|
-
pre.src-maxima:before { content: 'Maxima'; }
|
103
|
-
pre.src-perl:before { content: 'Perl'; }
|
104
|
-
pre.src-picolisp:before { content: 'Pico Lisp'; }
|
105
|
-
pre.src-scala:before { content: 'Scala'; }
|
106
|
-
pre.src-shell:before { content: 'Shell Script'; }
|
107
|
-
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
|
108
|
-
/* additional language identifiers per "defun org-babel-execute"
|
109
|
-
in ob-*.el */
|
110
|
-
pre.src-cpp:before { content: 'C++'; }
|
111
|
-
pre.src-abc:before { content: 'ABC'; }
|
112
|
-
pre.src-coq:before { content: 'Coq'; }
|
113
|
-
pre.src-groovy:before { content: 'Groovy'; }
|
114
|
-
/* additional language identifiers from org-babel-shell-names in
|
115
|
-
ob-shell.el: ob-shell is the only babel language using a lambda to put
|
116
|
-
the execution function name together. */
|
117
|
-
pre.src-bash:before { content: 'bash'; }
|
118
|
-
pre.src-csh:before { content: 'csh'; }
|
119
|
-
pre.src-ash:before { content: 'ash'; }
|
120
|
-
pre.src-dash:before { content: 'dash'; }
|
121
|
-
pre.src-ksh:before { content: 'ksh'; }
|
122
|
-
pre.src-mksh:before { content: 'mksh'; }
|
123
|
-
pre.src-posh:before { content: 'posh'; }
|
124
|
-
/* Additional Emacs modes also supported by the LaTeX listings package */
|
125
|
-
pre.src-ada:before { content: 'Ada'; }
|
126
|
-
pre.src-asm:before { content: 'Assembler'; }
|
127
|
-
pre.src-caml:before { content: 'Caml'; }
|
128
|
-
pre.src-delphi:before { content: 'Delphi'; }
|
129
|
-
pre.src-html:before { content: 'HTML'; }
|
130
|
-
pre.src-idl:before { content: 'IDL'; }
|
131
|
-
pre.src-mercury:before { content: 'Mercury'; }
|
132
|
-
pre.src-metapost:before { content: 'MetaPost'; }
|
133
|
-
pre.src-modula-2:before { content: 'Modula-2'; }
|
134
|
-
pre.src-pascal:before { content: 'Pascal'; }
|
135
|
-
pre.src-ps:before { content: 'PostScript'; }
|
136
|
-
pre.src-prolog:before { content: 'Prolog'; }
|
137
|
-
pre.src-simula:before { content: 'Simula'; }
|
138
|
-
pre.src-tcl:before { content: 'tcl'; }
|
139
|
-
pre.src-tex:before { content: 'TeX'; }
|
140
|
-
pre.src-plain-tex:before { content: 'Plain TeX'; }
|
141
|
-
pre.src-verilog:before { content: 'Verilog'; }
|
142
|
-
pre.src-vhdl:before { content: 'VHDL'; }
|
143
|
-
pre.src-xml:before { content: 'XML'; }
|
144
|
-
pre.src-nxml:before { content: 'XML'; }
|
145
|
-
/* add a generic configuration mode; LaTeX export needs an additional
|
146
|
-
(add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
|
147
|
-
pre.src-conf:before { content: 'Configuration File'; }
|
148
|
-
|
149
|
-
table { border-collapse:collapse; }
|
150
|
-
caption.t-above { caption-side: top; }
|
151
|
-
caption.t-bottom { caption-side: bottom; }
|
152
|
-
td, th { vertical-align:top; }
|
153
|
-
th.org-right { text-align: center; }
|
154
|
-
th.org-left { text-align: center; }
|
155
|
-
th.org-center { text-align: center; }
|
156
|
-
td.org-right { text-align: right; }
|
157
|
-
td.org-left { text-align: left; }
|
158
|
-
td.org-center { text-align: center; }
|
159
|
-
dt { font-weight: bold; }
|
160
|
-
.footpara { display: inline; }
|
161
|
-
.footdef { margin-bottom: 1em; }
|
162
|
-
.figure { padding: 1em; }
|
163
|
-
.figure p { text-align: center; }
|
164
|
-
.equation-container {
|
165
|
-
display: table;
|
166
|
-
text-align: center;
|
167
|
-
width: 100%;
|
168
|
-
}
|
169
|
-
.equation {
|
170
|
-
vertical-align: middle;
|
171
|
-
}
|
172
|
-
.equation-label {
|
173
|
-
display: table-cell;
|
174
|
-
text-align: right;
|
175
|
-
vertical-align: middle;
|
176
|
-
}
|
177
|
-
.inlinetask {
|
178
|
-
padding: 10px;
|
179
|
-
border: 2px solid gray;
|
180
|
-
margin: 10px;
|
181
|
-
background: #ffffcc;
|
182
|
-
}
|
183
|
-
#org-div-home-and-up
|
184
|
-
{ text-align: right; font-size: 70%; white-space: nowrap; }
|
185
|
-
textarea { overflow-x: auto; }
|
186
|
-
.linenr { font-size: smaller }
|
187
|
-
.code-highlighted { background-color: #ffff00; }
|
188
|
-
.org-info-js_info-navigation { border-style: none; }
|
189
|
-
#org-info-js_console-label
|
190
|
-
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
|
191
|
-
.org-info-js_search-highlight
|
192
|
-
{ background-color: #ffff00; color: #000000; font-weight: bold; }
|
193
|
-
.org-svg { width: 90%; }
|
194
|
-
/*]]>*/-->
|
195
|
-
</style>
|
196
|
-
<script type="text/javascript">
|
197
|
-
/*
|
198
|
-
@licstart The following is the entire license notice for the
|
199
|
-
JavaScript code in this tag.
|
200
|
-
|
201
|
-
Copyright (C) 2012-2020 Free Software Foundation, Inc.
|
202
|
-
|
203
|
-
The JavaScript code in this tag is free software: you can
|
204
|
-
redistribute it and/or modify it under the terms of the GNU
|
205
|
-
General Public License (GNU GPL) as published by the Free Software
|
206
|
-
Foundation, either version 3 of the License, or (at your option)
|
207
|
-
any later version. The code is distributed WITHOUT ANY WARRANTY;
|
208
|
-
without even the implied warranty of MERCHANTABILITY or FITNESS
|
209
|
-
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
|
210
|
-
|
211
|
-
As additional permission under GNU GPL version 3 section 7, you
|
212
|
-
may distribute non-source (e.g., minimized or compacted) forms of
|
213
|
-
that code without the copy of the GNU GPL normally required by
|
214
|
-
section 4, provided you include this license notice and a URL
|
215
|
-
through which recipients can access the Corresponding Source.
|
216
|
-
|
217
|
-
|
218
|
-
@licend The above is the entire license notice
|
219
|
-
for the JavaScript code in this tag.
|
220
|
-
*/
|
221
|
-
<!--/*--><![CDATA[/*><!--*/
|
222
|
-
function CodeHighlightOn(elem, id)
|
223
|
-
{
|
224
|
-
var target = document.getElementById(id);
|
225
|
-
if(null != target) {
|
226
|
-
elem.cacheClassElem = elem.className;
|
227
|
-
elem.cacheClassTarget = target.className;
|
228
|
-
target.className = "code-highlighted";
|
229
|
-
elem.className = "code-highlighted";
|
230
|
-
}
|
231
|
-
}
|
232
|
-
function CodeHighlightOff(elem, id)
|
233
|
-
{
|
234
|
-
var target = document.getElementById(id);
|
235
|
-
if(elem.cacheClassElem)
|
236
|
-
elem.className = elem.cacheClassElem;
|
237
|
-
if(elem.cacheClassTarget)
|
238
|
-
target.className = elem.cacheClassTarget;
|
239
|
-
}
|
240
|
-
/*]]>*///-->
|
241
|
-
</script>
|
242
|
-
</head>
|
243
|
-
<body>
|
244
|
-
<div id="content">
|
245
|
-
<h1 class="title">test</h1>
|
246
|
-
<p>
|
247
|
-
![Mac OS X-10.13.3](<a href="https://img.shields.io/badge/MacOSX-10.13.3-brightgreen">https://img.shields.io/badge/MacOSX-10.13.3-brightgreen</a>) ![ruby-2.7.0p0](<a href="https://img.shields.io/badge/ruby-2.7.0p0-brightgreen">https://img.shields.io/badge/ruby-2.7.0p0-brightgreen</a>)
|
248
|
-
</p>
|
249
|
-
|
250
|
-
<p>
|
251
|
-
fogefoge
|
252
|
-
</p>
|
253
|
-
|
254
|
-
|
255
|
-
<div class="figure">
|
256
|
-
<p><a href="figs/fig1.png"><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/612049/a3b2ab02-f903-f5d6-d8b9-5407e8db5a2a.png" alt="a3b2ab02-f903-f5d6-d8b9-5407e8db5a2a.png" /></a>
|
257
|
-
</p>
|
258
|
-
</div>
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
<div id="org244c236" class="figure">
|
263
|
-
<p><img src="figs/fig2.png" alt="fig2.png" />
|
264
|
-
</p>
|
265
|
-
<p><span class="figure-number">Figure 2: </span>example qiita template command</p>
|
266
|
-
</div>
|
267
|
-
|
268
|
-
|
269
|
-
<div class="figure">
|
270
|
-
<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/612049/a3b2ab02-f903-f5d6-d8b9-5407e8db5a2a.png" alt="a3b2ab02-f903-f5d6-d8b9-5407e8db5a2a.png" />
|
271
|
-
</p>
|
272
|
-
</div>
|
273
|
-
</div>
|
274
|
-
<div id="postamble" class="status">
|
275
|
-
<p class="author">Author: Kenta Yamamoto</p>
|
276
|
-
<p class="date">Created: 2020-10-20 火 14:30</p>
|
277
|
-
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
278
|
-
</div>
|
279
|
-
</body>
|
280
|
-
</html>
|
data/tests/test.org
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
#+qiita_private: 4a238f55b2014ae6494e
|
2
|
-
# +qiita_private: e87e38157a72b4c2e839
|
3
|
-
# +qiita_private: 5f8c73e8007e52ef3f40
|
4
|
-
# +qiita_private: 4decbf7a81ef2327643f
|
5
|
-
#+OPTIONS: ^:{}
|
6
|
-
#+STARTUP: indent nolineimages
|
7
|
-
#+TITLE: test
|
8
|
-
#+AUTHOR: Kenta Yamamoto
|
9
|
-
#+EMAIL: (concat "doi35077@kwansei.ac.jp")
|
10
|
-
#+qiita_id: yamatoken
|
11
|
-
#+LANGUAGE: jp
|
12
|
-
# +OPTIONS: H:4 toc:t num:2
|
13
|
-
#+OPTIONS: toc:nil
|
14
|
-
#+TAG: test1, test2, test3, test4, test5
|
15
|
-
# +SETUPFILE: ~/.emacs.d/org-mode/theme-readtheorg.setup
|
16
|
-
|
17
|
-
![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)
|
18
|
-
|
19
|
-
| fogefoge | fogefoge |
|
20
|
-
| foge | foge |
|
21
|
-
# +caption: example qiita template command
|
22
|
-
# +name: fig:fig1
|
23
|
-
#+ATTR_LATEX: :width 8cm
|
24
|
-
[[file:~/Github/qiita_org/figs/fig1.png][https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/612049/a3b2ab02-f903-f5d6-d8b9-5407e8db5a2a.png]]
|
25
|
-
|
26
|
-
|
27
|
-
#+caption: example qiita template command
|
28
|
-
#+name: fig:fig1
|
29
|
-
[[file:../figs/fig2.png]]
|
30
|
-
|
31
|
-
https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/612049/a3b2ab02-f903-f5d6-d8b9-5407e8db5a2a.png
|
32
|
-
|
33
|
-
|
data/tests/test2.org
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
#+qiita_private: 6ce39fa8ae7f7a472cf2
|
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
|
16
|
-
# +caption: example qiita template command
|
17
|
-
# +name: fig:fig1
|
18
|
-
#+ATTR_LATEX: :width 8cm
|
19
|
-
[[https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/612049/ebf505d2-6960-6bb9-20f0-e16dab142f4a.png][file:../figs/fig1.png]]
|
20
|
-
|
21
|
-
[[file:../figs/fig2.png]]
|
22
|
-
|
23
|
-
|
data/tests/test3.org
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
#+qiita_private: 6bba4b40450fde79a07b
|
2
|
-
# +qiita_teams: bd41ced53b4b18701453
|
3
|
-
#+OPTIONS: ^:{}
|
4
|
-
#+STARTUP: indent nolineimages
|
5
|
-
#+TITLE: test
|
6
|
-
#+AUTHOR: Kenta Yamamoto
|
7
|
-
#+EMAIL: (concat "doi35077@kwansei.ac.jp")
|
8
|
-
#+LANGUAGE: jp
|
9
|
-
# +OPTIONS: H:4 toc:t num:2
|
10
|
-
#+OPTIONS: toc:nil
|
11
|
-
#+TAG: test
|
12
|
-
# +SETUPFILE: ~/.emacs.d/org-mode/theme-readtheorg.setup
|
13
|
-
|
14
|
-
![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)
|
15
|
-
|
16
|
-
fogefoge
|
data/tests/test4.org
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
#+qiita_private: a8ff7b820e1c88113102
|
2
|
-
# +qiita_private: 92b50b88e7da7aa25a1b
|
3
|
-
#+OPTIONS: ^:{}
|
4
|
-
#+STARTUP: indent nolineimages
|
5
|
-
#+TITLE: title
|
6
|
-
#+AUTHOR: Kenta Yamamoto
|
7
|
-
#+EMAIL: (concat "doi35077@kwansei.ac.jp")
|
8
|
-
#+LANGUAGE: jp
|
9
|
-
# +OPTIONS: H:4 toc:t num:2
|
10
|
-
#+OPTIONS: toc:nil
|
11
|
-
#+TAG: tag1, tag2
|
12
|
-
# +SETUPFILE: ~/.emacs.d/org-mode/theme-readtheorg.setup
|
13
|
-
|
14
|
-
![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)
|
15
|
-
|
16
|
-
[[https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/612049/d0531ab8-57b7-7289-7e4f-75c9f54a45d3.png][file:../figs/fig1.png]]
|
data/tests/twitter_test.org
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#+qiita_private: c42df227a81e18c05b9d
|
2
|
-
#+OPTIONS: ^:{}
|
3
|
-
#+STARTUP: indent nolineimages
|
4
|
-
#+TITLE: title
|
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: tag1, tag2
|
11
|
-
#+TWITTER: ON
|
12
|
-
# +SETUPFILE: ~/.emacs.d/org-mode/theme-readtheorg.setup
|
13
|
-
|
14
|
-
![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)
|