cafe_basics 0.0.53 → 0.0.57

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cafe_basics.rb +575 -525
  3. metadata +2 -2
data/lib/cafe_basics.rb CHANGED
@@ -22,97 +22,107 @@ using Rainbow
22
22
  include Glimmer
23
23
 
24
24
  class Chat
25
-
26
- def initialize(api_key)
25
+ def initialize(api_key, gpt_keyword_prompt)
27
26
  @api_key = api_key
27
+ @gpt_keyword_prompt = gpt_keyword_prompt
28
28
  end
29
29
 
30
- def message2(keyword)
31
- puts'[GPT] 키워드 기반 글을 생성 중입니다.......'.yellow
32
- url = 'https://api.openai.com/v1/chat/completions'
33
- h = {
34
- 'Content-Type' => 'application/json',
35
- 'Authorization' => 'Bearer ' + @api_key
36
- }
37
- d = {
38
- #'model' => 'gpt-3.5-turbo',
39
- 'model' => 'gpt-4',
40
- 'messages' => [{
41
- "role" => "assistant",
42
- "content" => keyword.to_s+" 소개하는 글을 1500자에서 2500자 사이로 만들어줘"
43
- }]
44
- }
45
- answer = ''
46
- begin
47
- req = HTTP.headers(h).post(url, :json => d)
48
- print(req.to_s)
49
- answer = JSON.parse(req.to_s)['choices'][0]['message']['content']
50
- rescue => e
51
- begin
52
- answer = JSON.parse(req.to_s)['choices'][0]['message']['message']
53
- rescue
30
+ def message(keyword)
31
+ puts 'Sending request to GPT...(키워드 기반 생성 중...)'
54
32
 
33
+ # "키워드 기반 글 생성 중..." 메시지 출력 스레드
34
+ thread = Thread.new do
35
+ while true
36
+ print "▶"
37
+ sleep 3
55
38
  end
56
39
  end
57
40
 
58
-
59
- print('api return ==> ')
60
- puts(answer)
61
-
62
- return answer
63
- end
64
-
65
- def message(keyword)
66
- puts 'chat gpt ...'
67
41
  url = 'https://api.openai.com/v1/chat/completions'
68
- h = {
42
+ headers = {
69
43
  'Content-Type' => 'application/json',
70
44
  'Authorization' => 'Bearer ' + @api_key
71
45
  }
72
- d = {
73
- #'model' => 'gpt-3.5-turbo',
46
+
47
+ # 사용자로부터 받은 입력과 GPT 프롬프트의 토큰 수 계산
48
+ message_tokens = calculate_tokens(keyword) + calculate_tokens(@gpt_keyword_prompt)
49
+
50
+ # 8,192 토큰을 초과하지 않도록 최대 토큰 수를 설정
51
+ max_response_tokens = [8192 - message_tokens, 4000].min # 8,192 - 입력된 토큰 수, 4,000 이하로 설정
52
+
53
+ # 요청 데이터 설정
54
+ data = {
74
55
  'model' => 'gpt-4',
75
- 'messages' => [{
76
- "role" => "assistant",
77
- "content" => keyword.to_s+" 관련된 글을 1500자에서 2500자 사이로 만들어줘"
78
- }]
56
+ 'messages' => [
57
+ {
58
+ "role" => "assistant",
59
+ "content" => "#{keyword}\n#{@gpt_keyword_prompt}"
60
+ }
61
+ ],
62
+ 'max_tokens' => max_response_tokens # 최대 응답 토큰 설정
79
63
  }
64
+
65
+
66
+
80
67
  answer = ''
81
68
  begin
82
- req = HTTP.headers(h).post(url, :json => d)
83
- print(req.to_s)
84
- answer = JSON.parse(req.to_s)['choices'][0]['message']['content']
85
- rescue => e
86
- begin
87
- answer = JSON.parse(req.to_s)['choices'][0]['message']['message']
88
- rescue
69
+ req = HTTP.headers(headers).post(url, :json => data)
89
70
 
71
+ # 상태 코드 확인
72
+ if req.status != 200
73
+ raise "HTTP Error: #{req.status}, Response Body: #{req.body.to_s}"
90
74
  end
91
- end
92
- con = 0
93
- while con > 5
94
- answer = answer + message2(keyword)
95
- if answer.length > 2000
96
- break
75
+
76
+ # 응답 내용 출력 (디버깅용)
77
+ response = JSON.parse(req.to_s)
78
+
79
+
80
+ # 응답 데이터에서 안전하게 값 추출
81
+ if response['choices'] && response['choices'][0] && response['choices'][0]['message']
82
+ answer = response['choices'][0]['message']['content']
83
+ else
84
+ raise "Invalid API response format"
97
85
  end
98
- con += 1
86
+ rescue => e
87
+ # 오류 메시지 출력
88
+ puts "Error occurred: #{e.message}"
89
+ answer = "오류가 발생했습니다."
99
90
  end
100
91
 
101
- print('api return ==> ')
102
- puts(answer)
92
+ # "생성 중..." 메시지 출력 종료
93
+ thread.kill
103
94
 
95
+ # 결과 로그 출력
96
+ puts "Final API response ==> #{answer}"
104
97
  return answer
105
98
  end
99
+
100
+ def calculate_tokens(text)
101
+ # 간단한 방식으로 텍스트의 토큰 수 계산 (정확도는 다를 수 있음)
102
+ # OpenAI API는 1토큰이 대략 4글자 정도임
103
+ text.split(/\s+/).length # 간단한 단어 수로 계산
104
+ end
106
105
  end
107
106
 
107
+
108
+
109
+
110
+
108
111
  class Chat_title
109
-
110
- def initialize(api_key)
112
+ def initialize(api_key, gpt_title_prompt)
111
113
  @api_key = api_key
114
+ @gpt_title_prompt = gpt_title_prompt
112
115
  end
113
116
 
114
117
  def message(title)
115
- puts'[GPT] 유사 제목을 생성 중입니다.......'.yellow
118
+ puts 'Sending request to GPT...(제목 생성 중...)'
119
+ # "키워드 기반 글 생성 중..." 메시지를 별도 스레드로 처리
120
+ thread = Thread.new do
121
+ while true
122
+ print "▶"
123
+ sleep(3)
124
+ end
125
+ end
116
126
  url = 'https://api.openai.com/v1/chat/completions'
117
127
  headers = {
118
128
  'Content-Type' => 'application/json',
@@ -126,15 +136,15 @@ class Chat_title
126
136
  },
127
137
  {
128
138
  "role" => "user",
129
- "content" => "#{title}\n위 문장을 비슷한 길이로 ChatGPT의 멘트는 빼고 표현을 더 추가해서 하나만 만들어줘."
139
+ "content" => "#{@gpt_title_prompt}\n#{title}"
130
140
  }]
131
141
  }
