cafe_basics_duo 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_duo.rb +576 -526
  3. metadata +2 -2
@@ -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
@@ -2213,77 +2245,53 @@ class Wordpress
2213
2245
  puts table[10]
2214
2246
  if table[7].to_i > table[10].to_i
2215
2247
  if @data['포스트설정']['테더링'].checked?
2216
- puts 'tethering ip change...'
2217
-
2218
- # ADB devices 확인
2248
+ puts 'Tethering IP change...'
2249
+
2219
2250
  stdout, stderr, status = Open3.capture3('./adb devices')
2220
- if status.success?
2251
+
2252
+ if status.success?
2221
2253
  device_id = stdout.split("\n")[1].split("\t")[0]
2222
2254
  puts device_id
2223
2255
 
2224
2256
  # ADB 서버 초기화
2225
2257
  puts 'adb kill-server'
2226
- Open3.capture3('adb kill-server')
2227
- sleep(2)
2258
+ Open3.capture3('./adb kill-server')
2259
+ sleep(3)
2228
2260
 
2229
2261
  # 다시 ADB 서버 실행
2230
2262
  puts 'adb start-server'
2231
- Open3.capture3('adb start-server')
2232
- sleep(2)
2263
+ Open3.capture3('./adb start-server')
2264
+ sleep(3)
2233
2265
 
2234
2266
  # 데이터를 끄고 켜기
2235
2267
  puts 'adb -s ' + device_id + ' shell svc data disable'
2236
- stdout2, stderr2, status2 = Open3.capture3('./adb -s ' + device_id + ' shell svc data disable')
2237
-
2238
- if status2.success?
2239
- sleep(3)
2240
- puts 'adb -s ' + device_id + ' shell svc data enable'
2241
- Open3.capture3('./adb -s ' + device_id + ' shell svc data enable')
2242
- sleep(3)
2243
- puts 'adb ok'
2244
- sleep(8)
2245
-
2246
- # IP 확인 및 재시도 (반복문 사용)
2247
- retry_count = 0
2248
- max_retries = 5
2249
- current_ip = nil
2250
-
2251
- # 무한 루프 방지
2252
- while retry_count < max_retries
2253
- begin
2254
- http = HTTP.get('https://www.findip.kr/')
2255
- noko = Nokogiri::HTML(http.to_s)
2256
- new_ip = noko.xpath('/html/body/header/h2').text.strip
2257
-
2258
- puts "Current IP: #{@my_ip}, New IP: #{new_ip}"
2259
-
2260
- # IP가 변경되었으면 @my_ip를 갱신하고 종료
2261
- if new_ip != @my_ip
2262
- @my_ip = new_ip
2263
- puts "IP 변경됨: #{@my_ip}"
2264
- break
2265
- else
2266
- puts 'IP가 변경되지 않음. 재시도...'
2267
- retry_count += 1
2268
- sleep(3) # 3초 후 재시도
2269
- end
2270
- rescue => e
2271
- retry_count += 1
2272
- sleep(3) # 3초 후 재시도
2273
- end
2274
-
2275
- # 최대 재시도 횟수를 초과하면 예외 발생시키기
2276
- if retry_count >= max_retries
2277
- raise "최대 재시도 횟수 초과. IP 변경 실패."
2278
- end
2268
+ stdout2, stderr2, status2 = Open3.capture3('./adb -s '+device_id+' shell svc data disable')
2269
+ sleep(3)
2270
+ puts 'adb -s ' + device_id + ' shell svc data enable'
2271
+ Open3.capture3('./adb -s '+device_id+' shell svc data enable')
2272
+ sleep(3)
2273
+ puts 'adb ok'
2274
+ sleep(8)
2275
+
2276
+ robot_ip = lambda do
2277
+ http = HTTP.get('https://www.findip.kr/')
2278
+ noko = Nokogiri::HTML(http.to_s)
2279
+ if noko.xpath('/html/body/header/h2').text != @my_ip
2280
+ @my_ip = noko.xpath('/html/body/header/h2').text
2281
+ puts "IP 변경됨[ #{@my_ip} ]"
2282
+ else
2283
+ puts @my_ip
2284
+ puts '제시도...'
2285
+ sleep(3)
2286
+ robot_ip[]
2279
2287
  end
2280
- else
2281
- puts 'Failed to disable data. Error: ' + stderr2
2282
- end
2288
+ end
2289
+ robot_ip[]
2290
+
2283
2291
  else
2284
- puts 'adb error, unable to get devices. Error: ' + stderr
2292
+ puts 'adb error pass'
2285
2293
  end
2286
- end
2294
+ end
2287
2295
 
2288
2296
 
2289
2297
  check_success = 1
@@ -2303,7 +2311,15 @@ class Wordpress
2303
2311
  end
2304
2312
 
2305
2313
  if @data['포스트설정']['gpt제목'].checked?
