cafe_buy 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_buy.rb +575 -525
  3. metadata +2 -2
data/lib/cafe_buy.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
@@ -2475,77 +2507,53 @@ class Wordpress
2475
2507
  puts table[10]
2476
2508
  if table[7].to_i > table[10].to_i
2477
2509
  if @data['포스트설정']['테더링'].checked?
2478
- puts 'tethering ip change...'
2479
-
2480
- # ADB devices 확인
2510
+ puts 'Tethering IP change...'
2511
+
2481
2512
  stdout, stderr, status = Open3.capture3('./adb devices')
2482
- if status.success?
2513
+
2514
+ if status.success?
2483
2515
  device_id = stdout.split("\n")[1].split("\t")[0]
2484
2516
  puts device_id
2485
2517
 
2486
2518
  # ADB 서버 초기화
2487
2519
  puts 'adb kill-server'
2488
- Open3.capture3('adb kill-server')
2489
- sleep(2)
2520
+ Open3.capture3('./adb kill-server')
2521
+ sleep(3)
2490
2522
 
2491
2523
  # 다시 ADB 서버 실행
2492
2524
  puts 'adb start-server'
2493
- Open3.capture3('adb start-server')
2494
- sleep(2)
2525
+ Open3.capture3('./adb start-server')
2526
+ sleep(3)
2495
2527
 
2496
2528
  # 데이터를 끄고 켜기
2497
2529
  puts 'adb -s ' + device_id + ' shell svc data disable'
2498
- stdout2, stderr2, status2 = Open3.capture3('./adb -s ' + device_id + ' shell svc data disable')
2499
-
2500
- if status2.success?
2501
- sleep(3)
2502
- puts 'adb -s ' + device_id + ' shell svc data enable'
2503
- Open3.capture3('./adb -s ' + device_id + ' shell svc data enable')
2504
- sleep(3)
2505
- puts 'adb ok'
2506
- sleep(8)
2507
-
2508
- # IP 확인 및 재시도 (반복문 사용)
2509
- retry_count = 0
2510
- max_retries = 5
2511
- current_ip = nil
2512
-
2513
- # 무한 루프 방지
2514
- while retry_count < max_retries
2515
- begin
2516
- http = HTTP.get('https://www.findip.kr/')
2517
- noko = Nokogiri::HTML(http.to_s)
2518
- new_ip = noko.xpath('/html/body/header/h2').text.strip
2519
-
2520
- puts "Current IP: #{@my_ip}, New IP: #{new_ip}"
2521
-
2522
- # IP가 변경되었으면 @my_ip를 갱신하고 종료
2523
- if new_ip != @my_ip
2524
- @my_ip = new_ip
2525
- puts "IP 변경됨: #{@my_ip}"
2526
- break
2527
- else
2528
- puts 'IP가 변경되지 않음. 재시도...'
2529
- retry_count += 1
2530
- sleep(3) # 3초 후 재시도
2531
- end
2532
- rescue => e
2533
- retry_count += 1
2534
- sleep(3) # 3초 후 재시도
2535
- end
2536
-
2537
- # 최대 재시도 횟수를 초과하면 예외 발생시키기
2538
- if retry_count >= max_retries
2539
- raise "최대 재시도 횟수 초과. IP 변경 실패."
2540
- end
2530
+ stdout2, stderr2, status2 = Open3.capture3('./adb -s '+device_id+' shell svc data disable')
2531
+ sleep(3)
2532
+ puts 'adb -s ' + device_id + ' shell svc data enable'
2533
+ Open3.capture3('./adb -s '+device_id+' shell svc data enable')
2534
+ sleep(3)
2535
+ puts 'adb ok'
2536
+ sleep(8)
2537
+
2538
+ robot_ip = lambda do
2539
+ http = HTTP.get('https://www.findip.kr/')
2540
+ noko = Nokogiri::HTML(http.to_s)
2541
+ if noko.xpath('/html/body/header/h2').text != @my_ip
2542
+ @my_ip = noko.xpath('/html/body/header/h2').text
2543
+ puts "IP 변경됨[ #{@my_ip} ]"
2544
+ else
2545
+ puts @my_ip
2546
+ puts '제시도...'
2547
+ sleep(3)
2548
+ robot_ip[]
2541
2549
  end
2542
- else
2543
- puts 'Failed to disable data. Error: ' + stderr2
2544
- end
2550
+ end
2551
+ robot_ip[]
2552
+
2545
2553
  else
2546
- puts 'adb error, unable to get devices. Error: ' + stderr
2554
+ puts 'adb error pass'
2547
2555
  end
2548
- end
2556
+ end
2549
2557
 
2550
2558
  check_success = 1
2551
2559
  @data['table'][index][-1] = 0
@@ -2564,7 +2572,15 @@ class Wordpress
2564
2572
  end
2565
2573
 
2566
2574
  if @data['포스트설정']['gpt제목'].checked?