132
142
 
133
143
  begin
134
144
  req = HTTP.headers(headers).post(url, json: data)
135
- puts "HTTP Status: #{req.status}" # 상태 코드 확인
145
+
136
146
  response = JSON.parse(req.body.to_s)
137
- puts "API Response: #{response}" # 전체 응답 출력
147
+
138
148
 
139
149
  if req.status == 429
140
150
  return "API 요청 제한을 초과했습니다. 플랜 및 할당량을 확인하세요."
@@ -142,11 +152,18 @@ class Chat_title
142
152
 
143
153
  # 응답 데이터에서 안전하게 값 추출
144
154
  answer = response.dig('choices', 0, 'message', 'content')
145
- answer ||= (title) # 응답이 없을 경우 기본 메시지 설정
155
+
156
+ # 따옴표 제거
157
+ answer = answer.gsub('"', '') if answer
158
+
159
+ answer ||= title # 응답이 없을 경우 기본 메시지 설정
146
160
  rescue => e
147
161
  puts "Error: #{e.message}"
148
162
  answer = "오류가 발생했습니다."
149
163
  end
164
+
165
+ # "생성 중..." 메시지 출력 종료
166
+ thread.kill
150
167
 
151
168
  puts 'API return ==> '
152
169
  puts answer
@@ -154,14 +171,24 @@ class Chat_title
154
171
  end
155
172
  end
156
173
 
174
+
157
175
  class Chat_content
158
-
159
- def initialize(api_key)
176
+ def initialize(api_key, gpt_content_prompt)
160
177
  @api_key = api_key
178
+ @gpt_content_prompt = gpt_content_prompt
161
179
  end
162
180
 
163
181
  def message(content)
164
- puts'[GPT] 유사 내용을 생성 중입니다! 조금만 기다려주세요.......'.yellow
182
+ puts '주의:GPT 특성상 원고 길이가 공백 포함 4천자를 넘기면 오류가 발생할 수 있습니다.'
183
+ puts 'Sending request to GPT...(내용 변형 중...)'
184
+ # "키워드 기반 글 생성 중..." 메시지를 별도 스레드로 처리
185
+ thread = Thread.new do
186
+ while true
187
+ print "▶"
188
+ sleep(3)
189
+ end
190
+ end
191
+
165
192
  url = 'https://api.openai.com/v1/chat/completions'
166
193
  headers = {
167
194
  'Content-Type' => 'application/json',
@@ -175,15 +202,16 @@ class Chat_content
175
202
  },
176
203
  {
177
204
  "role" => "user",
178
- "content" => "#{content}\nChatGPT의 멘트는 빼고 위 전체적인 내용의 형식을 똑같이 표현을 더 추가하고 유사어로 변경하여 하나 만들어줘! 전화번호,연락처,가격,홈페이지안내 ,상담안내 관련 문구는 유지해야해"
205
+ "content" => "#{@gpt_content_prompt}\n#{content}"
206
+
179
207
  }]
180
208
  }
181
209
 
182
210
  begin
183
211
  req = HTTP.headers(headers).post(url, json: data)
184
- puts "HTTP Status: #{req.status}" # 상태 코드 확인
212
+
185
213
  response = JSON.parse(req.body.to_s)
186
- puts "API Response: #{response}" # 전체 응답 출력
214
+
187
215
 
188
216
  if req.status == 429
189
217
  return "API 요청 제한을 초과했습니다. 플랜 및 할당량을 확인하세요."
@@ -197,6 +225,9 @@ class Chat_content
197
225
  answer = "오류가 발생했습니다."
198
226
  end
199
227
 
228
+ # "생성 중..." 메시지 출력 종료
229
+ thread.kill
230
+
200
231
  puts 'API return ==> '
201
232
  puts answer
202
233
  answer
@@ -204,6 +235,7 @@ class Chat_content
204
235
  end
205
236
 
206
237
 
238
+
207
239
  #############################################gpt############################################
208
240
 
209
241
  class Naver
@@ -2144,77 +2176,53 @@ class Wordpress
2144
2176
  puts table[10]
2145
2177
  if table[7].to_i > table[10].to_i
2146
2178
  if @data['포스트설정']['테더링'].checked?
2147
- puts 'tethering ip change...'
2148
-
2149
- # ADB devices 확인
2179
+ puts 'Tethering IP change...'
2180
+
2150
2181
  stdout, stderr, status = Open3.capture3('./adb devices')
2151
- if status.success?
2182
+
2183
+ if status.success?
2152
2184
  device_id = stdout.split("\n")[1].split("\t")[0]
2153
2185
  puts device_id
2154
2186
 
2155
2187
  # ADB 서버 초기화
2156
2188
  puts 'adb kill-server'
2157
- Open3.capture3('adb kill-server')
2158
- sleep(2)
2189
+ Open3.capture3('./adb kill-server')
2190
+ sleep(3)
2159
2191
 
2160
2192
  # 다시 ADB 서버 실행
2161
2193
  puts 'adb start-server'
2162
- Open3.capture3('adb start-server')
2163
- sleep(2)
2194
+ Open3.capture3('./adb start-server')
2195
+ sleep(3)
2164
2196
 
2165
2197
  # 데이터를 끄고 켜기
2166
2198
  puts 'adb -s ' + device_id + ' shell svc data disable'
