cafe_buy_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_buy_duo.rb +575 -525
  3. metadata +2 -2
data/lib/cafe_buy_duo.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
@@ -2543,77 +2575,53 @@ class Wordpress
2543
2575
  puts table[10]
2544
2576
  if table[7].to_i > table[10].to_i
2545
2577
  if @data['포스트설정']['테더링'].checked?
2546
- puts 'tethering ip change...'
2547
-
2548
- # ADB devices 확인
2578
+ puts 'Tethering IP change...'
2579
+
2549
2580
  stdout, stderr, status = Open3.capture3('./adb devices')
2550
- if status.success?
2581
+
2582
+ if status.success?
2551
2583
  device_id = stdout.split("\n")[1].split("\t")[0]
2552
2584
  puts device_id
2553
2585
 
2554
2586
  # ADB 서버 초기화
2555
2587
  puts 'adb kill-server'
2556
- Open3.capture3('adb kill-server')
2557
- sleep(2)
2588
+ Open3.capture3('./adb kill-server')
2589
+ sleep(3)
2558
2590
 
2559
2591
  # 다시 ADB 서버 실행
2560
2592
  puts 'adb start-server'
2561
- Open3.capture3('adb start-server')
2562
- sleep(2)
2593
+ Open3.capture3('./adb start-server')
2594
+ sleep(3)
2563
2595
 
2564
2596
  # 데이터를 끄고 켜기
2565
2597
  puts 'adb -s ' + device_id + ' shell svc data disable'
2566
- stdout2, stderr2, status2 = Open3.capture3('./adb -s ' + device_id + ' shell svc data disable')
2567
-
2568
- if status2.success?
2569
- sleep(3)
2570
- puts 'adb -s ' + device_id + ' shell svc data enable'
2571
- Open3.capture3('./adb -s ' + device_id + ' shell svc data enable')
2572
- sleep(3)
2573
- puts 'adb ok'
2574
- sleep(8)
2575
-
2576
- # IP 확인 및 재시도 (반복문 사용)
2577
- retry_count = 0
2578
- max_retries = 5
2579
- current_ip = nil
2580
-
2581
- # 무한 루프 방지
2582
- while retry_count < max_retries
2583
- begin
2584
- http = HTTP.get('https://www.findip.kr/')
2585
- noko = Nokogiri::HTML(http.to_s)
2586
- new_ip = noko.xpath('/html/body/header/h2').text.strip
2587
-
2588
- puts "Current IP: #{@my_ip}, New IP: #{new_ip}"
2589
-
2590
- # IP가 변경되었으면 @my_ip를 갱신하고 종료
2591
- if new_ip != @my_ip
2592
- @my_ip = new_ip
2593
- puts "IP 변경됨: #{@my_ip}"
2594
- break
2595
- else
2596
- puts 'IP가 변경되지 않음. 재시도...'
2597
- retry_count += 1
2598
- sleep(3) # 3초 후 재시도
2599
- end
2600
- rescue => e
2601
- retry_count += 1
2602
- sleep(3) # 3초 후 재시도
2603
- end
2604
-
2605
- # 최대 재시도 횟수를 초과하면 예외 발생시키기
2606
- if retry_count >= max_retries
2607
- raise "최대 재시도 횟수 초과. IP 변경 실패."
2608
- end
2598
+ stdout2, stderr2, status2 = Open3.capture3('./adb -s '+device_id+' shell svc data disable')
2599
+ sleep(3)
2600
+ puts 'adb -s ' + device_id + ' shell svc data enable'
2601
+ Open3.capture3('./adb -s '+device_id+' shell svc data enable')
2602
+ sleep(3)
2603
+ puts 'adb ok'
2604
+ sleep(8)
2605
+
2606
+ robot_ip = lambda do
2607
+ http = HTTP.get('https://www.findip.kr/')
2608
+ noko = Nokogiri::HTML(http.to_s)
2609
+ if noko.xpath('/html/body/header/h2').text != @my_ip
2610
+ @my_ip = noko.xpath('/html/body/header/h2').text
2611
+ puts "IP 변경됨[ #{@my_ip} ]"
2612
+ else
2613
+ puts @my_ip
2614
+ puts '제시도...'
2615
+ sleep(3)
2616
+ robot_ip[]
2609
2617
  end
2610
- else
2611
- puts 'Failed to disable data. Error: ' + stderr2
2612
- end
2618
+ end
2619
+ robot_ip[]
2620
+
2613
2621
  else
2614
- puts 'adb error, unable to get devices. Error: ' + stderr
2622
+ puts 'adb error pass'
2615
2623
  end
2616
- end
2624
+ end
2617
2625
 
2618
2626
 
2619
2627
  check_success = 1
@@ -2633,7 +2641,15 @@ class Wordpress
2633
2641
  end
2634
2642
 
2635
2643
  if @data['포스트설정']['gpt제목'].checked?