2567
- chat = Chat_title.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'))
2575
+ gpt_title_prompt = @data['포스트설정']['gpt제목_프롬프트'].text.to_s.force_encoding('utf-8')
2576
+
2577
+ # 공백을 포함한 빈 문자열을 체크하기 위해 strip을 사용
2578
+ gpt_title_prompt_sample = gpt_title_prompt.strip.empty? ? "프롬프트: 문장을 비슷한 길이로 ChatGPT의 멘트는 빼고 표현을 더 추가해서 하나만 만들어줘." : gpt_title_prompt
2579
+
2580
+ # gpt_title_prompt_sample을 Chat_title 객체에 전달
2581
+ chat = Chat_title.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'), gpt_title_prompt_sample)
2582
+
2583
+ # 메시지 요청 후 title에 저장
2568
2584
  gpt_text1 = chat.message(title)
2569
2585
  title = gpt_text1.to_s
2570
2586
  end
@@ -2609,18 +2625,16 @@ class Wordpress
2609
2625
 
2610
2626
 
2611
2627
  if @data['포스트설정']['gpt내용'].checked?
2628
+ gpt_content_prompt = @data['포스트설정']['gpt내용_프롬프트'].text.to_s.force_encoding('utf-8')
2612
2629
  api_key = @data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8')
2613
- #key_change = @data['포스트설정']['특정단어키워드로변경값'].text.to_s.force_encoding('utf-8')
2614
- #imotcon_change = @data['포스트설정']['스티커로변경단어'].text.to_s.force_encoding('utf-8')
2615
- #template_change = @data['포스트설정']['내템플릿변경단어'].text.to_s.force_encoding('utf-8')
2616
- #ttdanar_change = @data['포스트설정']['단어링크적용단어'].text.to_s.force_encoding('utf-8')
2617
- #sajine_change = @data['포스트설정']['단어사진으로변경단어'].text.to_s.force_encoding('utf-8')
2618
- #mov_change = @data['포스트설정']['영상으로변경단어'].text.to_s.force_encoding('utf-8')
2619
- #map_change = @data['포스트설정']['지도로변경단어'].text.to_s.force_encoding('utf-8')
2620
- #inyong9_change = @data['포스트설정']['인용구변경단어'].text.to_s.force_encoding('utf-8')
2621
-
2622
2630
 
2623
- chat = Chat_content.new(api_key)
2631
+ # 공백을 포함한 빈 문자열을 체크하기 위해 strip을 사용
2632
+ gpt_content_prompt_sample = gpt_content_prompt.strip.empty? ? "프롬프트:ChatGPT의 멘트는 빼고 위 전체적인 내용의 형식을 똑같이 표현을 더 추가하고 유사어로 변경하여 하나 만들어줘! 전화번호,연락처,가격,홈페이지안내 ,상담안내 관련 문구는 유지해야해" : gpt_content_prompt
2633
+
2634
+ # Chat_content 객체 생성 시 api_key와 gpt_content_prompt_sample을 두 개의 인자로 전달
2635
+ chat = Chat_content.new(api_key, gpt_content_prompt_sample)
2636
+
2637
+ # 메시지 요청 후 content에 저장
2624
2638
  gpt_text3 = chat.message(content)
2625
2639
  content = gpt_text3.to_s
2626
2640
  end
@@ -2824,13 +2838,17 @@ class Wordpress
2824
2838
  @data['table'] << []
2825
2839
  @data['table'].pop
2826
2840
  if @data['포스트설정']['gpt키워드'].checked?
2827
- chat = Chat.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'))
2841
+ gpt_keyword_prompt = @data['포스트설정']['gpt키워드_프롬프트'].text.to_s.force_encoding('utf-8')
2842
+ gpt_keyword_prompt_sample = gpt_keyword_prompt.strip.empty? ? "프롬프트: 관련된 글을 1500자에서 2500자 사이로 만들어줘" : gpt_keyword_prompt
2843
+ chat = Chat.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'), gpt_keyword_prompt)
2828
2844
  gpt_text = chat.message(keyword)
2829
- content = content + "\n(자동생성글)\n" + gpt_text
2845
+ #content = content.to_s + "\n(자동생성글)\n" + gpt_text.to_s
2846
+ content = content.to_s + "(자동생성글)" + gpt_text.to_s
2830
2847
  elsif @data['포스트설정']['내용을자동생성'].checked?
2831
2848
  content = auto_text
2832
2849
  elsif @data['포스트설정']['내용과자동생성'].checked?
2833
- content = content + "\n(자동생성글)\n" + auto_text
2850
+ #content = content + "\n(자동생성글)\n" + auto_text
2851
+ content = content + "(자동생성글)" + auto_text
2834
2852
  end
2835
2853
 
2836
2854
  if @data['포스트설정']['내용키워드삽입'].checked?
@@ -2865,7 +2883,8 @@ class Wordpress
2865
2883
  end
2866
2884
 
2867
2885
  if @data['포스트설정']['내용을자동생성'].checked?
2868
- content2 = content.split("\n")
2886
+ #content2 = content.split("\n")
2887
+ content2 = content.split
2869
2888
  end
2870
2889
 
2871
2890
  if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt키워드'].checked?
@@ -3988,423 +4007,439 @@ class Wordpress
3988
4007
  }
3989
4008
  }