2167
- stdout2, stderr2, status2 = Open3.capture3('./adb -s ' + device_id + ' shell svc data disable')
2168
-
2169
- if status2.success?
2170
- sleep(3)
2171
- puts 'adb -s ' + device_id + ' shell svc data enable'
2172
- Open3.capture3('./adb -s ' + device_id + ' shell svc data enable')
2173
- sleep(3)
2174
- puts 'adb ok'
2175
- sleep(8)
2176
-
2177
- # IP 확인 및 재시도 (반복문 사용)
2178
- retry_count = 0
2179
- max_retries = 5
2180
- current_ip = nil
2181
-
2182
- # 무한 루프 방지
2183
- while retry_count < max_retries
2184
- begin
2185
- http = HTTP.get('https://www.findip.kr/')
2186
- noko = Nokogiri::HTML(http.to_s)
2187
- new_ip = noko.xpath('/html/body/header/h2').text.strip
2188
-
2189
- puts "Current IP: #{@my_ip}, New IP: #{new_ip}"
2190
-
2191
- # IP가 변경되었으면 @my_ip를 갱신하고 종료
2192
- if new_ip != @my_ip
2193
- @my_ip = new_ip
2194
- puts "IP 변경됨: #{@my_ip}"
2195
- break
2196
- else
2197
- puts 'IP가 변경되지 않음. 재시도...'
2198
- retry_count += 1
2199
- sleep(3) # 3초 후 재시도
2200
- end
2201
- rescue => e
2202
- retry_count += 1
2203
- sleep(3) # 3초 후 재시도
2204
- end
2205
-
2206
- # 최대 재시도 횟수를 초과하면 예외 발생시키기
2207
- if retry_count >= max_retries
2208
- raise "최대 재시도 횟수 초과. IP 변경 실패."
2209
- end
2199
+ stdout2, stderr2, status2 = Open3.capture3('./adb -s '+device_id+' shell svc data disable')
2200
+ sleep(3)
2201
+ puts 'adb -s ' + device_id + ' shell svc data enable'
2202
+ Open3.capture3('./adb -s '+device_id+' shell svc data enable')
2203
+ sleep(3)
2204
+ puts 'adb ok'
2205
+ sleep(8)
2206
+
2207
+ robot_ip = lambda do
2208
+ http = HTTP.get('https://www.findip.kr/')
2209
+ noko = Nokogiri::HTML(http.to_s)
2210
+ if noko.xpath('/html/body/header/h2').text != @my_ip
2211
+ @my_ip = noko.xpath('/html/body/header/h2').text
2212
+ puts "IP 변경됨[ #{@my_ip} ]"
2213
+ else
2214
+ puts @my_ip
2215
+ puts '제시도...'
2216
+ sleep(3)
2217
+ robot_ip[]
2210
2218
  end
2211
- else
2212
- puts 'Failed to disable data. Error: ' + stderr2
2213
- end
2219
+ end
2220
+ robot_ip[]
2221
+
2214
2222
  else
2215
- puts 'adb error, unable to get devices. Error: ' + stderr
2223
+ puts 'adb error pass'
2216
2224
  end
2217
- end
2225
+ end
2218
2226
 
2219
2227
 
2220
2228
  check_success = 1
@@ -2234,7 +2242,15 @@ class Wordpress
2234
2242
  end
2235
2243
 
2236
2244
  if @data['포스트설정']['gpt제목'].checked?
2237
- chat = Chat_title.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'))
2245
+ gpt_title_prompt = @data['포스트설정']['gpt제목_프롬프트'].text.to_s.force_encoding('utf-8')
2246
+
2247
+ # 공백을 포함한 빈 문자열을 체크하기 위해 strip을 사용
2248
+ gpt_title_prompt_sample = gpt_title_prompt.strip.empty? ? "프롬프트: 문장을 비슷한 길이로 ChatGPT의 멘트는 빼고 표현을 더 추가해서 하나만 만들어줘." : gpt_title_prompt
2249
+
2250
+ # gpt_title_prompt_sample을 Chat_title 객체에 전달
2251
+ chat = Chat_title.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'), gpt_title_prompt_sample)
2252
+
2253
+ # 메시지 요청 후 title에 저장
2238
2254
  gpt_text1 = chat.message(title)
2239
2255
  title = gpt_text1.to_s
2240
2256
  end
@@ -2279,18 +2295,16 @@ class Wordpress
2279
2295
 
2280
2296
 
2281
2297
  if @data['포스트설정']['gpt내용'].checked?
2298
+ gpt_content_prompt = @data['포스트설정']['gpt내용_프롬프트'].text.to_s.force_encoding('utf-8')
2282
2299
  api_key = @data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8')
2283
- #key_change = @data['포스트설정']['특정단어키워드로변경값'].text.to_s.force_encoding('utf-8')
2284
- #imotcon_change = @data['포스트설정']['스티커로변경단어'].text.to_s.force_encoding('utf-8')
2285
- #template_change = @data['포스트설정']['내템플릿변경단어'].text.to_s.force_encoding('utf-8')
2286
- #ttdanar_change = @data['포스트설정']['단어링크적용단어'].text.to_s.force_encoding('utf-8')
2287
- #sajine_change = @data['포스트설정']['단어사진으로변경단어'].text.to_s.force_encoding('utf-8')
2288
- #mov_change = @data['포스트설정']['영상으로변경단어'].text.to_s.force_encoding('utf-8')
2289
- #map_change = @data['포스트설정']['지도로변경단어'].text.to_s.force_encoding('utf-8')
2290
- #inyong9_change = @data['포스트설정']['인용구변경단어'].text.to_s.force_encoding('utf-8')
2291
-
2292
2300
 
2293
- chat = Chat_content.new(api_key)
2301
+ # 공백을 포함한 빈 문자열을 체크하기 위해 strip을 사용
2302
+ gpt_content_prompt_sample = gpt_content_prompt.strip.empty? ? "프롬프트:ChatGPT의 멘트는 빼고 위 전체적인 내용의 형식을 똑같이 표현을 더 추가하고 유사어로 변경하여 하나 만들어줘! 전화번호,연락처,가격,홈페이지안내 ,상담안내 관련 문구는 유지해야해" : gpt_content_prompt
2303
+
2304
+ # Chat_content 객체 생성 시 api_key와 gpt_content_prompt_sample을 두 개의 인자로 전달
2305
+ chat = Chat_content.new(api_key, gpt_content_prompt_sample)
2306
+
2307
+ # 메시지 요청 후 content에 저장
2294
2308
  gpt_text3 = chat.message(content)
2295
2309
  content = gpt_text3.to_s
2296
2310
  end
@@ -2494,13 +2508,17 @@ class Wordpress
2494
2508
  @data['table'] << []
2495
2509
  @data['table'].pop
2496
2510
  if @data['포스트설정']['gpt키워드'].checked?
2497
- chat = Chat.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'))
2511
+ gpt_keyword_prompt = @data['포스트설정']['gpt키워드_프롬프트'].text.to_s.force_encoding('utf-8')
2512
+ gpt_keyword_prompt_sample = gpt_keyword_prompt.strip.empty? ? "프롬프트: 관련된 글을 1500자에서 2500자 사이로 만들어줘" : gpt_keyword_prompt
2513
+ chat = Chat.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'), gpt_keyword_prompt)
2498
2514
  gpt_text = chat.message(keyword)