2636
- chat = Chat_title.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'))
2644
+ gpt_title_prompt = @data['포스트설정']['gpt제목_프롬프트'].text.to_s.force_encoding('utf-8')
2645
+
2646
+ # 공백을 포함한 빈 문자열을 체크하기 위해 strip을 사용
2647
+ gpt_title_prompt_sample = gpt_title_prompt.strip.empty? ? "프롬프트: 문장을 비슷한 길이로 ChatGPT의 멘트는 빼고 표현을 더 추가해서 하나만 만들어줘." : gpt_title_prompt
2648
+
2649
+ # gpt_title_prompt_sample을 Chat_title 객체에 전달
2650
+ chat = Chat_title.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'), gpt_title_prompt_sample)
2651
+
2652
+ # 메시지 요청 후 title에 저장
2637
2653
  gpt_text1 = chat.message(title)
2638
2654
  title = gpt_text1.to_s
2639
2655
  end
@@ -2678,18 +2694,16 @@ class Wordpress
2678
2694
 
2679
2695
 
2680
2696
  if @data['포스트설정']['gpt내용'].checked?
2697
+ gpt_content_prompt = @data['포스트설정']['gpt내용_프롬프트'].text.to_s.force_encoding('utf-8')
2681
2698
  api_key = @data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8')
2682
- #key_change = @data['포스트설정']['특정단어키워드로변경값'].text.to_s.force_encoding('utf-8')
2683
- #imotcon_change = @data['포스트설정']['스티커로변경단어'].text.to_s.force_encoding('utf-8')
2684
- #template_change = @data['포스트설정']['내템플릿변경단어'].text.to_s.force_encoding('utf-8')
2685
- #ttdanar_change = @data['포스트설정']['단어링크적용단어'].text.to_s.force_encoding('utf-8')
2686
- #sajine_change = @data['포스트설정']['단어사진으로변경단어'].text.to_s.force_encoding('utf-8')
2687
- #mov_change = @data['포스트설정']['영상으로변경단어'].text.to_s.force_encoding('utf-8')
2688
- #map_change = @data['포스트설정']['지도로변경단어'].text.to_s.force_encoding('utf-8')
2689
- #inyong9_change = @data['포스트설정']['인용구변경단어'].text.to_s.force_encoding('utf-8')
2690
-
2691
2699
 
2692
- chat = Chat_content.new(api_key)
2700
+ # 공백을 포함한 빈 문자열을 체크하기 위해 strip을 사용
2701
+ gpt_content_prompt_sample = gpt_content_prompt.strip.empty? ? "프롬프트:ChatGPT의 멘트는 빼고 위 전체적인 내용의 형식을 똑같이 표현을 더 추가하고 유사어로 변경하여 하나 만들어줘! 전화번호,연락처,가격,홈페이지안내 ,상담안내 관련 문구는 유지해야해" : gpt_content_prompt
2702
+
2703
+ # Chat_content 객체 생성 시 api_key와 gpt_content_prompt_sample을 두 개의 인자로 전달
2704
+ chat = Chat_content.new(api_key, gpt_content_prompt_sample)
2705
+
2706
+ # 메시지 요청 후 content에 저장
2693
2707
  gpt_text3 = chat.message(content)
2694
2708
  content = gpt_text3.to_s
2695
2709
  end
@@ -2893,13 +2907,17 @@ class Wordpress
2893
2907
  @data['table'] << []
2894
2908
  @data['table'].pop
2895
2909
  if @data['포스트설정']['gpt키워드'].checked?
2896
- chat = Chat.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'))
2910
+ gpt_keyword_prompt = @data['포스트설정']['gpt키워드_프롬프트'].text.to_s.force_encoding('utf-8')
2911
+ gpt_keyword_prompt_sample = gpt_keyword_prompt.strip.empty? ? "프롬프트: 관련된 글을 1500자에서 2500자 사이로 만들어줘" : gpt_keyword_prompt
2912
+ chat = Chat.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'), gpt_keyword_prompt)
2897
2913
  gpt_text = chat.message(keyword)
2898
- content = content + "\n(자동생성글)\n" + gpt_text
2914
+ #content = content.to_s + "\n(자동생성글)\n" + gpt_text.to_s
2915
+ content = content.to_s + "(자동생성글)" + gpt_text.to_s
2899
2916
  elsif @data['포스트설정']['내용을자동생성'].checked?
2900
2917
  content = auto_text
2901
2918
  elsif @data['포스트설정']['내용과자동생성'].checked?
2902
- content = content + "\n(자동생성글)\n" + auto_text
2919
+ #content = content + "\n(자동생성글)\n" + auto_text
2920
+ content = content + "(자동생성글)" + auto_text
2903
2921
  end
2904
2922
 
2905
2923
  if @data['포스트설정']['내용키워드삽입'].checked?
@@ -2934,7 +2952,8 @@ class Wordpress
2934
2952
  end
2935
2953
 
2936
2954
  if @data['포스트설정']['내용을자동생성'].checked?
2937
- content2 = content.split("\n")
2955
+ #content2 = content.split("\n")
2956
+ content2 = content.split
2938
2957
  end
2939
2958
 
2940
2959
  if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt키워드'].checked?
@@ -4063,423 +4082,439 @@ class Wordpress
4063
4082
  }
4064
4083
  }