3990
4009
  tab_item('내용설정'){
4010
+ horizontal_box{
4011
+ vertical_box{
3991
4012
  horizontal_box{
3992
- vertical_box{
3993
- horizontal_box{
3994
- stretchy false
3995
- button('키워드불러오기'){
3996
- on_clicked{
3997
- file = open_file
3998
- if file != nil
3999
- file_data = File.open(file, 'r', :encoding => 'utf-8').read()
4000
- file_data.split("\n").each do |keyword|
4001
- if keyword.split(' ').join('').length < 2
4002
-
4003
- else
4004
- @data['키워드설정']['키워드'] << [false, keyword]
4005
- @data['키워드설정']['키워드'] << [false, keyword]
4006
- @data['키워드설정']['키워드'].pop
4007
- end
4008
- end
4009
- end
4013
+ stretchy false
4014
+ button('키워드불러오기'){
4015
+ on_clicked{
4016
+ file = open_file
4017
+ if file != nil
4018
+ file_data = File.open(file, 'r', :encoding => 'utf-8').read()
4019
+ file_data.split("\n").each do |keyword|
4020
+ if keyword.split(' ').join('').length < 2
4010
4021
 
4011
- }
4012
- }
4013
-
4014
- }
4015
- horizontal_box{
4016
- stretchy false
4017
- grid{
4018
- button('전체선택'){
4019
- top 1
4020
- left 1
4021
- on_clicked{
4022
- for n in 0..@data['키워드설정']['키워드'].length-1
4023
- @data['키워드설정']['키워드'][n][0] = true
4024
- @data['키워드설정']['키워드'] << []
4025
- @data['키워드설정']['키워드'].pop
4026
- end
4027
- }
4028
- }
4029
- button('선택해제'){
4030
- top 1
4031
- left 2
4032
- on_clicked{
4033
- for n in 0..@data['키워드설정']['키워드'].length-1
4034
- @data['키워드설정']['키워드'][n][0] = false
4035
- @data['키워드설정']['키워드'] << []
4022
+ else
4023
+ @data['키워드설정']['키워드'] << [false, keyword]
4024
+ @data['키워드설정']['키워드'] << [false, keyword]
4036
4025
  @data['키워드설정']['키워드'].pop
4037
4026
  end
4038
- }
4039
- }
4040
- button('삭제하기'){
4041
- top 1
4042
- left 3
4043
- on_clicked{
4044
- m = Array.new
4045
- for n in 0..@data['키워드설정']['키워드'].length-1
4046
- if @data['키워드설정']['키워드'][n][0] == true
4047
- m << n
4048
- end
4049
- end
4027
+ end
4028
+ end
4050
4029
 
4051
- m.reverse.each do |i|
4052
- @data['키워드설정']['키워드'].delete_at(i)
4053
- end
4054
- @data['키워드설정']['키워드'].delete(nil)
4055
- }
4056
- }
4057
4030
  }
4058
-
4059
- @data['키워드설정']['순서사용'] = checkbox('순서사용'){
4060
- stretchy false
4061
- on_toggled{ |c|
4062
- if c.checked?
4063
- @data['키워드설정']['랜덤사용'].checked = false
4064
- end
4065
- }
4066
- }
4067
- @data['키워드설정']['랜덤사용'] = checkbox('랜덤사용'){
4068
- stretchy false
4069
- on_toggled{ |c|
4070
- if c.checked?
4071
- @data['키워드설정']['순서사용'].checked = false
4072
- end
4073
- }
4074
- }
4031
+ }
4032
+
4033
+ }
4034
+ horizontal_box{
4035
+ stretchy false
4036
+ grid{
4037
+ button('전체선택'){
4038
+ top 1
4039
+ left 1
4040
+ on_clicked{
4041
+ for n in 0..@data['키워드설정']['키워드'].length-1
4042
+ @data['키워드설정']['키워드'][n][0] = true
4043
+ @data['키워드설정']['키워드'] << []
4044
+ @data['키워드설정']['키워드'].pop
4045
+ end
4075
4046
  }
4076
- vertical_separator{
4077
- stretchy false
4047
+ }
4048
+ button('선택해제'){
4049
+ top 1
4050
+ left 2
4051
+ on_clicked{
4052
+ for n in 0..@data['키워드설정']['키워드'].length-1
4053
+ @data['키워드설정']['키워드'][n][0] = false
4054
+ @data['키워드설정']['키워드'] << []
4055
+ @data['키워드설정']['키워드'].pop
4056
+ end
4078
4057
  }
4079
- horizontal_box{
4080
- stretchy false
4081
- grid{
4082
- @data['포스트설정']['gpt키워드'] = checkbox('GPT 키워드 기반 글 생성'){
4083
- top 1
4084
- left 0
4085
- #enabled false # 기본적으로 비활성화
4086
- on_toggled {
4087
- if @data['포스트설정']['gpt키워드'].checked?
4088
- @data['포스트설정']['gpt상단'].enabled = true # '내용투명' 활성화
4089
- @data['포스트설정']['gpt하단'].enabled = true # '내용투명' 활성화
4090
- else
4091
- @data['포스트설정']['gpt상단'].checked = false # 체크 해제
4092
- @data['포스트설정']['gpt상단'].enabled = false # 비활성화
4093
- @data['포스트설정']['gpt하단'].checked = false # 체크 해제
4094
- @data['포스트설정']['gpt하단'].enabled = false # 비활성화
4095
- end
4096
- }
4097
-
4098
- }
4099
-
4100
- @data['포스트설정']['gpt상단'] = checkbox('원고 위에 넣기'){
4101
- top 1
4102
- left 1
4103
- enabled false # 기본적으로 비활성화
4104
- on_toggled{
4105
- if @data['포스트설정']['gpt상단'].checked?
4106
- @data['포스트설정']['gpt하단'].checked = false
4107
- end
4108
- }
4109
- }
4110
-
4111
- @data['포스트설정']['gpt하단'] = checkbox('원고 아래 넣기'){
4112
- top 1
4113
- left 2
4114
- enabled false # 기본적으로 비활성화
4115
- on_toggled{
4116
- if @data['포스트설정']['gpt하단'].checked?
4117
- @data['포스트설정']['gpt상단'].checked = false
4058
+ }
4059
+ button('삭제하기'){
4060
+ top 1
4061
+ left 3
4062
+ on_clicked{
4063
+ m = Array.new
4064
+ for n in 0..@data['키워드설정']['키워드'].length-1
4065
+ if @data['키워드설정']['키워드'][n][0] == true
4066
+ m << n
4118
4067
  end
4119
- }
4120
- }
4121
- } }
4122
- horizontal_box{
4123
- stretchy false
4124
- grid{
4125
- label('※ GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
4126
- } } }
4127
-
4128
-
4129
- table{
4130
- checkbox_column('선택'){
4131
- editable true
4132
- }
4133
- text_column('키워드'){
4134
-
4135
- }
4068
+ end
4136
4069
 
4137
- cell_rows @data['키워드설정']['키워드']
4070
+ m.reverse.each do |i|
4071
+ @data['키워드설정']['키워드'].delete_at(i)
4072
+ end
4073
+ @data['키워드설정']['키워드'].delete(nil)
4138
4074
  }
4139
-
4140
-
4141
-
4142
4075
  }
4143
- vertical_separator{
4076
+ }
4077
+
4078
+ @data['키워드설정']['순서사용'] = checkbox('순서사용'){
4144
4079
  stretchy false
4080
+ on_toggled{ |c|
4081
+ if c.checked?
4082
+ @data['키워드설정']['랜덤사용'].checked = false
4083
+ end
4084
+ }
4085
+ }
4086
+ @data['키워드설정']['랜덤사용'] = checkbox('랜덤사용'){
4087
+ stretchy false
4088
+ on_toggled{ |c|
4089
+ if c.checked?
4090
+ @data['키워드설정']['순서사용'].checked = false
4091
+ end
4092
+ }
4093
+ }
4094
+ }
4095
+ vertical_separator{
4096
+ stretchy false
4097
+ }
4098
+ horizontal_box{
4099
+ stretchy false
4100
+ grid{
4101
+ @data['포스트설정']['gpt키워드'] = checkbox('GPT 키워드 기반 글 생성'){
4102
+ top 1
4103
+ left 0
4104
+ #enabled false # 기본적으로 비활성화
4105
+ on_toggled {
4106
+ if @data['포스트설정']['gpt키워드'].checked?
4107
+ @data['포스트설정']['gpt상단'].enabled = true # '내용투명' 활성화
4108
+ @data['포스트설정']['gpt하단'].enabled = true # '내용투명' 활성화
4109
+ else
4110
+ @data['포스트설정']['gpt상단'].checked = false # 체크 해제
4111
+ @data['포스트설정']['gpt상단'].enabled = false # 비활성화
4112
+ @data['포스트설정']['gpt하단'].checked = false # 체크 해제
4113
+ @data['포스트설정']['gpt하단'].enabled = false # 비활성화
4114
+ end
4115
+ }
4116
+
4117
+ }
4118
+
4119
+ @data['포스트설정']['gpt상단'] = checkbox('원고 위에 넣기'){
4120
+ top 1
4121
+ left 1
4122
+ enabled false # 기본적으로 비활성화
4123
+ on_toggled{
4124
+ if @data['포스트설정']['gpt상단'].checked?
4125
+ @data['포스트설정']['gpt하단'].checked = false
4126
+ end
4127
+ }
4145
4128
  }
4146
- vertical_box{
4147
- horizontal_box{
4148
- stretchy false
4149
- button('제목불러오기'){
4150
- on_clicked{
4151
- file = open_file
4152
- if file != nil
4153
- file_data = File.open(file, 'r', :encoding => 'utf-8').read()
4154
- file_data.split("\n").each do |title|
4155
- if title.split(" ").join('').length < 2
4156
-
4157
- else
4158
- @data['제목설정']['제목'] << [false, title]
4159
- @data['제목설정']['제목'] << [false, title]
4160
- @data['제목설정']['제목'].pop
4161
- end
4162
- end
4163
- end
4164
- }
4165
- }
4166
4129
 
4130
+ @data['포스트설정']['gpt하단'] = checkbox('원고 아래 넣기'){
4131
+ top 1
4132
+ left 2
4133
+ enabled false # 기본적으로 비활성화
4134
+ on_toggled{
4135
+ if @data['포스트설정']['gpt하단'].checked?
4136
+ @data['포스트설정']['gpt상단'].checked = false
4137
+ end
4167
4138
  }
4168
- horizontal_box{
4169
- stretchy false
4170
- grid{
4171
- button('전체선택'){
4172
- top 1
4173
- left 1
4174
- on_clicked{
4175
- for n in 0..@data['제목설정']['제목'].length-1
4176
- @data['제목설정']['제목'][n][0] = true
4177
- @data['제목설정']['제목'] << []
4178
- @data['제목설정']['제목'].pop
4179
- end
4180
- }
4181
- }
4182
- button('선택해제'){
4183
- top 1
4184
- left 2
4185
- on_clicked{
4186
- for n in 0..@data['제목설정']['제목'].length-1
4187
- @data['제목설정']['제목'][n][0] = false
4188
- @data['제목설정']['제목'] << []
4139
+ }
4140
+ } }
4141
+ horizontal_box{
4142
+ stretchy false
4143
+ @data['포스트설정']['gpt키워드_프롬프트'] = entry(){
4144
+ text '프롬프트:관련 글을 1500자에서 2500자 사이로 만들어줘'
4145
+ }}
4146
+ horizontal_box{
4147
+ stretchy false
4148
+ grid{
4149
+ label('※ GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
4150
+ } } }
4151
+
4152
+
4153
+ table{
4154
+ checkbox_column('선택'){
4155
+ editable true
4156
+ }
4157
+ text_column('키워드'){
4158
+
4159
+ }
4160
+
4161
+ cell_rows @data['키워드설정']['키워드']
4162
+ }
4163
+
4164
+
4165
+
4166
+ }
4167
+ vertical_separator{
4168
+ stretchy false
4169
+ }
4170
+ vertical_box{
4171
+ horizontal_box{
4172
+ stretchy false
4173
+ button('제목불러오기'){
4174
+ on_clicked{
4175
+ file = open_file
4176
+ if file != nil
4177
+ file_data = File.open(file, 'r', :encoding => 'utf-8').read()
4178
+ file_data.split("\n").each do |title|
4179
+ if title.split(" ").join('').length < 2
4180
+
4181
+ else
4182
+ @data['제목설정']['제목'] << [false, title]
4183
+ @data['제목설정']['제목'] << [false, title]
4189
4184
  @data['제목설정']['제목'].pop
4190
4185
  end
4191
- }
4192
- }
4193
- button('삭제하기'){
4194
- top 1
4195
- left 3
4196
- on_clicked{
4197
- m = Array.new
4198
- for n in 0..@data['제목설정']['제목'].length-1
4199
- if @data['제목설정']['제목'][n][0] == true
4200
- m << n
4201
- end
4202
- end
4186
+ end
4187
+ end
4188
+ }
4189
+ }
4203
4190
 
4204
- m.reverse.each do |i|
4205
- @data['제목설정']['제목'].delete_at(i)
4206
- end
4207
- @data['제목설정']['제목'].delete(nil)
4208
- }
4209
- }
4191
+ }
4192
+ horizontal_box{
4193
+ stretchy false
4194
+ grid{
4195
+ button('전체선택'){
4196
+ top 1
4197
+ left 1
4198
+ on_clicked{
4199
+ for n in 0..@data['제목설정']['제목'].length-1
4200
+ @data['제목설정']['제목'][n][0] = true
4201
+ @data['제목설정']['제목'] << []
4202
+ @data['제목설정']['제목'].pop
4203
+ end
4210
4204
  }
4211
- @data['제목설정']['순서사용'] = checkbox('순서사용'){
4212
- stretchy false
4213
- on_toggled{ |c|
4214
- if c.checked?
4215
- @data['제목설정']['랜덤사용'].checked = false
4216
- end
4217
- }
4218
- }
4219
- @data['제목설정']['랜덤사용'] = checkbox('랜덤사용'){
4220
- stretchy false
4221
- on_toggled{ |c|
4222
- if c.checked?
4223
- @data['제목설정']['순서사용'].checked = false
4224
- end
4225
- }
4226
- }
4205
+ }
4206
+ button('선택해제'){
4207
+ top 1
4208
+ left 2
4209
+ on_clicked{
4210
+ for n in 0..@data['제목설정']['제목'].length-1
4211
+ @data['제목설정']['제목'][n][0] = false
4212
+ @data['제목설정']['제목'] << []
4213
+ @data['제목설정']['제목'].pop
4214
+ end
4227
4215
  }
4228
- vertical_separator{
4229
- stretchy false
4216
+ }
4217
+ button('삭제하기'){
4218
+ top 1
4219
+ left 3
4220
+ on_clicked{
4221
+ m = Array.new
4222
+ for n in 0..@data['제목설정']['제목'].length-1
4223
+ if @data['제목설정']['제목'][n][0] == true
4224
+ m << n
4225
+ end
4226
+ end
4227
+
4228
+ m.reverse.each do |i|
4229
+ @data['제목설정']['제목'].delete_at(i)
4230
+ end
4231
+ @data['제목설정']['제목'].delete(nil)
4230
4232
  }
4231
- horizontal_box{
4232
- stretchy false
4233
- grid{
4234
- @data['포스트설정']['gpt제목'] = checkbox('제목을 이용해 GPT로 비슷한 제목 생성'){
4235
-
4236
-
4237
- }}}
4238
- horizontal_box{
4239
- stretchy false
4240
- grid{
4241
- label(' GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
4242
- } } }
4243
-
4233
+ }
4234
+ }
4235
+ @data['제목설정']['순서사용'] = checkbox('순서사용'){
4236
+ stretchy false
4237
+ on_toggled{ |c|
4238
+ if c.checked?
4239
+ @data['제목설정']['랜덤사용'].checked = false
4240
+ end
4241
+ }
4242
+ }
4243
+ @data['제목설정']['랜덤사용'] = checkbox('랜덤사용'){
4244
+ stretchy false
4245
+ on_toggled{ |c|
4246
+ if c.checked?
4247
+ @data['제목설정']['순서사용'].checked = false
4248
+ end
4249
+ }
4250
+ }
4251
+ }
4252
+ vertical_separator{
4253
+ stretchy false
4254
+ }
4255
+ horizontal_box{
4256
+ stretchy false
4257
+ grid{
4258
+ @data['포스트설정']['gpt제목'] = checkbox('제목을 이용해 GPT로 비슷한 제목 생성'){
4259
+
4260
+
4261
+ }}}
4262
+ horizontal_box{
4263
+ stretchy false
4264
+ @data['포스트설정']['gpt제목_프롬프트'] = entry(){
4265
+ text '프롬프트:비슷한 길이로 제목으로 사용할수있게 하나만 만들어줘'
4266
+ }}
4267
+ horizontal_box{
4268
+ stretchy false
4269
+ grid{
4270
+ label('※ GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
4271
+ } } }
4272
+
4244
4273
 
4245
- table{
4246
- checkbox_column('선택'){
4247
- editable true
4248
- }
4249
- text_column('제목'){
4274
+ table{
4275
+ checkbox_column('선택'){
4276
+ editable true
4277
+ }
4278
+ text_column('제목'){
4250
4279
 
4251
- }
4280
+ }
4252
4281
 
4253
- cell_rows @data['제목설정']['제목']
4254
- }
4255
-
4282
+ cell_rows @data['제목설정']['제목']
4283
+ }
4284
+
4256
4285
 
4286
+ }
4287
+ vertical_separator{
4288
+ stretchy false
4289
+ }
4290
+ vertical_box{
4291
+ horizontal_box{
4292
+ stretchy false
4293
+ button('내용불러오기'){
4294
+ on_clicked{
4295
+ file = open_file
4296
+ if file != nil
4297
+ file_name = file.split("\\")[-1]
4298
+ file_data = File.open(file,'r', :encoding => 'utf-8').read()
4299
+ if file_data.split("\n").length < 2
4300
+ file_data = file_data + "\n"
4301
+ end
4302
+ @data['내용설정']['내용'] << [false, file_name, file_data]
4303
+ @data['내용설정']['내용'] << [false, file_name, file_data]
4304
+ @data['내용설정']['내용'].pop
4305
+ end
4306
+ }
4257
4307
  }
4258
- vertical_separator{
4259
- stretchy false
4260
- }
4261
- vertical_box{
4262
- horizontal_box{
4263
- stretchy false
4264
- button('내용불러오기'){
4265
- on_clicked{
4266
- file = open_file
4267
- if file != nil
4268
- file_name = file.split("\\")[-1]
4269
- file_data = File.open(file,'r', :encoding => 'utf-8').read()
4270
- if file_data.split("\n").length < 2
4271
- file_data = file_data + "\n"
4272
- end
4273
- @data['내용설정']['내용'] << [false, file_name, file_data]
4274
- @data['내용설정']['내용'] << [false, file_name, file_data]
4275
- @data['내용설정']['내용'].pop
4276
- end
4277
- }
4278
- }
4279
4308
 
4309
+ }
4310
+ horizontal_box{
4311
+ stretchy false
4312
+ grid{
4313
+ button('전체선택'){
4314
+ top 1
4315
+ left 1
4316
+ on_clicked{
4317
+ for n in 0..@data['내용설정']['내용'].length-1
4318
+ @data['내용설정']['내용'][n][0] = true
4319
+ @data['내용설정']['내용'] << []
4320
+ @data['내용설정']['내용'].pop
4321
+ end
4280
4322
  }
4281
- horizontal_box{
4282
- stretchy false
4283
- grid{
4284
- button('전체선택'){
4285
- top 1
4286
- left 1
4287
- on_clicked{
4288
- for n in 0..@data['내용설정']['내용'].length-1
4289
- @data['내용설정']['내용'][n][0] = true
4290
- @data['내용설정']['내용'] << []
4291
- @data['내용설정']['내용'].pop
4292
- end
4293
- }
4294
- }
4295
- button('선택해제'){
4296
- top 1
4297
- left 2
4298
- on_clicked{
4299
- for n in 0..@data['내용설정']['내용'].length-1
4300
- @data['내용설정']['내용'][n][0] = false
4301
- @data['내용설정']['내용'] << []
4302
- @data['내용설정']['내용'].pop
4303
- end
4304
- }
4305
- }
4306
- button('삭제하기'){
4307
- top 1
4308
- left 3
4309
- on_clicked{
4310
- m = Array.new
4311
- for n in 0..@data['내용설정']['내용'].length-1
4312
- if @data['내용설정']['내용'][n][0] == true
4313
- m << n
4314
- end
4315
- end
4323
+ }
4324
+ button('선택해제'){
4325
+ top 1
4326
+ left 2
4327
+ on_clicked{
4328
+ for n in 0..@data['내용설정']['내용'].length-1
4329
+ @data['내용설정']['내용'][n][0] = false
4330
+ @data['내용설정']['내용'] << []
4331
+ @data['내용설정']['내용'].pop
4332
+ end
4333
+ }
4334
+ }
4335
+ button('삭제하기'){
4336
+ top 1
4337
+ left 3
4338
+ on_clicked{
4339
+ m = Array.new
4340
+ for n in 0..@data['내용설정']['내용'].length-1
4341
+ if @data['내용설정']['내용'][n][0] == true
4342
+ m << n
4343
+ end
4344
+ end
4316
4345
 
4317
- m.reverse.each do |i|
4318
- @data['내용설정']['내용'].delete_at(i)
4319
- end
4320
- @data['내용설정']['내용'].delete(nil)
4321
- }
4322
- }
4346
+ m.reverse.each do |i|
4347
+ @data['내용설정']['내용'].delete_at(i)
4348
+ end
4349
+ @data['내용설정']['내용'].delete(nil)
4323
4350
  }
4324
- @data['내용설정']['순서사용'] = checkbox('순서사용'){
4325
- stretchy false
4326
- on_toggled{ |c|
4327
- if c.checked?
4328
- @data['내용설정']['랜덤사용'].checked = false
4329
- end
4330
- }
4331
- }
4332
- @data['내용설정']['랜덤사용'] = checkbox('랜덤사용'){
4333
- stretchy false
4334
- on_toggled{ |c|
4335
- if c.checked?
4336
- @data['내용설정']['순서사용'].checked = false
4337
- end
4338
- }
4339
- }
4351
+ }
4352
+ }
4353
+ @data['내용설정']['순서사용'] = checkbox('순서사용'){
4354
+ stretchy false
4355
+ on_toggled{ |c|
4356
+ if c.checked?
4357
+ @data['내용설정']['랜덤사용'].checked = false
4358
+ end
4340
4359
  }
4341
- vertical_separator{
4342
- stretchy false
4360
+ }
4361
+ @data['내용설정']['랜덤사용'] = checkbox('랜덤사용'){
4362
+ stretchy false
4363
+ on_toggled{ |c|
4364
+ if c.checked?
4365
+ @data['내용설정']['순서사용'].checked = false
4366
+ end
4343
4367
  }
4344
- horizontal_box{
4345
- stretchy false
4346
- grid{
4347
- @data['포스트설정']['gpt내용'] = checkbox('내용파일을 이용해 GPT로 글 변형'){
4348
-
4349
-
4350
- }}}
4351
- horizontal_box{
4352
- stretchy false
4353
- grid{
4354
- label('※ GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
4355
- } } }
4356
-
4357
- table{
4358
- checkbox_column('선택'){
4359
- editable true
4360
- }
4361
- text_column('내용파일'){
4368
+ }
4369
+ }
4370
+ vertical_separator{
4371
+ stretchy false
4372
+ }
4373
+ horizontal_box{
4374
+ stretchy false
4375
+ grid{
4376
+ @data['포스트설정']['gpt내용'] = checkbox('내용파일을 이용해 GPT로 글 변형'){
4377
+
4378
+
4379
+ }}}
4380
+ horizontal_box{
4381
+ stretchy false
4382
+ @data['포스트설정']['gpt내용_프롬프트'] = entry(){
4383
+ text '프롬프트:동의어,유사어를 이용해 변경해줘'
4384
+ }}
4385
+ horizontal_box{
4386
+ stretchy false
4387
+ grid{
4388
+ label('※ GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
4389
+ } } }
4390
+
4391
+ table{
4392
+ checkbox_column('선택'){
4393
+ editable true
4394
+ }
4395
+ text_column('내용파일'){
4362
4396
 
4363
- }
4397
+ }
4364
4398
 
4365
- cell_rows @data['내용설정']['내용']
4366
- }
4399
+ cell_rows @data['내용설정']['내용']
4400
+ }
4367
4401
 
4368
- horizontal_box{
4369
- stretchy false
4370
- @data['이미지설정']['폴더경로2'] = entry{
4371
- stretchy false
4372
- text "내용폴더경로 ex)C:\\내용\\폴더1"
4373
- }
4374
- button('폴더째로 불러오기') {
4375
- on_clicked {
4376
- path = @data['이미지설정']['폴더경로2'].text.to_s.force_encoding('utf-8')
4402
+ horizontal_box{
4403
+ stretchy false
4404
+ @data['이미지설정']['폴더경로2'] = entry{
4405
+ stretchy false
4406
+ text "내용폴더경로 ex)C:\\내용\\폴더1"
4407
+ }
4377
4408
 
4378
- # 경로가 유효한지 확인
4379
- if Dir.exist?(path)
4380
- Dir.entries(path).each do |file|
4381
- if file == '.' or file == '..'
4382
- next
4383
- else
4384
- begin
4385
- # 파일을 열고 내용을 읽어서 추가
4386
- file_data = File.open(path + '/' + file, 'r', encoding: 'utf-8').read
4387
- @data['내용설정']['내용'] << [false, file, file_data]
4388
- rescue => e
4389
- # 파일을 열 수 없는 경우, 오류 메시지 출력
4390
- puts "파일을 열 수 없습니다: #{file}, 오류: #{e.message}"
4391
- end
4392
- end
4393
- end
4409
+ button('폴더째로 불러오기') {
4410
+ on_clicked {
4411
+ path = @data['이미지설정']['폴더경로2'].text.to_s.force_encoding('utf-8')
4394
4412
 
4395
- # 내용 배열에서 마지막 빈 항목 제거
4396
- @data['내용설정']['내용'] << []
4397
- @data['내용설정']['내용'].pop
4413
+ # 경로가 유효한지 확인
4414
+ if Dir.exist?(path)
4415
+ Dir.entries(path).each do |file|
4416
+ if file == '.' or file == '..'
4417
+ next
4398
4418
  else
4399
- # 경로가 유효하지 않을 경우, 오류 메시지 출력
4400
- puts "경로가 존재하지 않습니다: #{path}"
4419
+ begin
4420
+ # 파일을 열고 내용을 읽어서 추가
4421
+ file_data = File.open(path + '/' + file, 'r', encoding: 'utf-8').read
4422
+ @data['내용설정']['내용'] << [false, file, file_data]
4423
+ rescue => e
4424
+ # 파일을 열 수 없는 경우, 오류 메시지 출력
4425
+ puts "파일을 열 수 없습니다: #{file}, 오류: #{e.message}"
4426
+ end
4401
4427
  end
4402
- }
4403
- }
4428
+ end
4429
+
4430
+ # 내용 배열에서 마지막 빈 항목 제거
4431
+ @data['내용설정']['내용'] << []
4432
+ @data['내용설정']['내용'].pop
4433
+ else
4434
+ # 경로가 유효하지 않을 경우, 오류 메시지 출력
4435
+ puts "경로가 존재하지 않습니다: #{path}"
4436
+ end
4404
4437
  }
4405
4438
  }
4406
4439
  }
4407
4440
  }
4441
+ }
4442
+ }
4408
4443
  tab_item('이미지설정'){
4409
4444
  horizontal_box{
4410
4445
  vertical_box{
@@ -4878,7 +4913,7 @@ class Wordpress
4878
4913
  left 1
4879
4914
  text 'URL'
4880
4915
  }
4881
- @data['포스트설정']['내용을자동생성'] = checkbox('키워드기반 생성으로만 등록(GPT사용시 자체 생성)'){
4916
+ @data['포스트설정']['내용을자동생성'] = checkbox('키워드기반 글만 등록(GPT사용시 체크 해제)'){
4882
4917
  top 9
4883
4918
  left 0
4884
4919
  on_toggled{
@@ -4886,31 +4921,46 @@ class Wordpress
4886
4921
  @data['포스트설정']['내용과자동생성'].checked = false
4887
4922
  @data['포스트설정']['내용투명'].checked = false
4888
4923
  @data['포스트설정']['자동글 수식에 입력'].checked = false
4889
-
4924
+
4890
4925
  end
4891
4926
  }
4892
4927
  }
4893
-
4928
+ label('※GPT사용시 내용설정 탭에서 설정'){
4929
+ top 9
4930
+ left 1
4931
+ }
4932
+
4933
+ label('※GPT 미 사용시 세팅 권장'){
4934
+ top 9
4935
+ left 3
4936
+ }
4894
4937
 
4895
-
4896
-
4938
+
4897
4939
  aa1 = 2
4898
- @data['포스트설정']['내용과자동생성'] = checkbox('내용파일+키워드기반 생성 등록(GPT사용시 자체 생성)') {
4940
+ @data['포스트설정']['내용과자동생성'] = checkbox('원고+키워드기반 등록(GPT사용시 체크 해제)') {
4899
4941
  top 10 + aa1
4900
4942
  left 0
4901
4943
  on_toggled {
4902
- if @data['포스트설정']['내용과자동생성'].checked?
4944
+ if @data['포스트설정']['내용과자동생성'].checked?
4903
4945
  @data['포스트설정']['내용을자동생성'].checked = false
4904
4946
  @data['포스트설정']['내용투명'].enabled = true # '내용투명' 활성화
4905
4947
  @data['포스트설정']['자동글 수식에 입력'].enabled = true # '내용투명' 활성화
4906
- else
4948
+ else
4907
4949
  @data['포스트설정']['내용투명'].checked = false # 체크 해제
4908
4950
  @data['포스트설정']['내용투명'].enabled = false # 비활성화
4909
4951
  @data['포스트설정']['자동글 수식에 입력'].checked = false # 체크 해제
4910
4952
  @data['포스트설정']['자동글 수식에 입력'].enabled = false # 비활성화
4911
- end
4953
+ end
4912
4954
  }
4913
- }
4955
+ }
4956
+ label('※GPT사용시 내용설정 탭에서 설정'){
4957
+ top 10 + aa1
4958
+ left 1
4959
+ }
4960
+ label('※GPT 미 사용시 세팅 권장'){
4961
+ top 10 + aa1
4962
+ left 3
4963
+ }
4914
4964
 
4915
4965
  @data['포스트설정']['내용투명'] = checkbox('키워드 기반 자동 생성글 안보이게 처리') {
4916
4966
  top 11 + aa1