2499
- content = content + "\n(자동생성글)\n" + gpt_text
2515
+ #content = content.to_s + "\n(자동생성글)\n" + gpt_text.to_s
2516
+ content = content.to_s + "(자동생성글)" + gpt_text.to_s
2500
2517
  elsif @data['포스트설정']['내용을자동생성'].checked?
2501
2518
  content = auto_text
2502
2519
  elsif @data['포스트설정']['내용과자동생성'].checked?
2503
- content = content + "\n(자동생성글)\n" + auto_text
2520
+ #content = content + "\n(자동생성글)\n" + auto_text
2521
+ content = content + "(자동생성글)" + auto_text
2504
2522
  end
2505
2523
 
2506
2524
  if @data['포스트설정']['내용키워드삽입'].checked?
@@ -2535,7 +2553,8 @@ class Wordpress
2535
2553
  end
2536
2554
 
2537
2555
  if @data['포스트설정']['내용을자동생성'].checked?
2538
- content2 = content.split("\n")
2556
+ #content2 = content.split("\n")
2557
+ content2 = content.split
2539
2558
  end
2540
2559
 
2541
2560
  if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt키워드'].checked?
@@ -3657,423 +3676,439 @@ class Wordpress
3657
3676
  }
3658
3677
  }
3659
3678
  tab_item('내용설정'){
3679
+ horizontal_box{
3680
+ vertical_box{
3660
3681
  horizontal_box{
3661
- vertical_box{
3662
- horizontal_box{
3663
- stretchy false
3664
- button('키워드불러오기'){
3665
- on_clicked{
3666
- file = open_file
3667
- if file != nil
3668
- file_data = File.open(file, 'r', :encoding => 'utf-8').read()
3669
- file_data.split("\n").each do |keyword|
3670
- if keyword.split(' ').join('').length < 2
3671
-
3672
- else
3673
- @data['키워드설정']['키워드'] << [false, keyword]
3674
- @data['키워드설정']['키워드'] << [false, keyword]
3675
- @data['키워드설정']['키워드'].pop
3676
- end
3677
- end
3678
- end
3682
+ stretchy false
3683
+ button('키워드불러오기'){
3684
+ on_clicked{
3685
+ file = open_file
3686
+ if file != nil
3687
+ file_data = File.open(file, 'r', :encoding => 'utf-8').read()
3688
+ file_data.split("\n").each do |keyword|
3689
+ if keyword.split(' ').join('').length < 2
3679
3690
 
3680
- }
3681
- }
3682
-
3683
- }
3684
- horizontal_box{
3685
- stretchy false
3686
- grid{
3687
- button('전체선택'){
3688
- top 1
3689
- left 1
3690
- on_clicked{
3691
- for n in 0..@data['키워드설정']['키워드'].length-1
3692
- @data['키워드설정']['키워드'][n][0] = true
3693
- @data['키워드설정']['키워드'] << []
3694
- @data['키워드설정']['키워드'].pop
3695
- end
3696
- }
3697
- }
3698
- button('선택해제'){
3699
- top 1
3700
- left 2
3701
- on_clicked{
3702
- for n in 0..@data['키워드설정']['키워드'].length-1
3703
- @data['키워드설정']['키워드'][n][0] = false
3704
- @data['키워드설정']['키워드'] << []
3691
+ else
3692
+ @data['키워드설정']['키워드'] << [false, keyword]
3693
+ @data['키워드설정']['키워드'] << [false, keyword]
3705
3694
  @data['키워드설정']['키워드'].pop
3706
3695
  end
3707
- }
3708
- }
3709
- button('삭제하기'){
3710
- top 1
3711
- left 3
3712
- on_clicked{
3713
- m = Array.new
3714
- for n in 0..@data['키워드설정']['키워드'].length-1
3715
- if @data['키워드설정']['키워드'][n][0] == true
3716
- m << n
3717
- end
3718
- end
3696
+ end
3697
+ end
3719
3698
 
3720
- m.reverse.each do |i|
3721
- @data['키워드설정']['키워드'].delete_at(i)
3722
- end
3723
- @data['키워드설정']['키워드'].delete(nil)
3724
- }
3725
- }
3726
3699
  }
3727
-
3728
- @data['키워드설정']['순서사용'] = checkbox('순서사용'){
3729
- stretchy false
3730
- on_toggled{ |c|
3731
- if c.checked?
3732
- @data['키워드설정']['랜덤사용'].checked = false
3733
- end
3734
- }
3735
- }
3736
- @data['키워드설정']['랜덤사용'] = checkbox('랜덤사용'){
3737
- stretchy false
3738
- on_toggled{ |c|
3739
- if c.checked?
3740
- @data['키워드설정']['순서사용'].checked = false
3741
- end
3742
- }
3743
- }
3700
+ }
3701
+
3702
+ }
3703
+ horizontal_box{
3704
+ stretchy false
3705
+ grid{
3706
+ button('전체선택'){
3707
+ top 1
3708
+ left 1
3709
+ on_clicked{
3710
+ for n in 0..@data['키워드설정']['키워드'].length-1
3711
+ @data['키워드설정']['키워드'][n][0] = true
3712
+ @data['키워드설정']['키워드'] << []
3713
+ @data['키워드설정']['키워드'].pop
3714
+ end
3744
3715
  }
3745
- vertical_separator{
3746
- stretchy false
3716
+ }
3717
+ button('선택해제'){
3718
+ top 1
3719
+ left 2
3720
+ on_clicked{
3721
+ for n in 0..@data['키워드설정']['키워드'].length-1
3722
+ @data['키워드설정']['키워드'][n][0] = false
3723
+ @data['키워드설정']['키워드'] << []
3724
+ @data['키워드설정']['키워드'].pop
3725
+ end
3747
3726
  }
3748
- horizontal_box{
3749
- stretchy false
3750
- grid{
3751
- @data['포스트설정']['gpt키워드'] = checkbox('GPT 키워드 기반 글 생성'){
3752
- top 1
3753
- left 0
3754
- #enabled false # 기본적으로 비활성화
3755
- on_toggled {
3756
- if @data['포스트설정']['gpt키워드'].checked?
3757
- @data['포스트설정']['gpt상단'].enabled = true # '내용투명' 활성화
3758
- @data['포스트설정']['gpt하단'].enabled = true # '내용투명' 활성화
3759
- else
3760
- @data['포스트설정']['gpt상단'].checked = false # 체크 해제
3761
- @data['포스트설정']['gpt상단'].enabled = false # 비활성화
3762
- @data['포스트설정']['gpt하단'].checked = false # 체크 해제
3763
- @data['포스트설정']['gpt하단'].enabled = false # 비활성화
3764
- end
3765
- }
3766
-
3767
- }
3768
-
3769
- @data['포스트설정']['gpt상단'] = checkbox('원고 위에 넣기'){
3770
- top 1
3771
- left 1
3772
- enabled false # 기본적으로 비활성화
3773
- on_toggled{
3774
- if @data['포스트설정']['gpt상단'].checked?
3775
- @data['포스트설정']['gpt하단'].checked = false
3776
- end
3777
- }
3778
- }
3779
-
3780
- @data['포스트설정']['gpt하단'] = checkbox('원고 아래 넣기'){
3781
- top 1
3782
- left 2
3783
- enabled false # 기본적으로 비활성화
3784
- on_toggled{
3785
- if @data['포스트설정']['gpt하단'].checked?
3786
- @data['포스트설정']['gpt상단'].checked = false
3727
+ }
3728
+ button('삭제하기'){
3729
+ top 1
3730
+ left 3
3731
+ on_clicked{
3732
+ m = Array.new
3733
+ for n in 0..@data['키워드설정']['키워드'].length-1
3734
+ if @data['키워드설정']['키워드'][n][0] == true
3735
+ m << n
3787
3736
  end
3788
- }
3789
- }
3790
- } }
3791
- horizontal_box{
3792
- stretchy false
3793
- grid{
3794
- label('※ GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
3795
- } } }
3796
-
3797
-
3798
- table{
3799
- checkbox_column('선택'){
3800
- editable true
3801
- }
3802
- text_column('키워드'){
3803
-
3804
- }
3737
+ end
3805
3738
 
3806
- cell_rows @data['키워드설정']['키워드']
3739
+ m.reverse.each do |i|
3740
+ @data['키워드설정']['키워드'].delete_at(i)
3741
+ end
3742
+ @data['키워드설정']['키워드'].delete(nil)
3807
3743
  }
3808
-
3809
-
3810
-
3811
3744
  }
3812
- vertical_separator{
3745
+ }
3746
+
3747
+ @data['키워드설정']['순서사용'] = checkbox('순서사용'){
3813
3748
  stretchy false
3749
+ on_toggled{ |c|
3750
+ if c.checked?
3751
+ @data['키워드설정']['랜덤사용'].checked = false
3752
+ end
3753
+ }
3754
+ }
3755
+ @data['키워드설정']['랜덤사용'] = checkbox('랜덤사용'){
3756
+ stretchy false
3757
+ on_toggled{ |c|
3758
+ if c.checked?
3759
+ @data['키워드설정']['순서사용'].checked = false
3760
+ end
3761
+ }
3762
+ }
3763
+ }
3764
+ vertical_separator{
3765
+ stretchy false
3766
+ }
3767
+ horizontal_box{
3768
+ stretchy false
3769
+ grid{
3770
+ @data['포스트설정']['gpt키워드'] = checkbox('GPT 키워드 기반 글 생성'){
3771
+ top 1
3772
+ left 0
3773
+ #enabled false # 기본적으로 비활성화
3774
+ on_toggled {
3775
+ if @data['포스트설정']['gpt키워드'].checked?
3776
+ @data['포스트설정']['gpt상단'].enabled = true # '내용투명' 활성화
3777
+ @data['포스트설정']['gpt하단'].enabled = true # '내용투명' 활성화
3778
+ else
3779
+ @data['포스트설정']['gpt상단'].checked = false # 체크 해제
3780
+ @data['포스트설정']['gpt상단'].enabled = false # 비활성화
3781
+ @data['포스트설정']['gpt하단'].checked = false # 체크 해제
3782
+ @data['포스트설정']['gpt하단'].enabled = false # 비활성화
3783
+ end
3784
+ }
3785
+
3786
+ }
3787
+
3788
+ @data['포스트설정']['gpt상단'] = checkbox('원고 위에 넣기'){
3789
+ top 1
3790
+ left 1
3791
+ enabled false # 기본적으로 비활성화
3792
+ on_toggled{
3793
+ if @data['포스트설정']['gpt상단'].checked?
3794
+ @data['포스트설정']['gpt하단'].checked = false
3795
+ end
3796
+ }
3814
3797
  }
3815
- vertical_box{
3816
- horizontal_box{
3817
- stretchy false
3818
- button('제목불러오기'){
3819
- on_clicked{
3820
- file = open_file
3821
- if file != nil
3822
- file_data = File.open(file, 'r', :encoding => 'utf-8').read()
3823
- file_data.split("\n").each do |title|
3824
- if title.split(" ").join('').length < 2
3825
-
3826
- else
3827
- @data['제목설정']['제목'] << [false, title]
3828
- @data['제목설정']['제목'] << [false, title]
3829
- @data['제목설정']['제목'].pop
3830
- end
3831
- end
3832
- end
3833
- }
3834
- }
3835
3798
 
3799
+ @data['포스트설정']['gpt하단'] = checkbox('원고 아래 넣기'){
3800
+ top 1
3801
+ left 2
3802
+ enabled false # 기본적으로 비활성화
3803
+ on_toggled{
3804
+ if @data['포스트설정']['gpt하단'].checked?
3805
+ @data['포스트설정']['gpt상단'].checked = false
3806
+ end
3836
3807
  }
3837
- horizontal_box{
3838
- stretchy false
3839
- grid{
3840
- button('전체선택'){
3841
- top 1
3842
- left 1
3843
- on_clicked{
3844
- for n in 0..@data['제목설정']['제목'].length-1
3845
- @data['제목설정']['제목'][n][0] = true
3846
- @data['제목설정']['제목'] << []
3847
- @data['제목설정']['제목'].pop
3848
- end
3849
- }
3850
- }
3851
- button('선택해제'){
3852
- top 1
3853
- left 2
3854
- on_clicked{
3855
- for n in 0..@data['제목설정']['제목'].length-1
3856
- @data['제목설정']['제목'][n][0] = false
3857
- @data['제목설정']['제목'] << []
3808
+ }
3809
+ } }
3810
+ horizontal_box{
3811
+ stretchy false
3812
+ @data['포스트설정']['gpt키워드_프롬프트'] = entry(){
3813
+ text '프롬프트:관련 글을 1500자에서 2500자 사이로 만들어줘'
3814
+ }}
3815
+ horizontal_box{
3816
+ stretchy false
3817
+ grid{
3818
+ label('※ GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
3819
+ } } }
3820
+
3821
+
3822
+ table{
3823
+ checkbox_column('선택'){
3824
+ editable true
3825
+ }
3826
+ text_column('키워드'){
3827
+
3828
+ }
3829
+
3830
+ cell_rows @data['키워드설정']['키워드']
3831
+ }
3832
+
3833
+
3834
+
3835
+ }
3836
+ vertical_separator{
3837
+ stretchy false
3838
+ }
3839
+ vertical_box{
3840
+ horizontal_box{
3841
+ stretchy false
3842
+ button('제목불러오기'){
3843
+ on_clicked{
3844
+ file = open_file
3845
+ if file != nil
3846
+ file_data = File.open(file, 'r', :encoding => 'utf-8').read()
3847
+ file_data.split("\n").each do |title|
3848
+ if title.split(" ").join('').length < 2
3849
+
3850
+ else
3851
+ @data['제목설정']['제목'] << [false, title]
3852
+ @data['제목설정']['제목'] << [false, title]
3858
3853
  @data['제목설정']['제목'].pop
3859
3854
  end
3860
- }
3861
- }
3862
- button('삭제하기'){
3863
- top 1
3864
- left 3
3865
- on_clicked{
3866
- m = Array.new
3867
- for n in 0..@data['제목설정']['제목'].length-1
3868
- if @data['제목설정']['제목'][n][0] == true
3869
- m << n
3870
- end
3871
- end
3855
+ end
3856
+ end
3857
+ }
3858
+ }
3872
3859
 
3873
- m.reverse.each do |i|
3874
- @data['제목설정']['제목'].delete_at(i)
3875
- end
3876
- @data['제목설정']['제목'].delete(nil)
3877
- }
3878
- }
3860
+ }
3861
+ horizontal_box{
3862
+ stretchy false
3863
+ grid{
3864
+ button('전체선택'){
3865
+ top 1
3866
+ left 1
3867
+ on_clicked{
3868
+ for n in 0..@data['제목설정']['제목'].length-1
3869
+ @data['제목설정']['제목'][n][0] = true
3870
+ @data['제목설정']['제목'] << []
3871
+ @data['제목설정']['제목'].pop
3872
+ end
3879
3873
  }
3880
- @data['제목설정']['순서사용'] = checkbox('순서사용'){
3881
- stretchy false
3882
- on_toggled{ |c|
3883
- if c.checked?
3884
- @data['제목설정']['랜덤사용'].checked = false
3885
- end
3886
- }
3887
- }
3888
- @data['제목설정']['랜덤사용'] = checkbox('랜덤사용'){
3889
- stretchy false
3890
- on_toggled{ |c|
3891
- if c.checked?
3892
- @data['제목설정']['순서사용'].checked = false
3893
- end
3894
- }
3895
- }
3874
+ }
3875
+ button('선택해제'){
3876
+ top 1
3877
+ left 2
3878
+ on_clicked{
3879
+ for n in 0..@data['제목설정']['제목'].length-1
3880
+ @data['제목설정']['제목'][n][0] = false
3881
+ @data['제목설정']['제목'] << []
3882
+ @data['제목설정']['제목'].pop
3883
+ end
3896
3884
  }
3897
- vertical_separator{
3898
- stretchy false
3885
+ }
3886
+ button('삭제하기'){
3887
+ top 1
3888
+ left 3
3889
+ on_clicked{
3890
+ m = Array.new
3891
+ for n in 0..@data['제목설정']['제목'].length-1
3892
+ if @data['제목설정']['제목'][n][0] == true
3893
+ m << n
3894
+ end
3895
+ end
3896
+
3897
+ m.reverse.each do |i|
3898
+ @data['제목설정']['제목'].delete_at(i)
3899
+ end
3900
+ @data['제목설정']['제목'].delete(nil)
3899
3901
  }
3900
- horizontal_box{
3901
- stretchy false
3902
- grid{
3903
- @data['포스트설정']['gpt제목'] = checkbox('제목을 이용해 GPT로 비슷한 제목 생성'){
3904
-
3905
-
3906
- }}}
3907
- horizontal_box{
3908
- stretchy false
3909
- grid{
3910
- label(' GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
3911
- } } }
3912
-
3902
+ }
3903
+ }
3904
+ @data['제목설정']['순서사용'] = checkbox('순서사용'){
3905
+ stretchy false
3906
+ on_toggled{ |c|
3907
+ if c.checked?
3908
+ @data['제목설정']['랜덤사용'].checked = false
3909
+ end
3910
+ }
3911
+ }
3912
+ @data['제목설정']['랜덤사용'] = checkbox('랜덤사용'){
3913
+ stretchy false
3914
+ on_toggled{ |c|
3915
+ if c.checked?
3916
+ @data['제목설정']['순서사용'].checked = false
3917
+ end
3918
+ }
3919
+ }
3920
+ }
3921
+ vertical_separator{
3922
+ stretchy false
3923
+ }
3924
+ horizontal_box{
3925
+ stretchy false
3926
+ grid{
3927
+ @data['포스트설정']['gpt제목'] = checkbox('제목을 이용해 GPT로 비슷한 제목 생성'){
3928
+
3929
+
3930
+ }}}
3931
+ horizontal_box{
3932
+ stretchy false
3933
+ @data['포스트설정']['gpt제목_프롬프트'] = entry(){
3934
+ text '프롬프트:비슷한 길이로 제목으로 사용할수있게 하나만 만들어줘'
3935
+ }}
3936
+ horizontal_box{
3937
+ stretchy false
3938
+ grid{
3939
+ label('※ GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
3940
+ } } }
3941
+
3913
3942
 
3914
- table{
3915
- checkbox_column('선택'){
3916
- editable true
3917
- }
3918
- text_column('제목'){
3943
+ table{
3944
+ checkbox_column('선택'){
3945
+ editable true
3946
+ }
3947
+ text_column('제목'){
3919
3948
 
3920
- }
3949
+ }
3921
3950
 
3922
- cell_rows @data['제목설정']['제목']
3923
- }
3924
-
3951
+ cell_rows @data['제목설정']['제목']
3952
+ }
3953
+
3925
3954
 
3955
+ }
3956
+ vertical_separator{
3957
+ stretchy false
3958
+ }
3959
+ vertical_box{
3960
+ horizontal_box{
3961
+ stretchy false
3962
+ button('내용불러오기'){
3963
+ on_clicked{
3964
+ file = open_file
3965
+ if file != nil
3966
+ file_name = file.split("\\")[-1]
3967
+ file_data = File.open(file,'r', :encoding => 'utf-8').read()
3968
+ if file_data.split("\n").length < 2
3969
+ file_data = file_data + "\n"
3970
+ end
3971
+ @data['내용설정']['내용'] << [false, file_name, file_data]
3972
+ @data['내용설정']['내용'] << [false, file_name, file_data]
3973
+ @data['내용설정']['내용'].pop
3974
+ end
3975
+ }
3926
3976
  }
3927
- vertical_separator{
3928
- stretchy false
3929
- }
3930
- vertical_box{
3931
- horizontal_box{
3932
- stretchy false
3933
- button('내용불러오기'){
3934
- on_clicked{
3935
- file = open_file
3936
- if file != nil
3937
- file_name = file.split("\\")[-1]
3938
- file_data = File.open(file,'r', :encoding => 'utf-8').read()
3939
- if file_data.split("\n").length < 2
3940
- file_data = file_data + "\n"
3941
- end
3942
- @data['내용설정']['내용'] << [false, file_name, file_data]
3943
- @data['내용설정']['내용'] << [false, file_name, file_data]
3944
- @data['내용설정']['내용'].pop
3945
- end
3946
- }
3947
- }
3948
3977
 
3978
+ }
3979
+ horizontal_box{
3980
+ stretchy false
3981
+ grid{
3982
+ button('전체선택'){
3983
+ top 1
3984
+ left 1
3985
+ on_clicked{
3986
+ for n in 0..@data['내용설정']['내용'].length-1
3987
+ @data['내용설정']['내용'][n][0] = true
3988
+ @data['내용설정']['내용'] << []
3989
+ @data['내용설정']['내용'].pop
3990
+ end
3949
3991
  }
3950
- horizontal_box{
3951
- stretchy false
3952
- grid{
3953
- button('전체선택'){
3954
- top 1
3955
- left 1
3956
- on_clicked{
3957
- for n in 0..@data['내용설정']['내용'].length-1
3958
- @data['내용설정']['내용'][n][0] = true
3959
- @data['내용설정']['내용'] << []
3960
- @data['내용설정']['내용'].pop
3961
- end
3962
- }
3963
- }
3964
- button('선택해제'){
3965
- top 1
3966
- left 2
3967
- on_clicked{
3968
- for n in 0..@data['내용설정']['내용'].length-1
3969
- @data['내용설정']['내용'][n][0] = false
3970
- @data['내용설정']['내용'] << []
3971
- @data['내용설정']['내용'].pop
3972
- end
3973
- }
3974
- }
3975
- button('삭제하기'){
3976
- top 1
3977
- left 3
3978
- on_clicked{
3979
- m = Array.new
3980
- for n in 0..@data['내용설정']['내용'].length-1
3981
- if @data['내용설정']['내용'][n][0] == true
3982
- m << n
3983
- end
3984
- end
3992
+ }
3993
+ button('선택해제'){
3994
+ top 1
3995
+ left 2
3996
+ on_clicked{
3997
+ for n in 0..@data['내용설정']['내용'].length-1
3998
+ @data['내용설정']['내용'][n][0] = false
3999
+ @data['내용설정']['내용'] << []
4000
+ @data['내용설정']['내용'].pop
4001
+ end
4002
+ }
4003
+ }
4004
+ button('삭제하기'){
4005
+ top 1
4006
+ left 3
4007
+ on_clicked{
4008
+ m = Array.new
4009
+ for n in 0..@data['내용설정']['내용'].length-1
4010
+ if @data['내용설정']['내용'][n][0] == true
4011
+ m << n
4012
+ end
4013
+ end
3985
4014
 
3986
- m.reverse.each do |i|
3987
- @data['내용설정']['내용'].delete_at(i)
3988
- end
3989
- @data['내용설정']['내용'].delete(nil)
3990
- }
3991
- }
4015
+ m.reverse.each do |i|
4016
+ @data['내용설정']['내용'].delete_at(i)
4017
+ end
4018
+ @data['내용설정']['내용'].delete(nil)
3992
4019
  }
3993
- @data['내용설정']['순서사용'] = checkbox('순서사용'){
3994
- stretchy false
3995
- on_toggled{ |c|
3996
- if c.checked?
3997
- @data['내용설정']['랜덤사용'].checked = false
3998
- end
3999
- }
4000
- }
4001
- @data['내용설정']['랜덤사용'] = checkbox('랜덤사용'){
4002
- stretchy false
4003
- on_toggled{ |c|
4004
- if c.checked?
4005
- @data['내용설정']['순서사용'].checked = false
4006
- end
4007
- }
4008
- }
4020
+ }
4021
+ }
4022
+ @data['내용설정']['순서사용'] = checkbox('순서사용'){
4023
+ stretchy false
4024
+ on_toggled{ |c|
4025
+ if c.checked?
4026
+ @data['내용설정']['랜덤사용'].checked = false
4027
+ end
4009
4028
  }
4010
- vertical_separator{
4011
- stretchy false
4029
+ }
4030
+ @data['내용설정']['랜덤사용'] = checkbox('랜덤사용'){
4031
+ stretchy false
4032
+ on_toggled{ |c|
4033
+ if c.checked?
4034
+ @data['내용설정']['순서사용'].checked = false
4035
+ end
4012
4036
  }
4013
- horizontal_box{
4014
- stretchy false
4015
- grid{
4016
- @data['포스트설정']['gpt내용'] = checkbox('내용파일을 이용해 GPT로 글 변형'){
4017
-
4018
-
4019
- }}}
4020
- horizontal_box{
4021
- stretchy false
4022
- grid{
4023
- label('※ GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
4024
- } } }
4025
-
4026
- table{
4027
- checkbox_column('선택'){
4028
- editable true
4029
- }
4030
- text_column('내용파일'){
4037
+ }
4038
+ }
4039
+ vertical_separator{
4040
+ stretchy false
4041
+ }
4042
+ horizontal_box{
4043
+ stretchy false
4044
+ grid{
4045
+ @data['포스트설정']['gpt내용'] = checkbox('내용파일을 이용해 GPT로 글 변형'){
4046
+
4047
+
4048
+ }}}
4049
+ horizontal_box{
4050
+ stretchy false
4051
+ @data['포스트설정']['gpt내용_프롬프트'] = entry(){
4052
+ text '프롬프트:동의어,유사어를 이용해 변경해줘'
4053
+ }}
4054
+ horizontal_box{
4055
+ stretchy false
4056
+ grid{
4057
+ label('※ GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
4058
+ } } }
4059
+
4060
+ table{
4061
+ checkbox_column('선택'){
4062
+ editable true
4063
+ }
4064
+ text_column('내용파일'){
4031
4065
 
4032
- }
4066
+ }
4033
4067
 
4034
- cell_rows @data['내용설정']['내용']
4035
- }
4068
+ cell_rows @data['내용설정']['내용']
4069
+ }
4036
4070
 
4037
- horizontal_box{
4038
- stretchy false
4039
- @data['이미지설정']['폴더경로2'] = entry{
4040
- stretchy false
4041
- text "내용폴더경로 ex)C:\\내용\\폴더1"
4042
- }
4043
- button('폴더째로 불러오기') {
4044
- on_clicked {
4045
- path = @data['이미지설정']['폴더경로2'].text.to_s.force_encoding('utf-8')
4071
+ horizontal_box{
4072
+ stretchy false
4073
+ @data['이미지설정']['폴더경로2'] = entry{
4074
+ stretchy false
4075
+ text "내용폴더경로 ex)C:\\내용\\폴더1"
4076
+ }
4046
4077
 
4047
- # 경로가 유효한지 확인
4048
- if Dir.exist?(path)
4049
- Dir.entries(path).each do |file|
4050
- if file == '.' or file == '..'
4051
- next
4052
- else
4053
- begin
4054
- # 파일을 열고 내용을 읽어서 추가
4055
- file_data = File.open(path + '/' + file, 'r', encoding: 'utf-8').read
4056
- @data['내용설정']['내용'] << [false, file, file_data]
4057
- rescue => e
4058
- # 파일을 열 수 없는 경우, 오류 메시지 출력
4059
- puts "파일을 열 수 없습니다: #{file}, 오류: #{e.message}"
4060
- end
4061
- end
4062
- end
4078
+ button('폴더째로 불러오기') {
4079
+ on_clicked {
4080
+ path = @data['이미지설정']['폴더경로2'].text.to_s.force_encoding('utf-8')
4063
4081
 
4064
- # 내용 배열에서 마지막 빈 항목 제거
4065
- @data['내용설정']['내용'] << []
4066
- @data['내용설정']['내용'].pop
4082
+ # 경로가 유효한지 확인
4083
+ if Dir.exist?(path)
4084
+ Dir.entries(path).each do |file|
4085
+ if file == '.' or file == '..'
4086
+ next
4067
4087
  else
4068
- # 경로가 유효하지 않을 경우, 오류 메시지 출력
4069
- puts "경로가 존재하지 않습니다: #{path}"
4088
+ begin
4089
+ # 파일을 열고 내용을 읽어서 추가
4090
+ file_data = File.open(path + '/' + file, 'r', encoding: 'utf-8').read
4091
+ @data['내용설정']['내용'] << [false, file, file_data]
4092
+ rescue => e
4093
+ # 파일을 열 수 없는 경우, 오류 메시지 출력
4094
+ puts "파일을 열 수 없습니다: #{file}, 오류: #{e.message}"
4095
+ end
4070
4096
  end
4071
- }
4072
- }
4097
+ end
4098
+
4099
+ # 내용 배열에서 마지막 빈 항목 제거
4100
+ @data['내용설정']['내용'] << []
4101
+ @data['내용설정']['내용'].pop
4102
+ else
4103
+ # 경로가 유효하지 않을 경우, 오류 메시지 출력
4104
+ puts "경로가 존재하지 않습니다: #{path}"
4105
+ end
4073
4106
  }
4074
4107
  }
4075
4108
  }
4076
4109
  }
4110
+ }
4111
+ }
4077
4112
  tab_item('이미지설정'){
4078
4113
  horizontal_box{
4079
4114
  vertical_box{
@@ -4549,7 +4584,7 @@ class Wordpress
4549
4584
  left 1
4550
4585
  text 'URL'
4551
4586
  }
4552
- @data['포스트설정']['내용을자동생성'] = checkbox('키워드기반 생성으로만 등록(GPT사용시 자체 생성)'){
4587
+ @data['포스트설정']['내용을자동생성'] = checkbox('키워드기반 글만 등록(GPT사용시 체크 해제)'){
4553
4588
  top 9
4554
4589
  left 0
4555
4590
  on_toggled{
@@ -4557,31 +4592,46 @@ class Wordpress
4557
4592
  @data['포스트설정']['내용과자동생성'].checked = false
4558
4593
  @data['포스트설정']['내용투명'].checked = false
4559
4594
  @data['포스트설정']['자동글 수식에 입력'].checked = false
4560
-
4595
+
4561
4596
  end
4562
4597
  }
4563
4598
  }
4564
-
4565
-
4599
+ label('※GPT사용시 내용설정 탭에서 설정'){
4600
+ top 9
4601
+ left 1
4602
+ }
4603
+
4604
+ label('※GPT 미 사용시 세팅 권장'){
4605
+ top 9
4606
+ left 3
4607
+ }
4608
+
4566
4609
 
4567
-
4568
4610
  aa1 = 2
4569
- @data['포스트설정']['내용과자동생성'] = checkbox('내용파일+키워드기반 생성 등록(GPT사용시 자체 생성)') {
4611
+ @data['포스트설정']['내용과자동생성'] = checkbox('원고+키워드기반 등록(GPT사용시 체크 해제)') {
4570
4612
  top 10 + aa1
4571
4613
  left 0
4572
4614
  on_toggled {
4573
- if @data['포스트설정']['내용과자동생성'].checked?
4615
+ if @data['포스트설정']['내용과자동생성'].checked?
4574
4616
  @data['포스트설정']['내용을자동생성'].checked = false
4575
4617
  @data['포스트설정']['내용투명'].enabled = true # '내용투명' 활성화
4576
4618
  @data['포스트설정']['자동글 수식에 입력'].enabled = true # '내용투명' 활성화
4577
- else
4619
+ else
4578
4620
  @data['포스트설정']['내용투명'].checked = false # 체크 해제
4579
4621
  @data['포스트설정']['내용투명'].enabled = false # 비활성화
4580
4622
  @data['포스트설정']['자동글 수식에 입력'].checked = false # 체크 해제
4581
4623
  @data['포스트설정']['자동글 수식에 입력'].enabled = false # 비활성화
4582
- end
4624
+ end
4583
4625
  }
4584
- }
4626
+ }
4627
+ label('※GPT사용시 내용설정 탭에서 설정'){
4628
+ top 10 + aa1
4629
+ left 1
4630
+ }
4631
+ label('※GPT 미 사용시 세팅 권장'){
4632
+ top 10 + aa1
4633
+ left 3
4634
+ }
4585
4635
 
4586
4636
  @data['포스트설정']['내용투명'] = checkbox('키워드 기반 자동 생성글 안보이게 처리') {
4587
4637
  top 11 + aa1