2306
- chat = Chat_title.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'))
2314
+ gpt_title_prompt = @data['포스트설정']['gpt제목_프롬프트'].text.to_s.force_encoding('utf-8')
2315
+
2316
+ # 공백을 포함한 빈 문자열을 체크하기 위해 strip을 사용
2317
+ gpt_title_prompt_sample = gpt_title_prompt.strip.empty? ? "프롬프트: 문장을 비슷한 길이로 ChatGPT의 멘트는 빼고 표현을 더 추가해서 하나만 만들어줘." : gpt_title_prompt
2318
+
2319
+ # gpt_title_prompt_sample을 Chat_title 객체에 전달
2320
+ chat = Chat_title.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'), gpt_title_prompt_sample)
2321
+
2322
+ # 메시지 요청 후 title에 저장
2307
2323
  gpt_text1 = chat.message(title)
2308
2324
  title = gpt_text1.to_s
2309
2325
  end
@@ -2348,18 +2364,16 @@ class Wordpress
2348
2364
 
2349
2365
 
2350
2366
  if @data['포스트설정']['gpt내용'].checked?
2367
+ gpt_content_prompt = @data['포스트설정']['gpt내용_프롬프트'].text.to_s.force_encoding('utf-8')
2351
2368
  api_key = @data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8')
2352
- #key_change = @data['포스트설정']['특정단어키워드로변경값'].text.to_s.force_encoding('utf-8')
2353
- #imotcon_change = @data['포스트설정']['스티커로변경단어'].text.to_s.force_encoding('utf-8')
2354
- #template_change = @data['포스트설정']['내템플릿변경단어'].text.to_s.force_encoding('utf-8')
2355
- #ttdanar_change = @data['포스트설정']['단어링크적용단어'].text.to_s.force_encoding('utf-8')
2356
- #sajine_change = @data['포스트설정']['단어사진으로변경단어'].text.to_s.force_encoding('utf-8')
2357
- #mov_change = @data['포스트설정']['영상으로변경단어'].text.to_s.force_encoding('utf-8')
2358
- #map_change = @data['포스트설정']['지도로변경단어'].text.to_s.force_encoding('utf-8')
2359
- #inyong9_change = @data['포스트설정']['인용구변경단어'].text.to_s.force_encoding('utf-8')
2360
-
2361
2369
 
2362
- chat = Chat_content.new(api_key)
2370
+ # 공백을 포함한 빈 문자열을 체크하기 위해 strip을 사용
2371
+ gpt_content_prompt_sample = gpt_content_prompt.strip.empty? ? "프롬프트:ChatGPT의 멘트는 빼고 위 전체적인 내용의 형식을 똑같이 표현을 더 추가하고 유사어로 변경하여 하나 만들어줘! 전화번호,연락처,가격,홈페이지안내 ,상담안내 관련 문구는 유지해야해" : gpt_content_prompt
2372
+
2373
+ # Chat_content 객체 생성 시 api_key와 gpt_content_prompt_sample을 두 개의 인자로 전달
2374
+ chat = Chat_content.new(api_key, gpt_content_prompt_sample)
2375
+
2376
+ # 메시지 요청 후 content에 저장
2363
2377
  gpt_text3 = chat.message(content)
2364
2378
  content = gpt_text3.to_s
2365
2379
  end
@@ -2563,13 +2577,17 @@ class Wordpress
2563
2577
  @data['table'] << []
2564
2578
  @data['table'].pop
2565
2579
  if @data['포스트설정']['gpt키워드'].checked?
2566
- chat = Chat.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'))
2580
+ gpt_keyword_prompt = @data['포스트설정']['gpt키워드_프롬프트'].text.to_s.force_encoding('utf-8')
2581
+ gpt_keyword_prompt_sample = gpt_keyword_prompt.strip.empty? ? "프롬프트: 관련된 글을 1500자에서 2500자 사이로 만들어줘" : gpt_keyword_prompt
2582
+ chat = Chat.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'), gpt_keyword_prompt)
2567
2583
  gpt_text = chat.message(keyword)
2568
- content = content + "\n(자동생성글)\n" + gpt_text
2584
+ #content = content.to_s + "\n(자동생성글)\n" + gpt_text.to_s
2585
+ content = content.to_s + "(자동생성글)" + gpt_text.to_s
2569
2586
  elsif @data['포스트설정']['내용을자동생성'].checked?
2570
2587
  content = auto_text
2571
2588
  elsif @data['포스트설정']['내용과자동생성'].checked?
2572
- content = content + "\n(자동생성글)\n" + auto_text
2589
+ #content = content + "\n(자동생성글)\n" + auto_text
2590
+ content = content + "(자동생성글)" + auto_text
2573
2591
  end
2574
2592
 
2575
2593
  if @data['포스트설정']['내용키워드삽입'].checked?
@@ -2604,7 +2622,8 @@ class Wordpress
2604
2622
  end
2605
2623
 
2606
2624
  if @data['포스트설정']['내용을자동생성'].checked?
2607
- content2 = content.split("\n")
2625
+ #content2 = content.split("\n")
2626
+ content2 = content.split
2608
2627
  end
2609
2628
 
2610
2629
  if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt키워드'].checked?
@@ -3732,423 +3751,439 @@ class Wordpress
3732
3751
  }
3733
3752
  }