4065
4084
  tab_item('내용설정'){
4085
+ horizontal_box{
4086
+ vertical_box{
4066
4087
  horizontal_box{
4067
- vertical_box{
4068
- horizontal_box{
4069
- stretchy false
4070
- button('키워드불러오기'){
4071
- on_clicked{
4072
- file = open_file
4073
- if file != nil
4074
- file_data = File.open(file, 'r', :encoding => 'utf-8').read()
4075
- file_data.split("\n").each do |keyword|
4076
- if keyword.split(' ').join('').length < 2
4077
-
4078
- else
4079
- @data['키워드설정']['키워드'] << [false, keyword]
4080
- @data['키워드설정']['키워드'] << [false, keyword]
4081
- @data['키워드설정']['키워드'].pop
4082
- end
4083
- end
4084
- end
4088
+ stretchy false
4089
+ button('키워드불러오기'){
4090
+ on_clicked{
4091
+ file = open_file
4092
+ if file != nil
4093
+ file_data = File.open(file, 'r', :encoding => 'utf-8').read()
4094
+ file_data.split("\n").each do |keyword|
4095
+ if keyword.split(' ').join('').length < 2
4085
4096
 
4086
- }
4087
- }
4088
-
4089
- }
4090
- horizontal_box{
4091
- stretchy false
4092
- grid{
4093
- button('전체선택'){
4094
- top 1
4095
- left 1
4096
- on_clicked{
4097
- for n in 0..@data['키워드설정']['키워드'].length-1
4098
- @data['키워드설정']['키워드'][n][0] = true
4099
- @data['키워드설정']['키워드'] << []
4100
- @data['키워드설정']['키워드'].pop
4101
- end
4102
- }
4103
- }
4104
- button('선택해제'){
4105
- top 1
4106
- left 2
4107
- on_clicked{
4108
- for n in 0..@data['키워드설정']['키워드'].length-1
4109
- @data['키워드설정']['키워드'][n][0] = false
4110
- @data['키워드설정']['키워드'] << []
4097
+ else
4098
+ @data['키워드설정']['키워드'] << [false, keyword]
4099
+ @data['키워드설정']['키워드'] << [false, keyword]
4111
4100
  @data['키워드설정']['키워드'].pop
4112
4101
  end
4113
- }
4114
- }
4115
- button('삭제하기'){
4116
- top 1
4117
- left 3
4118
- on_clicked{
4119
- m = Array.new
4120
- for n in 0..@data['키워드설정']['키워드'].length-1
4121
- if @data['키워드설정']['키워드'][n][0] == true
4122
- m << n
4123
- end
4124
- end
4102
+ end
4103
+ end
4125
4104
 
4126
- m.reverse.each do |i|
4127
- @data['키워드설정']['키워드'].delete_at(i)
4128
- end
4129
- @data['키워드설정']['키워드'].delete(nil)
4130
- }
4131
- }
4132
4105
  }
4133
-
4134
- @data['키워드설정']['순서사용'] = checkbox('순서사용'){
4135
- stretchy false
4136
- on_toggled{ |c|
4137
- if c.checked?
4138
- @data['키워드설정']['랜덤사용'].checked = false
4139
- end
4140
- }
4141
- }
4142
- @data['키워드설정']['랜덤사용'] = checkbox('랜덤사용'){
4143
- stretchy false
4144
- on_toggled{ |c|
4145
- if c.checked?
4146
- @data['키워드설정']['순서사용'].checked = false
4147
- end
4148
- }
4149
- }
4106
+ }
4107
+
4108
+ }
4109
+ horizontal_box{
4110
+ stretchy false
4111
+ grid{
4112
+ button('전체선택'){
4113
+ top 1
4114
+ left 1
4115
+ on_clicked{
4116
+ for n in 0..@data['키워드설정']['키워드'].length-1
4117
+ @data['키워드설정']['키워드'][n][0] = true
4118
+ @data['키워드설정']['키워드'] << []
4119
+ @data['키워드설정']['키워드'].pop
4120
+ end
4150
4121
  }
4151
- vertical_separator{
4152
- stretchy false
4122
+ }
4123
+ button('선택해제'){
4124
+ top 1
4125
+ left 2
4126
+ on_clicked{
4127
+ for n in 0..@data['키워드설정']['키워드'].length-1
4128
+ @data['키워드설정']['키워드'][n][0] = false
4129
+ @data['키워드설정']['키워드'] << []
4130
+ @data['키워드설정']['키워드'].pop
4131
+ end
4153
4132
  }
4154
- horizontal_box{
4155
- stretchy false
4156
- grid{
4157
- @data['포스트설정']['gpt키워드'] = checkbox('GPT 키워드 기반 글 생성'){
4158
- top 1
4159
- left 0
4160
- #enabled false # 기본적으로 비활성화
4161
- on_toggled {
4162
- if @data['포스트설정']['gpt키워드'].checked?
4163
- @data['포스트설정']['gpt상단'].enabled = true # '내용투명' 활성화
4164
- @data['포스트설정']['gpt하단'].enabled = true # '내용투명' 활성화
4165
- else
4166
- @data['포스트설정']['gpt상단'].checked = false # 체크 해제
4167
- @data['포스트설정']['gpt상단'].enabled = false # 비활성화
4168
- @data['포스트설정']['gpt하단'].checked = false # 체크 해제
4169
- @data['포스트설정']['gpt하단'].enabled = false # 비활성화
4170
- end
4171
- }
4172
-
4173
- }
4174
-
4175
- @data['포스트설정']['gpt상단'] = checkbox('원고 위에 넣기'){
4176
- top 1
4177
- left 1
4178
- enabled false # 기본적으로 비활성화
4179
- on_toggled{
4180
- if @data['포스트설정']['gpt상단'].checked?
4181
- @data['포스트설정']['gpt하단'].checked = false
4182
- end
4183
- }
4184
- }
4185
-
4186
- @data['포스트설정']['gpt하단'] = checkbox('원고 아래 넣기'){
4187
- top 1
4188
- left 2
4189
- enabled false # 기본적으로 비활성화
4190
- on_toggled{
4191
- if @data['포스트설정']['gpt하단'].checked?
4192
- @data['포스트설정']['gpt상단'].checked = false
4133
+ }
4134
+ button('삭제하기'){
4135
+ top 1
4136
+ left 3
4137
+ on_clicked{
4138
+ m = Array.new
4139
+ for n in 0..@data['키워드설정']['키워드'].length-1
4140
+ if @data['키워드설정']['키워드'][n][0] == true
4141
+ m << n
4193
4142
  end
4194
- }
4195
- }
4196
- } }
4197
- horizontal_box{
4198
- stretchy false
4199
- grid{
4200
- label('※ GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
4201
- } } }
4202
-
4203
-
4204
- table{
4205
- checkbox_column('선택'){
4206
- editable true
4207
- }
4208
- text_column('키워드'){
4209
-
4210
- }
4143
+ end
4211
4144
 
4212
- cell_rows @data['키워드설정']['키워드']
4145
+ m.reverse.each do |i|
4146
+ @data['키워드설정']['키워드'].delete_at(i)
4147
+ end
4148
+ @data['키워드설정']['키워드'].delete(nil)
4213
4149
  }
4214
-
4215
-
4216
-
4217
4150
  }
4218
- vertical_separator{
4151
+ }
4152
+
4153
+ @data['키워드설정']['순서사용'] = checkbox('순서사용'){
4219
4154
  stretchy false
4155
+ on_toggled{ |c|
4156
+ if c.checked?
4157
+ @data['키워드설정']['랜덤사용'].checked = false
4158
+ end
4159
+ }
4160
+ }
4161
+ @data['키워드설정']['랜덤사용'] = checkbox('랜덤사용'){
4162
+ stretchy false
4163
+ on_toggled{ |c|
4164
+ if c.checked?
4165
+ @data['키워드설정']['순서사용'].checked = false
4166
+ end
4167
+ }
4168
+ }
4169
+ }
4170
+ vertical_separator{
4171
+ stretchy false
4172
+ }
4173
+ horizontal_box{
4174
+ stretchy false
4175
+ grid{
4176
+ @data['포스트설정']['gpt키워드'] = checkbox('GPT 키워드 기반 글 생성'){
4177
+ top 1
4178
+ left 0
4179
+ #enabled false # 기본적으로 비활성화
4180
+ on_toggled {
4181
+ if @data['포스트설정']['gpt키워드'].checked?
4182
+ @data['포스트설정']['gpt상단'].enabled = true # '내용투명' 활성화
4183
+ @data['포스트설정']['gpt하단'].enabled = true # '내용투명' 활성화
4184
+ else
4185
+ @data['포스트설정']['gpt상단'].checked = false # 체크 해제
4186
+ @data['포스트설정']['gpt상단'].enabled = false # 비활성화
4187
+ @data['포스트설정']['gpt하단'].checked = false # 체크 해제
4188
+ @data['포스트설정']['gpt하단'].enabled = false # 비활성화
4189
+ end
4190
+ }
4191
+
4192
+ }
4193
+
4194
+ @data['포스트설정']['gpt상단'] = checkbox('원고 위에 넣기'){
4195
+ top 1
4196
+ left 1
4197
+ enabled false # 기본적으로 비활성화
4198
+ on_toggled{
4199
+ if @data['포스트설정']['gpt상단'].checked?
4200
+ @data['포스트설정']['gpt하단'].checked = false
4201
+ end
4202
+ }
4220
4203
  }
4221
- vertical_box{
4222
- horizontal_box{
4223
- stretchy false
4224
- button('제목불러오기'){
4225
- on_clicked{
4226
- file = open_file
4227
- if file != nil
4228
- file_data = File.open(file, 'r', :encoding => 'utf-8').read()
4229
- file_data.split("\n").each do |title|
4230
- if title.split(" ").join('').length < 2
4231
-
4232
- else
4233
- @data['제목설정']['제목'] << [false, title]
4234
- @data['제목설정']['제목'] << [false, title]
4235
- @data['제목설정']['제목'].pop
4236
- end
4237
- end
4238
- end
4239
- }
4240
- }
4241
4204
 
4205
+ @data['포스트설정']['gpt하단'] = checkbox('원고 아래 넣기'){
4206
+ top 1
4207
+ left 2
4208
+ enabled false # 기본적으로 비활성화
4209
+ on_toggled{
4210
+ if @data['포스트설정']['gpt하단'].checked?
4211
+ @data['포스트설정']['gpt상단'].checked = false
4212
+ end
4242
4213
  }
4243
- horizontal_box{
4244
- stretchy false
4245
- grid{
4246
- button('전체선택'){
4247
- top 1
4248
- left 1
4249
- on_clicked{
4250
- for n in 0..@data['제목설정']['제목'].length-1
4251
- @data['제목설정']['제목'][n][0] = true
4252
- @data['제목설정']['제목'] << []
4253
- @data['제목설정']['제목'].pop
4254
- end
4255
- }
4256
- }
4257
- button('선택해제'){
4258
- top 1
4259
- left 2
4260
- on_clicked{
4261
- for n in 0..@data['제목설정']['제목'].length-1
4262
- @data['제목설정']['제목'][n][0] = false
4263
- @data['제목설정']['제목'] << []
4214
+ }
4215
+ } }
4216
+ horizontal_box{
4217
+ stretchy false
4218
+ @data['포스트설정']['gpt키워드_프롬프트'] = entry(){
4219
+ text '프롬프트:관련 글을 1500자에서 2500자 사이로 만들어줘'
4220
+ }}
4221
+ horizontal_box{
4222
+ stretchy false
4223
+ grid{
4224
+ label('※ GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
4225
+ } } }
4226
+
4227
+
4228
+ table{
4229
+ checkbox_column('선택'){
4230
+ editable true
4231
+ }
4232
+ text_column('키워드'){
4233
+
4234
+ }
4235
+
4236
+ cell_rows @data['키워드설정']['키워드']
4237
+ }
4238
+
4239
+
4240
+
4241
+ }
4242
+ vertical_separator{
4243
+ stretchy false
4244
+ }
4245
+ vertical_box{
4246
+ horizontal_box{
4247
+ stretchy false
4248
+ button('제목불러오기'){
4249
+ on_clicked{
4250
+ file = open_file
4251
+ if file != nil
4252
+ file_data = File.open(file, 'r', :encoding => 'utf-8').read()
4253
+ file_data.split("\n").each do |title|
4254
+ if title.split(" ").join('').length < 2
4255
+
4256
+ else
4257
+ @data['제목설정']['제목'] << [false, title]
4258
+ @data['제목설정']['제목'] << [false, title]
4264
4259
  @data['제목설정']['제목'].pop
4265
4260
  end
4266
- }
4267
- }
4268
- button('삭제하기'){
4269
- top 1
4270
- left 3
4271
- on_clicked{
4272
- m = Array.new
4273
- for n in 0..@data['제목설정']['제목'].length-1
4274
- if @data['제목설정']['제목'][n][0] == true
4275
- m << n
4276
- end
4277
- end
4261
+ end
4262
+ end
4263
+ }
4264
+ }
4278
4265
 
4279
- m.reverse.each do |i|
4280
- @data['제목설정']['제목'].delete_at(i)
4281
- end
4282
- @data['제목설정']['제목'].delete(nil)
4283
- }
4284
- }
4266
+ }
4267
+ horizontal_box{
4268
+ stretchy false
4269
+ grid{
4270
+ button('전체선택'){
4271
+ top 1
4272
+ left 1
4273
+ on_clicked{
4274
+ for n in 0..@data['제목설정']['제목'].length-1
4275
+ @data['제목설정']['제목'][n][0] = true
4276
+ @data['제목설정']['제목'] << []
4277
+ @data['제목설정']['제목'].pop
4278
+ end
4285
4279
  }
4286
- @data['제목설정']['순서사용'] = checkbox('순서사용'){
4287
- stretchy false
4288
- on_toggled{ |c|
4289
- if c.checked?
4290
- @data['제목설정']['랜덤사용'].checked = false
4291
- end
4292
- }
4293
- }
4294
- @data['제목설정']['랜덤사용'] = checkbox('랜덤사용'){
4295
- stretchy false
4296
- on_toggled{ |c|
4297
- if c.checked?
4298
- @data['제목설정']['순서사용'].checked = false
4299
- end
4300
- }
4301
- }
4280
+ }
4281
+ button('선택해제'){
4282
+ top 1
4283
+ left 2
4284
+ on_clicked{
4285
+ for n in 0..@data['제목설정']['제목'].length-1
4286
+ @data['제목설정']['제목'][n][0] = false
4287
+ @data['제목설정']['제목'] << []
4288
+ @data['제목설정']['제목'].pop
4289
+ end
4302
4290
  }
4303
- vertical_separator{
4304
- stretchy false
4291
+ }
4292
+ button('삭제하기'){
4293
+ top 1
4294
+ left 3
4295
+ on_clicked{
4296
+ m = Array.new
4297
+ for n in 0..@data['제목설정']['제목'].length-1
4298
+ if @data['제목설정']['제목'][n][0] == true
4299
+ m << n
4300
+ end
4301
+ end
4302
+
4303
+ m.reverse.each do |i|
4304
+ @data['제목설정']['제목'].delete_at(i)
4305
+ end
4306
+ @data['제목설정']['제목'].delete(nil)
4305
4307
  }
4306
- horizontal_box{
4307
- stretchy false
4308
- grid{
4309
- @data['포스트설정']['gpt제목'] = checkbox('제목을 이용해 GPT로 비슷한 제목 생성'){
4310
-
4311
-
4312
- }}}
4313
- horizontal_box{
4314
- stretchy false
4315
- grid{
4316
- label(' GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
4317
- } } }
4318
-
4308
+ }
4309
+ }
4310
+ @data['제목설정']['순서사용'] = checkbox('순서사용'){
4311
+ stretchy false
4312
+ on_toggled{ |c|
4313
+ if c.checked?
4314
+ @data['제목설정']['랜덤사용'].checked = false
4315
+ end
4316
+ }
4317
+ }
4318
+ @data['제목설정']['랜덤사용'] = checkbox('랜덤사용'){
4319
+ stretchy false
4320
+ on_toggled{ |c|
4321
+ if c.checked?
4322
+ @data['제목설정']['순서사용'].checked = false
4323
+ end
4324
+ }
4325
+ }
4326
+ }
4327
+ vertical_separator{
4328
+ stretchy false
4329
+ }
4330
+ horizontal_box{
4331
+ stretchy false
4332
+ grid{
4333
+ @data['포스트설정']['gpt제목'] = checkbox('제목을 이용해 GPT로 비슷한 제목 생성'){
4334
+
4335
+
4336
+ }}}
4337
+ horizontal_box{
4338
+ stretchy false
4339
+ @data['포스트설정']['gpt제목_프롬프트'] = entry(){
4340
+ text '프롬프트:비슷한 길이로 제목으로 사용할수있게 하나만 만들어줘'
4341
+ }}
4342
+ horizontal_box{
4343
+ stretchy false
4344
+ grid{
4345
+ label('※ GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
4346
+ } } }
4347
+
4319
4348
 
4320
- table{
4321
- checkbox_column('선택'){
4322
- editable true
4323
- }
4324
- text_column('제목'){
4349
+ table{
4350
+ checkbox_column('선택'){
4351
+ editable true
4352
+ }
4353
+ text_column('제목'){
4325
4354
 
4326
- }
4355
+ }
4327
4356
 
4328
- cell_rows @data['제목설정']['제목']
4329
- }
4330
-
4357
+ cell_rows @data['제목설정']['제목']
4358
+ }
4359
+
4331
4360
 
4361
+ }
4362
+ vertical_separator{
4363
+ stretchy false
4364
+ }
4365
+ vertical_box{
4366
+ horizontal_box{
4367
+ stretchy false
4368
+ button('내용불러오기'){
4369
+ on_clicked{
4370
+ file = open_file
4371
+ if file != nil
4372
+ file_name = file.split("\\")[-1]
4373
+ file_data = File.open(file,'r', :encoding => 'utf-8').read()
4374
+ if file_data.split("\n").length < 2
4375
+ file_data = file_data + "\n"
4376
+ end
4377
+ @data['내용설정']['내용'] << [false, file_name, file_data]
4378
+ @data['내용설정']['내용'] << [false, file_name, file_data]
4379
+ @data['내용설정']['내용'].pop
4380
+ end
4381
+ }
4332
4382
  }
4333
- vertical_separator{
4334
- stretchy false
4335
- }
4336
- vertical_box{
4337
- horizontal_box{
4338
- stretchy false
4339
- button('내용불러오기'){
4340
- on_clicked{
4341
- file = open_file
4342
- if file != nil
4343
- file_name = file.split("\\")[-1]
4344
- file_data = File.open(file,'r', :encoding => 'utf-8').read()
4345
- if file_data.split("\n").length < 2
4346
- file_data = file_data + "\n"
4347
- end
4348
- @data['내용설정']['내용'] << [false, file_name, file_data]
4349
- @data['내용설정']['내용'] << [false, file_name, file_data]
4350
- @data['내용설정']['내용'].pop
4351
- end
4352
- }
4353
- }
4354
4383
 
4384
+ }
4385
+ horizontal_box{
4386
+ stretchy false
4387
+ grid{
4388
+ button('전체선택'){
4389
+ top 1
4390
+ left 1
4391
+ on_clicked{
4392
+ for n in 0..@data['내용설정']['내용'].length-1
4393
+ @data['내용설정']['내용'][n][0] = true
4394
+ @data['내용설정']['내용'] << []
4395
+ @data['내용설정']['내용'].pop
4396
+ end
4355
4397
  }
4356
- horizontal_box{
4357
- stretchy false
4358
- grid{
4359
- button('전체선택'){
4360
- top 1
4361
- left 1
4362
- on_clicked{
4363
- for n in 0..@data['내용설정']['내용'].length-1
4364
- @data['내용설정']['내용'][n][0] = true
4365
- @data['내용설정']['내용'] << []
4366
- @data['내용설정']['내용'].pop
4367
- end
4368
- }
4369
- }
4370
- button('선택해제'){
4371
- top 1
4372
- left 2
4373
- on_clicked{
4374
- for n in 0..@data['내용설정']['내용'].length-1
4375
- @data['내용설정']['내용'][n][0] = false
4376
- @data['내용설정']['내용'] << []
4377
- @data['내용설정']['내용'].pop
4378
- end
4379
- }
4380
- }
4381
- button('삭제하기'){
4382
- top 1
4383
- left 3
4384
- on_clicked{
4385
- m = Array.new
4386
- for n in 0..@data['내용설정']['내용'].length-1
4387
- if @data['내용설정']['내용'][n][0] == true
4388
- m << n
4389
- end
4390
- end
4398
+ }
4399
+ button('선택해제'){
4400
+ top 1
4401
+ left 2
4402
+ on_clicked{
4403
+ for n in 0..@data['내용설정']['내용'].length-1
4404
+ @data['내용설정']['내용'][n][0] = false
4405
+ @data['내용설정']['내용'] << []
4406
+ @data['내용설정']['내용'].pop
4407
+ end
4408
+ }
4409
+ }
4410
+ button('삭제하기'){
4411
+ top 1
4412
+ left 3
4413
+ on_clicked{
4414
+ m = Array.new
4415
+ for n in 0..@data['내용설정']['내용'].length-1
4416
+ if @data['내용설정']['내용'][n][0] == true
4417
+ m << n
4418
+ end
4419
+ end
4391
4420
 
4392
- m.reverse.each do |i|
4393
- @data['내용설정']['내용'].delete_at(i)
4394
- end
4395
- @data['내용설정']['내용'].delete(nil)
4396
- }
4397
- }
4421
+ m.reverse.each do |i|
4422
+ @data['내용설정']['내용'].delete_at(i)
4423
+ end
4424
+ @data['내용설정']['내용'].delete(nil)
4398
4425
  }
4399
- @data['내용설정']['순서사용'] = checkbox('순서사용'){
4400
- stretchy false
4401
- on_toggled{ |c|
4402
- if c.checked?
4403
- @data['내용설정']['랜덤사용'].checked = false
4404
- end
4405
- }
4406
- }
4407
- @data['내용설정']['랜덤사용'] = checkbox('랜덤사용'){
4408
- stretchy false
4409
- on_toggled{ |c|
4410
- if c.checked?
4411
- @data['내용설정']['순서사용'].checked = false
4412
- end
4413
- }
4414
- }
4426
+ }
4427
+ }
4428
+ @data['내용설정']['순서사용'] = checkbox('순서사용'){
4429
+ stretchy false
4430
+ on_toggled{ |c|
4431
+ if c.checked?
4432
+ @data['내용설정']['랜덤사용'].checked = false
4433
+ end
4415
4434
  }
4416
- vertical_separator{
4417
- stretchy false
4435
+ }
4436
+ @data['내용설정']['랜덤사용'] = checkbox('랜덤사용'){
4437
+ stretchy false
4438
+ on_toggled{ |c|
4439
+ if c.checked?
4440
+ @data['내용설정']['순서사용'].checked = false
4441
+ end
4418
4442
  }
4419
- horizontal_box{
4420
- stretchy false
4421
- grid{
4422
- @data['포스트설정']['gpt내용'] = checkbox('내용파일을 이용해 GPT로 글 변형'){
4423
-
4424
-
4425
- }}}
4426
- horizontal_box{
4427
- stretchy false
4428
- grid{
4429
- label('※ GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
4430
- } } }
4431
-
4432
- table{
4433
- checkbox_column('선택'){
4434
- editable true
4435
- }
4436
- text_column('내용파일'){
4443
+ }
4444
+ }
4445
+ vertical_separator{
4446
+ stretchy false
4447
+ }
4448
+ horizontal_box{
4449
+ stretchy false
4450
+ grid{
4451
+ @data['포스트설정']['gpt내용'] = checkbox('내용파일을 이용해 GPT로 글 변형'){
4452
+
4453
+
4454
+ }}}
4455
+ horizontal_box{
4456
+ stretchy false
4457
+ @data['포스트설정']['gpt내용_프롬프트'] = entry(){
4458
+ text '프롬프트:동의어,유사어를 이용해 변경해줘'
4459
+ }}
4460
+ horizontal_box{
4461
+ stretchy false
4462
+ grid{
4463
+ label('※ GPT 기능 사용시 포스트설정1에서 GPT사용에 체크 필수'){
4464
+ } } }
4465
+
4466
+ table{
4467
+ checkbox_column('선택'){
4468
+ editable true
4469
+ }
4470
+ text_column('내용파일'){
4437
4471
 
4438
- }
4472
+ }
4439
4473
 
4440
- cell_rows @data['내용설정']['내용']
4441
- }
4474
+ cell_rows @data['내용설정']['내용']
4475
+ }
4442
4476
 
4443
- horizontal_box{
4444
- stretchy false
4445
- @data['이미지설정']['폴더경로2'] = entry{
4446
- stretchy false
4447
- text "내용폴더경로 ex)C:\\내용\\폴더1"
4448
- }
4449
- button('폴더째로 불러오기') {
4450
- on_clicked {
4451
- path = @data['이미지설정']['폴더경로2'].text.to_s.force_encoding('utf-8')
4477
+ horizontal_box{
4478
+ stretchy false
4479
+ @data['이미지설정']['폴더경로2'] = entry{
4480
+ stretchy false
4481
+ text "내용폴더경로 ex)C:\\내용\\폴더1"
4482
+ }
4452
4483
 
4453
- # 경로가 유효한지 확인
4454
- if Dir.exist?(path)
4455
- Dir.entries(path).each do |file|
4456
- if file == '.' or file == '..'
4457
- next
4458
- else
4459
- begin
4460
- # 파일을 열고 내용을 읽어서 추가
4461
- file_data = File.open(path + '/' + file, 'r', encoding: 'utf-8').read
4462
- @data['내용설정']['내용'] << [false, file, file_data]
4463
- rescue => e
4464
- # 파일을 열 수 없는 경우, 오류 메시지 출력
4465
- puts "파일을 열 수 없습니다: #{file}, 오류: #{e.message}"
4466
- end
4467
- end
4468
- end
4484
+ button('폴더째로 불러오기') {
4485
+ on_clicked {
4486
+ path = @data['이미지설정']['폴더경로2'].text.to_s.force_encoding('utf-8')
4469
4487
 
4470
- # 내용 배열에서 마지막 빈 항목 제거
4471
- @data['내용설정']['내용'] << []
4472
- @data['내용설정']['내용'].pop
4488
+ # 경로가 유효한지 확인
4489
+ if Dir.exist?(path)
4490
+ Dir.entries(path).each do |file|
4491
+ if file == '.' or file == '..'
4492
+ next
4473
4493
  else
4474
- # 경로가 유효하지 않을 경우, 오류 메시지 출력
4475
- puts "경로가 존재하지 않습니다: #{path}"
4494
+ begin
4495
+ # 파일을 열고 내용을 읽어서 추가
4496
+ file_data = File.open(path + '/' + file, 'r', encoding: 'utf-8').read
4497
+ @data['내용설정']['내용'] << [false, file, file_data]
4498
+ rescue => e
4499
+ # 파일을 열 수 없는 경우, 오류 메시지 출력
4500
+ puts "파일을 열 수 없습니다: #{file}, 오류: #{e.message}"
4501
+ end
4476
4502
  end
4477
- }
4478
- }
4503
+ end
4504
+
4505
+ # 내용 배열에서 마지막 빈 항목 제거
4506
+ @data['내용설정']['내용'] << []
4507
+ @data['내용설정']['내용'].pop
4508
+ else
4509
+ # 경로가 유효하지 않을 경우, 오류 메시지 출력
4510
+ puts "경로가 존재하지 않습니다: #{path}"
4511
+ end
4479
4512
  }
4480
4513
  }
4481
4514
  }
4482
4515
  }
4516
+ }
4517
+ }
4483
4518
  tab_item('이미지설정'){
4484
4519
  horizontal_box{
4485
4520
  vertical_box{
@@ -4953,7 +4988,7 @@ class Wordpress
4953
4988
  left 1
4954
4989
  text 'URL'
4955
4990
  }
4956
- @data['포스트설정']['내용을자동생성'] = checkbox('키워드기반 생성으로만 등록(GPT사용시 자체 생성)'){
4991
+ @data['포스트설정']['내용을자동생성'] = checkbox('키워드기반 글만 등록(GPT사용시 체크 해제)'){
4957
4992
  top 9
4958
4993
  left 0
4959
4994
  on_toggled{
@@ -4961,31 +4996,46 @@ class Wordpress
4961
4996
  @data['포스트설정']['내용과자동생성'].checked = false
4962
4997
  @data['포스트설정']['내용투명'].checked = false
4963
4998
  @data['포스트설정']['자동글 수식에 입력'].checked = false
4964
-
4999
+
4965
5000
  end
4966
5001
  }
4967
5002
  }
4968
-
5003
+ label('※GPT사용시 내용설정 탭에서 설정'){
5004
+ top 9
5005
+ left 1
5006
+ }
5007
+
5008
+ label('※GPT 미 사용시 세팅 권장'){
5009
+ top 9
5010
+ left 3
5011
+ }
4969
5012
 
4970
-
4971
-
5013
+
4972
5014
  aa1 = 2
4973
- @data['포스트설정']['내용과자동생성'] = checkbox('내용파일+키워드기반 생성 등록(GPT사용시 자체 생성)') {
5015
+ @data['포스트설정']['내용과자동생성'] = checkbox('원고+키워드기반 등록(GPT사용시 체크 해제)') {
4974
5016
  top 10 + aa1
4975
5017
  left 0
4976
5018
  on_toggled {
4977
- if @data['포스트설정']['내용과자동생성'].checked?
5019
+ if @data['포스트설정']['내용과자동생성'].checked?
4978
5020
  @data['포스트설정']['내용을자동생성'].checked = false
4979
5021
  @data['포스트설정']['내용투명'].enabled = true # '내용투명' 활성화
4980
5022
  @data['포스트설정']['자동글 수식에 입력'].enabled = true # '내용투명' 활성화
4981
- else
5023
+ else
4982
5024
  @data['포스트설정']['내용투명'].checked = false # 체크 해제
4983
5025
  @data['포스트설정']['내용투명'].enabled = false # 비활성화
4984
5026
  @data['포스트설정']['자동글 수식에 입력'].checked = false # 체크 해제
4985
5027
  @data['포스트설정']['자동글 수식에 입력'].enabled = false # 비활성화
4986
- end
5028
+ end
4987
5029
  }
4988
- }
5030
+ }
5031
+ label('※GPT사용시 내용설정 탭에서 설정'){
5032
+ top 10 + aa1
5033
+ left 1
5034
+ }
5035
+ label('※GPT 미 사용시 세팅 권장'){
5036
+ top 10 + aa1
5037
+ left 3
5038
+ }
4989
5039
 
4990
5040
  @data['포스트설정']['내용투명'] = checkbox('키워드 기반 자동 생성글 안보이게 처리') {
4991
5041
  top 11 + aa1