3734
3753
  tab_item('내용설정'){
3754
+ horizontal_box{
3755
+ vertical_box{
3735
3756
  horizontal_box{
3736
- vertical_box{
3737
- horizontal_box{
3738
- stretchy false
3739
- button('키워드불러오기'){
3740
- on_clicked{
3741
- file = open_file
3742
- if file != nil
3743
- file_data = File.open(file, 'r', :encoding => 'utf-8').read()
3744
- file_data.split("\n").each do |keyword|
3745
- if keyword.split(' ').join('').length < 2
3746
-
3747
- else
3748
- @data['키워드설정']['키워드'] << [false, keyword]
3749
- @data['키워드설정']['키워드'] << [false, keyword]
3750
- @data['키워드설정']['키워드'].pop
3751
- end
3752
- end
3753
- end
3757
+ stretchy false
3758
+ button('키워드불러오기'){
3759
+ on_clicked{
3760
+ file = open_file
3761
+ if file != nil
3762
+ file_data = File.open(file, 'r', :encoding => 'utf-8').read()
3763
+ file_data.split("\n").each do |keyword|
3764
+ if keyword.split(' ').join('').length < 2
3754
3765
 
3755
- }
3756
- }
3757
-
3758
- }
3759
- horizontal_box{
3760
- stretchy false
3761
- grid{
3762
- button('전체선택'){
3763
- top 1
3764
- left 1
3765
- on_clicked{
3766
- for n in 0..@data['키워드설정']['키워드'].length-1
3767
- @data['키워드설정']['키워드'][n][0] = true
3768
- @data['키워드설정']['키워드'] << []
3769
- @data['키워드설정']['키워드'].pop
3770
- end
3771
- }
3772
- }
3773
- button('선택해제'){
3774
- top 1
3775
- left 2
3776
- on_clicked{
3777
- for n in 0..@data['키워드설정']['키워드'].length-1
3778
- @data['키워드설정']['키워드'][n][0] = false
3779
- @data['키워드설정']['키워드'] << []
3766
+ else
3767
+ @data['키워드설정']['키워드'] << [false, keyword]
3768
+ @data['키워드설정']['키워드'] << [false, keyword]
3780
3769
  @data['키워드설정']['키워드'].pop
3781
3770
  end
3782
- }
3783
- }
3784
- button('삭제하기'){
3785
- top 1
3786
- left 3
3787
- on_clicked{
3788
- m = Array.new
3789
- for n in 0..@data['키워드설정']['키워드'].length-1
3790
- if @data['키워드설정']['키워드'][n][0] == true
3791
- m << n
3792
- end
3793
- end
3771
+ end
3772
+ end
3794
3773
 
3795
- m.reverse.each do |i|
3796
- @data['키워드설정']['키워드'].delete_at(i)
3797
- end
3798
- @data['키워드설정']['키워드'].delete(nil)
3799
- }
3800
- }
3801
3774
  }
3802
-
3803
- @data['키워드설정']['순서사용'] = checkbox('순서사용'){
3804
- stretchy false
3805
- on_toggled{ |c|
3806
- if c.checked?
3807
- @data['키워드설정']['랜덤사용'].checked = false
3808
- end
3809
- }
3810
- }
3811
- @data['키워드설정']['랜덤사용'] = checkbox('랜덤사용'){
3812
- stretchy false
3813
- on_toggled{ |c|
3814
- if c.checked?
3815
- @data['키워드설정']['순서사용'].checked = false
3816
- end
3817
- }
3818
- }
3775
+ }
3776
+
3777
+ }
3778
+ horizontal_box{
3779
+ stretchy false
3780
+ grid{
3781
+ button('전체선택'){
3782
+ top 1
3783
+ left 1
3784
+ on_clicked{
3785
+ for n in 0..@data['키워드설정']['키워드'].length-1
3786
+ @data['키워드설정']['키워드'][n][0] = true
3787
+ @data['키워드설정']['키워드'] << []
3788
+ @data['키워드설정']['키워드'].pop
3789
+ end
3819
3790
  }
3820
- vertical_separator{
3821
- stretchy false
3791
+ }
3792
+ button('선택해제'){
3793
+ top 1
3794
+ left 2
3795
+ on_clicked{
3796
+ for n in 0..@data['키워드설정']['키워드'].length-1
3797
+ @data['키워드설정']['키워드'][n][0] = false
3798
+ @data['키워드설정']['키워드'] << []
3799
+ @data['키워드설정']['키워드'].pop
3800
+ end
3822
3801
  }
3823
- horizontal_box{
3824
- stretchy false
3825
- grid{
3826
- @data['포스트설정']['gpt키워드'] = checkbox('GPT 키워드 기반 글 생성'){
3827
- top 1
3828
- left 0
3829
- #enabled false # 기본적으로 비활성화
3830
- on_toggled {
3831
- if @data['포스트설정']['gpt키워드'].checked?
3832
- @data['포스트설정']['gpt상단'].enabled = true # '내용투명' 활성화
3833
- @data['포스트설정']['gpt하단'].enabled = true # '내용투명' 활성화
3834
- else
3835
- @data['포스트설정']['gpt상단'].checked = false # 체크 해제
3836
- @data['포스트설정']['gpt상단'].enabled = false # 비활성화
3837
- @data['포스트설정']['gpt하단'].checked = false # 체크 해제
3838
- @data['포스트설정']['gpt하단'].enabled = false # 비활성화
3839
- end
3840
- }
3841
-
3842
- }
3843
-
3844
- @data['포스트설정']['gpt상단'] = checkbox('원고 위에 넣기'){
3845
- top 1
3846
- left 1
3847
- enabled false # 기본적으로 비활성화
3848
- on_toggled{
3849
- if @data['포스트설정']['gpt상단'].checked?
3850
- @data['포스트설정']['gpt하단'].checked = false
3851
- end
3852
- }
3853
- }
3854
-
3855
- @data['포스트설정']['gpt하단'] = checkbox('원고 아래 넣기'){
3856
- top 1
3857
- left 2
3858
- enabled false # 기본적으로 비활성화
3859
- on_toggled{
3860
- if @data['포스트설정']['gpt하단'].checked?
3861
- @data['포스트설정']['gpt상단'].checked = false
3802
+ }
3803
+ button('삭제하기'){
3804
+ top 1
3805
+ left 3
3806
+ on_clicked{
3807
+ m = Array.new
3808
+ for n in 0..@data['키워드설정']['키워드'].length-1
3809
+ if @data['키워드설정']['키워드'][n][0] == true
3810
+ m << n
3862
3811
  end
3863
- }
3864
- }
3865
- } }
3866
- horizontal_box{
3867
- stretchy false
3868
- grid{
3869
- label('※ GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
3870
- } } }
3871
-
3872
-
3873
- table{
3874
- checkbox_column('선택'){
3875
- editable true
3876
- }
3877
- text_column('키워드'){
3878
-
3879
- }
3812
+ end
3880
3813
 
3881
- cell_rows @data['키워드설정']['키워드']
3814
+ m.reverse.each do |i|
3815
+ @data['키워드설정']['키워드'].delete_at(i)
3816
+ end
3817
+ @data['키워드설정']['키워드'].delete(nil)
3882
3818
  }
3883
-
3884
-
3885
-
3886
3819
  }
3887
- vertical_separator{
3820
+ }
3821
+
3822
+ @data['키워드설정']['순서사용'] = checkbox('순서사용'){
3888
3823
  stretchy false
3824
+ on_toggled{ |c|
3825
+ if c.checked?
3826
+ @data['키워드설정']['랜덤사용'].checked = false
3827
+ end
3828
+ }
3829
+ }
3830
+ @data['키워드설정']['랜덤사용'] = checkbox('랜덤사용'){
3831
+ stretchy false
3832
+ on_toggled{ |c|
3833
+ if c.checked?
3834
+ @data['키워드설정']['순서사용'].checked = false
3835
+ end
3836
+ }
3837
+ }
3838
+ }
3839
+ vertical_separator{
3840
+ stretchy false
3841
+ }
3842
+ horizontal_box{
3843
+ stretchy false
3844
+ grid{
3845
+ @data['포스트설정']['gpt키워드'] = checkbox('GPT 키워드 기반 글 생성'){
3846
+ top 1
3847
+ left 0
3848
+ #enabled false # 기본적으로 비활성화
3849
+ on_toggled {
3850
+ if @data['포스트설정']['gpt키워드'].checked?
3851
+ @data['포스트설정']['gpt상단'].enabled = true # '내용투명' 활성화
3852
+ @data['포스트설정']['gpt하단'].enabled = true # '내용투명' 활성화
3853
+ else
3854
+ @data['포스트설정']['gpt상단'].checked = false # 체크 해제
3855
+ @data['포스트설정']['gpt상단'].enabled = false # 비활성화
3856
+ @data['포스트설정']['gpt하단'].checked = false # 체크 해제
3857
+ @data['포스트설정']['gpt하단'].enabled = false # 비활성화
3858
+ end
3859
+ }
3860
+
3861
+ }
3862
+
3863
+ @data['포스트설정']['gpt상단'] = checkbox('원고 위에 넣기'){
3864
+ top 1
3865
+ left 1
3866
+ enabled false # 기본적으로 비활성화
3867
+ on_toggled{
3868
+ if @data['포스트설정']['gpt상단'].checked?
3869
+ @data['포스트설정']['gpt하단'].checked = false
3870
+ end
3871
+ }
3889
3872
  }
3890
- vertical_box{
3891
- horizontal_box{
3892
- stretchy false
3893
- button('제목불러오기'){
3894
- on_clicked{
3895
- file = open_file
3896
- if file != nil
3897
- file_data = File.open(file, 'r', :encoding => 'utf-8').read()
3898
- file_data.split("\n").each do |title|
3899
- if title.split(" ").join('').length < 2
3900
-
3901
- else
3902
- @data['제목설정']['제목'] << [false, title]
3903
- @data['제목설정']['제목'] << [false, title]
3904
- @data['제목설정']['제목'].pop
3905
- end
3906
- end
3907
- end
3908
- }
3909
- }
3910
3873
 
3874
+ @data['포스트설정']['gpt하단'] = checkbox('원고 아래 넣기'){
3875
+ top 1
3876
+ left 2
3877
+ enabled false # 기본적으로 비활성화
3878
+ on_toggled{
3879
+ if @data['포스트설정']['gpt하단'].checked?
3880
+ @data['포스트설정']['gpt상단'].checked = false
3881
+ end
3911
3882
  }
3912
- horizontal_box{
3913
- stretchy false
3914
- grid{
3915
- button('전체선택'){
3916
- top 1
3917
- left 1
3918
- on_clicked{
3919
- for n in 0..@data['제목설정']['제목'].length-1
3920
- @data['제목설정']['제목'][n][0] = true
3921
- @data['제목설정']['제목'] << []
3922
- @data['제목설정']['제목'].pop
3923
- end
3924
- }
3925
- }
3926
- button('선택해제'){
3927
- top 1
3928
- left 2
3929
- on_clicked{
3930
- for n in 0..@data['제목설정']['제목'].length-1
3931
- @data['제목설정']['제목'][n][0] = false
3932
- @data['제목설정']['제목'] << []
3883
+ }
3884
+ } }
3885
+ horizontal_box{
3886
+ stretchy false
3887
+ @data['포스트설정']['gpt키워드_프롬프트'] = entry(){
3888
+ text '프롬프트:관련 글을 1500자에서 2500자 사이로 만들어줘'
3889
+ }}
3890
+ horizontal_box{
3891
+ stretchy false
3892
+ grid{
3893
+ label('※ GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
3894
+ } } }
3895
+
3896
+
3897
+ table{
3898
+ checkbox_column('선택'){
3899
+ editable true
3900
+ }
3901
+ text_column('키워드'){
3902
+
3903
+ }
3904
+
3905
+ cell_rows @data['키워드설정']['키워드']
3906
+ }
3907
+
3908
+
3909
+
3910
+ }
3911
+ vertical_separator{
3912
+ stretchy false
3913
+ }
3914
+ vertical_box{
3915
+ horizontal_box{
3916
+ stretchy false
3917
+ button('제목불러오기'){
3918
+ on_clicked{
3919
+ file = open_file
3920
+ if file != nil
3921
+ file_data = File.open(file, 'r', :encoding => 'utf-8').read()
3922
+ file_data.split("\n").each do |title|
3923
+ if title.split(" ").join('').length < 2
3924
+
3925
+ else
3926
+ @data['제목설정']['제목'] << [false, title]
3927
+ @data['제목설정']['제목'] << [false, title]
3933
3928
  @data['제목설정']['제목'].pop
3934
3929
  end
3935
- }
3936
- }
3937
- button('삭제하기'){
3938
- top 1
3939
- left 3
3940
- on_clicked{
3941
- m = Array.new
3942
- for n in 0..@data['제목설정']['제목'].length-1
3943
- if @data['제목설정']['제목'][n][0] == true
3944
- m << n
3945
- end
3946
- end
3930
+ end
3931
+ end
3932
+ }
3933
+ }
3947
3934
 
3948
- m.reverse.each do |i|
3949
- @data['제목설정']['제목'].delete_at(i)
3950
- end
3951
- @data['제목설정']['제목'].delete(nil)
3952
- }
3953
- }
3935
+ }
3936
+ horizontal_box{
3937
+ stretchy false
3938
+ grid{
3939
+ button('전체선택'){
3940
+ top 1
3941
+ left 1
3942
+ on_clicked{
3943
+ for n in 0..@data['제목설정']['제목'].length-1
3944
+ @data['제목설정']['제목'][n][0] = true
3945
+ @data['제목설정']['제목'] << []
3946
+ @data['제목설정']['제목'].pop
3947
+ end
3954
3948
  }
3955
- @data['제목설정']['순서사용'] = checkbox('순서사용'){
3956
- stretchy false
3957
- on_toggled{ |c|
3958
- if c.checked?
3959
- @data['제목설정']['랜덤사용'].checked = false
3960
- end
3961
- }
3962
- }
3963
- @data['제목설정']['랜덤사용'] = checkbox('랜덤사용'){
3964
- stretchy false
3965
- on_toggled{ |c|
3966
- if c.checked?
3967
- @data['제목설정']['순서사용'].checked = false
3968
- end
3969
- }
3970
- }
3949
+ }
3950
+ button('선택해제'){
3951
+ top 1
3952
+ left 2
3953
+ on_clicked{
3954
+ for n in 0..@data['제목설정']['제목'].length-1
3955
+ @data['제목설정']['제목'][n][0] = false
3956
+ @data['제목설정']['제목'] << []
3957
+ @data['제목설정']['제목'].pop
3958
+ end
3971
3959
  }
3972
- vertical_separator{
3973
- stretchy false
3960
+ }
3961
+ button('삭제하기'){
3962
+ top 1
3963
+ left 3
3964
+ on_clicked{
3965
+ m = Array.new
3966
+ for n in 0..@data['제목설정']['제목'].length-1
3967
+ if @data['제목설정']['제목'][n][0] == true
3968
+ m << n
3969
+ end
3970
+ end
3971
+
3972
+ m.reverse.each do |i|
3973
+ @data['제목설정']['제목'].delete_at(i)
3974
+ end
3975
+ @data['제목설정']['제목'].delete(nil)
3974
3976
  }
3975
- horizontal_box{
3976
- stretchy false
3977
- grid{
3978
- @data['포스트설정']['gpt제목'] = checkbox('제목을 이용해 GPT로 비슷한 제목 생성'){
3979
-
3980
-
3981
- }}}
3982
- horizontal_box{
3983
- stretchy false
3984
- grid{
3985
- label(' GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
3986
- } } }
3987
-
3977
+ }
3978
+ }
3979
+ @data['제목설정']['순서사용'] = checkbox('순서사용'){
3980
+ stretchy false
3981
+ on_toggled{ |c|
3982
+ if c.checked?
3983
+ @data['제목설정']['랜덤사용'].checked = false
3984
+ end
3985
+ }
3986
+ }
3987
+ @data['제목설정']['랜덤사용'] = checkbox('랜덤사용'){
3988
+ stretchy false
3989
+ on_toggled{ |c|
3990
+ if c.checked?
3991
+ @data['제목설정']['순서사용'].checked = false
3992
+ end
3993
+ }
3994
+ }
3995
+ }
3996
+ vertical_separator{
3997
+ stretchy false
3998
+ }
3999
+ horizontal_box{
4000
+ stretchy false
4001
+ grid{
4002
+ @data['포스트설정']['gpt제목'] = checkbox('제목을 이용해 GPT로 비슷한 제목 생성'){
4003
+
4004
+
4005
+ }}}
4006
+ horizontal_box{
4007
+ stretchy false
4008
+ @data['포스트설정']['gpt제목_프롬프트'] = entry(){
4009
+ text '프롬프트:비슷한 길이로 제목으로 사용할수있게 하나만 만들어줘'
4010
+ }}
4011
+ horizontal_box{
4012
+ stretchy false
4013
+ grid{
4014
+ label('※ GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
4015
+ } } }
4016
+
3988
4017
 
3989
- table{
3990
- checkbox_column('선택'){
3991
- editable true
3992
- }
3993
- text_column('제목'){
4018
+ table{
4019
+ checkbox_column('선택'){
4020
+ editable true
4021
+ }
4022
+ text_column('제목'){
3994
4023
 
3995
- }
4024
+ }
3996
4025
 
3997
- cell_rows @data['제목설정']['제목']
3998
- }
3999
-
4026
+ cell_rows @data['제목설정']['제목']
4027
+ }
4028
+
4000
4029
 
4030
+ }
4031
+ vertical_separator{
4032
+ stretchy false
4033
+ }
4034
+ vertical_box{
4035
+ horizontal_box{
4036
+ stretchy false
4037
+ button('내용불러오기'){
4038
+ on_clicked{
4039
+ file = open_file
4040
+ if file != nil
4041
+ file_name = file.split("\\")[-1]
4042
+ file_data = File.open(file,'r', :encoding => 'utf-8').read()
4043
+ if file_data.split("\n").length < 2
4044
+ file_data = file_data + "\n"
4045
+ end
4046
+ @data['내용설정']['내용'] << [false, file_name, file_data]
4047
+ @data['내용설정']['내용'] << [false, file_name, file_data]
4048
+ @data['내용설정']['내용'].pop
4049
+ end
4050
+ }
4001
4051
  }
4002
- vertical_separator{
4003
- stretchy false
4004
- }
4005
- vertical_box{
4006
- horizontal_box{
4007
- stretchy false
4008
- button('내용불러오기'){
4009
- on_clicked{
4010
- file = open_file
4011
- if file != nil
4012
- file_name = file.split("\\")[-1]
4013
- file_data = File.open(file,'r', :encoding => 'utf-8').read()
4014
- if file_data.split("\n").length < 2
4015
- file_data = file_data + "\n"
4016
- end
4017
- @data['내용설정']['내용'] << [false, file_name, file_data]
4018
- @data['내용설정']['내용'] << [false, file_name, file_data]
4019
- @data['내용설정']['내용'].pop
4020
- end
4021
- }
4022
- }
4023
4052
 
4053
+ }
4054
+ horizontal_box{
4055
+ stretchy false
4056
+ grid{
4057
+ button('전체선택'){
4058
+ top 1
4059
+ left 1
4060
+ on_clicked{
4061
+ for n in 0..@data['내용설정']['내용'].length-1
4062
+ @data['내용설정']['내용'][n][0] = true
4063
+ @data['내용설정']['내용'] << []
4064
+ @data['내용설정']['내용'].pop
4065
+ end
4024
4066
  }
4025
- horizontal_box{
4026
- stretchy false
4027
- grid{
4028
- button('전체선택'){
4029
- top 1
4030
- left 1
4031
- on_clicked{
4032
- for n in 0..@data['내용설정']['내용'].length-1
4033
- @data['내용설정']['내용'][n][0] = true
4034
- @data['내용설정']['내용'] << []
4035
- @data['내용설정']['내용'].pop
4036
- end
4037
- }
4038
- }
4039
- button('선택해제'){
4040
- top 1
4041
- left 2
4042
- on_clicked{
4043
- for n in 0..@data['내용설정']['내용'].length-1
4044
- @data['내용설정']['내용'][n][0] = false
4045
- @data['내용설정']['내용'] << []
4046
- @data['내용설정']['내용'].pop
4047
- end
4048
- }
4049
- }
4050
- button('삭제하기'){
4051
- top 1
4052
- left 3
4053
- on_clicked{
4054
- m = Array.new
4055
- for n in 0..@data['내용설정']['내용'].length-1
4056
- if @data['내용설정']['내용'][n][0] == true
4057
- m << n
4058
- end
4059
- end
4067
+ }
4068
+ button('선택해제'){
4069
+ top 1
4070
+ left 2
4071
+ on_clicked{
4072
+ for n in 0..@data['내용설정']['내용'].length-1
4073
+ @data['내용설정']['내용'][n][0] = false
4074
+ @data['내용설정']['내용'] << []
4075
+ @data['내용설정']['내용'].pop
4076
+ end
4077
+ }
4078
+ }
4079
+ button('삭제하기'){
4080
+ top 1
4081
+ left 3
4082
+ on_clicked{
4083
+ m = Array.new
4084
+ for n in 0..@data['내용설정']['내용'].length-1
4085
+ if @data['내용설정']['내용'][n][0] == true
4086
+ m << n
4087
+ end
4088
+ end
4060
4089
 
4061
- m.reverse.each do |i|
4062
- @data['내용설정']['내용'].delete_at(i)
4063
- end
4064
- @data['내용설정']['내용'].delete(nil)
4065
- }
4066
- }
4090
+ m.reverse.each do |i|
4091
+ @data['내용설정']['내용'].delete_at(i)
4092
+ end
4093
+ @data['내용설정']['내용'].delete(nil)
4067
4094
  }
4068
- @data['내용설정']['순서사용'] = checkbox('순서사용'){
4069
- stretchy false
4070
- on_toggled{ |c|
4071
- if c.checked?
4072
- @data['내용설정']['랜덤사용'].checked = false
4073
- end
4074
- }
4075
- }
4076
- @data['내용설정']['랜덤사용'] = checkbox('랜덤사용'){
4077
- stretchy false
4078
- on_toggled{ |c|
4079
- if c.checked?
4080
- @data['내용설정']['순서사용'].checked = false
4081
- end
4082
- }
4083
- }
4095
+ }
4096
+ }
4097
+ @data['내용설정']['순서사용'] = checkbox('순서사용'){
4098
+ stretchy false
4099
+ on_toggled{ |c|
4100
+ if c.checked?
4101
+ @data['내용설정']['랜덤사용'].checked = false
4102
+ end
4084
4103
  }
4085
- vertical_separator{
4086
- stretchy false
4104
+ }
4105
+ @data['내용설정']['랜덤사용'] = checkbox('랜덤사용'){
4106
+ stretchy false
4107
+ on_toggled{ |c|
4108
+ if c.checked?
4109
+ @data['내용설정']['순서사용'].checked = false
4110
+ end
4087
4111
  }
4088
- horizontal_box{
4089
- stretchy false
4090
- grid{
4091
- @data['포스트설정']['gpt내용'] = checkbox('내용파일을 이용해 GPT로 글 변형'){
4092
-
4093
-
4094
- }}}
4095
- horizontal_box{
4096
- stretchy false
4097
- grid{
4098
- label('※ GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
4099
- } } }
4100
-
4101
- table{
4102
- checkbox_column('선택'){
4103
- editable true
4104
- }
4105
- text_column('내용파일'){
4112
+ }
4113
+ }
4114
+ vertical_separator{
4115
+ stretchy false
4116
+ }
4117
+ horizontal_box{
4118
+ stretchy false
4119
+ grid{
4120
+ @data['포스트설정']['gpt내용'] = checkbox('내용파일을 이용해 GPT로 글 변형'){
4121
+
4122
+
4123
+ }}}
4124
+ horizontal_box{
4125
+ stretchy false
4126
+ @data['포스트설정']['gpt내용_프롬프트'] = entry(){
4127
+ text '프롬프트:동의어,유사어를 이용해 변경해줘'
4128
+ }}
4129
+ horizontal_box{
4130
+ stretchy false
4131
+ grid{
4132
+ label('※ GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
4133
+ } } }
4134
+
4135
+ table{
4136
+ checkbox_column('선택'){
4137
+ editable true
4138
+ }
4139
+ text_column('내용파일'){
4106
4140
 
4107
- }
4141
+ }
4108
4142
 
4109
- cell_rows @data['내용설정']['내용']
4110
- }
4143
+ cell_rows @data['내용설정']['내용']
4144
+ }
4111
4145
 
4112
- horizontal_box{
4113
- stretchy false
4114
- @data['이미지설정']['폴더경로2'] = entry{
4115
- stretchy false
4116
- text "내용폴더경로 ex)C:\\내용\\폴더1"
4117
- }
4118
- button('폴더째로 불러오기') {
4119
- on_clicked {
4120
- path = @data['이미지설정']['폴더경로2'].text.to_s.force_encoding('utf-8')
4121
-
4122
- # 경로가 유효한지 확인
4123
- if Dir.exist?(path)
4124
- Dir.entries(path).each do |file|
4125
- if file == '.' or file == '..'
4126
- next
4127
- else
4128
- begin
4129
- # 파일을 열고 내용을 읽어서 추가
4130
- file_data = File.open(path + '/' + file, 'r', encoding: 'utf-8').read
4131
- @data['내용설정']['내용'] << [false, file, file_data]
4132
- rescue => e
4133
- # 파일을 열 수 없는 경우, 오류 메시지 출력
4134
- puts "파일을 열 수 없습니다: #{file}, 오류: #{e.message}"
4135
- end
4136
- end
4137
- end
4146
+ horizontal_box{
4147
+ stretchy false
4148
+ @data['이미지설정']['폴더경로2'] = entry{
4149
+ stretchy false
4150
+ text "내용폴더경로 ex)C:\\내용\\폴더1"
4151
+ }
4152
+
4153
+ button('폴더째로 불러오기') {
4154
+ on_clicked {
4155
+ path = @data['이미지설정']['폴더경로2'].text.to_s.force_encoding('utf-8')
4138
4156
 
4139
- # 내용 배열에서 마지막 빈 항목 제거
4140
- @data['내용설정']['내용'] << []
4141
- @data['내용설정']['내용'].pop
4157
+ # 경로가 유효한지 확인
4158
+ if Dir.exist?(path)
4159
+ Dir.entries(path).each do |file|
4160
+ if file == '.' or file == '..'
4161
+ next
4142
4162
  else
4143
- # 경로가 유효하지 않을 경우, 오류 메시지 출력
4144
- puts "경로가 존재하지 않습니다: #{path}"
4163
+ begin
4164
+ # 파일을 열고 내용을 읽어서 추가
4165
+ file_data = File.open(path + '/' + file, 'r', encoding: 'utf-8').read
4166
+ @data['내용설정']['내용'] << [false, file, file_data]
4167
+ rescue => e
4168
+ # 파일을 열 수 없는 경우, 오류 메시지 출력
4169
+ puts "파일을 열 수 없습니다: #{file}, 오류: #{e.message}"
4170
+ end
4145
4171
  end
4146
- }
4147
- }
4172
+ end
4173
+
4174
+ # 내용 배열에서 마지막 빈 항목 제거
4175
+ @data['내용설정']['내용'] << []
4176
+ @data['내용설정']['내용'].pop
4177
+ else
4178
+ # 경로가 유효하지 않을 경우, 오류 메시지 출력
4179
+ puts "경로가 존재하지 않습니다: #{path}"
4180
+ end
4148
4181
  }
4149
4182
  }
4150
4183
  }
4151
4184
  }
4185
+ }
4186
+ }
4152
4187
  tab_item('이미지설정'){
4153
4188
  horizontal_box{
4154
4189
  vertical_box{
@@ -4624,7 +4659,7 @@ class Wordpress
4624
4659
  left 1
4625
4660
  text 'URL'
4626
4661
  }
4627
- @data['포스트설정']['내용을자동생성'] = checkbox('키워드기반 생성으로만 등록(GPT사용시 자체 생성)'){
4662
+ @data['포스트설정']['내용을자동생성'] = checkbox('키워드기반 글만 등록(GPT사용시 체크 해제)'){
4628
4663
  top 9
4629
4664
  left 0
4630
4665
  on_toggled{
@@ -4632,31 +4667,46 @@ class Wordpress
4632
4667
  @data['포스트설정']['내용과자동생성'].checked = false
4633
4668
  @data['포스트설정']['내용투명'].checked = false
4634
4669
  @data['포스트설정']['자동글 수식에 입력'].checked = false
4635
-
4670
+
4636
4671
  end
4637
4672
  }
4638
4673
  }
4639
-
4640
-
4674
+ label('※GPT사용시 내용설정 탭에서 설정'){
4675
+ top 9
4676
+ left 1
4677
+ }
4678
+
4679
+ label('※GPT 미 사용시 세팅 권장'){
4680
+ top 9
4681
+ left 3
4682
+ }
4683
+
4641
4684
 
4642
-
4643
4685
  aa1 = 2
4644
- @data['포스트설정']['내용과자동생성'] = checkbox('내용파일+키워드기반 생성 등록(GPT사용시 자체 생성)') {
4686
+ @data['포스트설정']['내용과자동생성'] = checkbox('원고+키워드기반 등록(GPT사용시 체크 해제)') {
4645
4687
  top 10 + aa1
4646
4688
  left 0
4647
4689
  on_toggled {
4648
- if @data['포스트설정']['내용과자동생성'].checked?
4690
+ if @data['포스트설정']['내용과자동생성'].checked?
4649
4691
  @data['포스트설정']['내용을자동생성'].checked = false
4650
4692
  @data['포스트설정']['내용투명'].enabled = true # '내용투명' 활성화
4651
4693
  @data['포스트설정']['자동글 수식에 입력'].enabled = true # '내용투명' 활성화
4652
- else
4694
+ else
4653
4695
  @data['포스트설정']['내용투명'].checked = false # 체크 해제
4654
4696
  @data['포스트설정']['내용투명'].enabled = false # 비활성화
4655
4697
  @data['포스트설정']['자동글 수식에 입력'].checked = false # 체크 해제
4656
4698
  @data['포스트설정']['자동글 수식에 입력'].enabled = false # 비활성화
4657
- end
4699
+ end
4658
4700
  }
4659
- }
4701
+ }
4702
+ label('※GPT사용시 내용설정 탭에서 설정'){
4703
+ top 10 + aa1
4704
+ left 1
4705
+ }
4706
+ label('※GPT 미 사용시 세팅 권장'){
4707
+ top 10 + aa1
4708
+ left 3
4709
+ }
4660
4710
 
4661
4711
  @data['포스트설정']['내용투명'] = checkbox('키워드 기반 자동 생성글 안보이게 처리') {
4662
4712
  top 11 + aa1