nblog_duo 111.117.999 → 111.120.001

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/nblog_duo.rb +248 -73
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f8e72013aaa30c65559b9382524592ea6f68986d2b0c57078fb7d63ed3c8dd7f
4
- data.tar.gz: cf658060bcacbbc4eb3ced2b740ebe2662dea638f28974393e720a5d0d802d09
3
+ metadata.gz: efa881c404a2b73abfcf72dec471351cad68e8b32d673f618b97e12a7b5576f8
4
+ data.tar.gz: 25843ebb12c59f00fa36bba1e70bdbe670503e67b8a2d31334c8b68ec00c8b18
5
5
  SHA512:
6
- metadata.gz: 6f173690db3bae4fa18c042faf082c5bf544e742283be4eb546709f6f8e51cc30c2bb7ba38ab8ce9e1ba7a95e5b000691acff1804db40f867ae2d458d199027e
7
- data.tar.gz: 93c0c850c225241143f4f3618b60e740e2be456e01b55a20fc580642e08960e07c5ee336318a9c4e48378acb1b780800a4b43335a07b97976dee5dc3c4de1e2c
6
+ metadata.gz: 33818d85d4c36faf98aa79ca8a3d9182dc869e70305b02e95a608ff146a9e4a0c643c2bad6d599e939e5b3d2d2cfecf4408d345139af38f8714a550f9b42c44e
7
+ data.tar.gz: 81e22e9e1a697c2420156095106263740b5f0ef8fae1e42255fa824791a396fb457d6c11e9c9c7ff036084337b5308f1583e0a78db4a6b37a33539255d9d9922
data/lib/nblog_duo.rb CHANGED
@@ -22,15 +22,15 @@ require 'httpclient'
22
22
  include AutoClickMethods
23
23
  using Rainbow
24
24
  include Glimmer
25
-
26
25
  class Chat
27
- def initialize(api_key, gpt_keyword_prompt)
26
+ def initialize(api_key, gpt_keyword_prompt, model)
28
27
  @api_key = api_key
29
28
  @gpt_keyword_prompt = gpt_keyword_prompt
29
+ @model = model # 모델을 인자로 받도록 수정
30
30
  end
31
31
 
32
32
  def message(keyword)
33
- puts 'Sending request to GPT...(키워드 기반 글 생성 중...)'
33
+ puts 'Sending request to GPT...(키워드 기반 글 생성 중...)'.cyan
34
34
 
35
35
  # "키워드 기반 글 생성 중..." 메시지 출력 스레드
36
36
  thread = Thread.new do
@@ -54,7 +54,7 @@ class Chat
54
54
 
55
55
  # 요청 데이터 설정
56
56
  data = {
57
- 'model' => 'gpt-4',
57
+ 'model' => @model,
58
58
  'messages' => [
59
59
  {
60
60
  "role" => "assistant",
@@ -64,9 +64,10 @@ class Chat
64
64
  'max_tokens' => max_response_tokens # 최대 응답 토큰 설정
65
65
  }
66
66
 
67
-
68
-
69
67
  answer = ''
68
+ retry_count = 0
69
+ max_retries = 5 # 최대 재시도 횟수
70
+
70
71
  begin
71
72
  req = HTTP.headers(headers).post(url, :json => data)
72
73
 
@@ -77,7 +78,6 @@ class Chat
77
78
 
78
79
  # 응답 내용 출력 (디버깅용)
79
80
  response = JSON.parse(req.to_s)
80
-
81
81
 
82
82
  # 응답 데이터에서 안전하게 값 추출
83
83
  if response['choices'] && response['choices'][0] && response['choices'][0]['message']
@@ -88,14 +88,21 @@ class Chat
88
88
  rescue => e
89
89
  # 오류 메시지 출력
90
90
  puts "Error occurred: #{e.message}"
91
- answer = "오류가 발생했습니다."
91
+ if e.message.include?('502') && retry_count < max_retries
92
+ retry_count += 1
93
+ puts "Retrying... Attempt ##{retry_count}"
94
+ sleep(5) # 잠시 대기 후 재시도
95
+ retry
96
+ else
97
+ answer = "오류가 발생했습니다."
98
+ end
92
99
  end
93
100
 
94
101
  # "생성 중..." 메시지 출력 종료
95
102
  thread.kill
96
103
 
97
104
  # 결과 로그 출력
98
- puts "Final API response ==> #{answer}"
105
+ puts "Final API response ==> #{answer}".cyan
99
106
  return answer
100
107
  end
101
108
 
@@ -108,16 +115,16 @@ end
108
115
 
109
116
 
110
117
 
111
-
112
-
113
118
  class Chat_title
114
- def initialize(api_key, gpt_title_prompt)
119
+ def initialize(api_key, gpt_title_prompt, model)
115
120
  @api_key = api_key
116
121
  @gpt_title_prompt = gpt_title_prompt
122
+ @model = model # 모델을 인자로 받도록 수정
117
123
  end
118
124
 
119
125
  def message(title)
120
- puts 'Sending request to GPT...(제목 생성 중...)'
126
+ puts 'Sending request to GPT...(제목 생성 중...)'.cyan
127
+
121
128
  # "키워드 기반 글 생성 중..." 메시지를 별도 스레드로 처리
122
129
  thread = Thread.new do
123
130
  while true
@@ -125,13 +132,15 @@ class Chat_title
125
132
  sleep(3)
126
133
  end
127
134
  end
135
+
128
136
  url = 'https://api.openai.com/v1/chat/completions'
129
137
  headers = {
130
138
  'Content-Type' => 'application/json',
131
139
  'Authorization' => 'Bearer ' + @api_key
132
140
  }
141
+
133
142
  data = {
134
- 'model' => 'gpt-4',
143
+ 'model' => @model,
135
144
  'messages' => [{
136
145
  "role" => "system",
137
146
  "content" => "너는 매우 친절하고 성의 있게 답변하는 AI 어시스턴트야."
@@ -142,11 +151,14 @@ class Chat_title
142
151
  }]
143
152
  }
144
153
 
154
+ answer = ''
155
+ retry_count = 0
156
+ max_retries = 5 # 최대 재시도 횟수
157
+
145
158
  begin
146
159
  req = HTTP.headers(headers).post(url, json: data)
147
160
 
148
161
  response = JSON.parse(req.body.to_s)
149
-
150
162
 
151
163
  if req.status == 429
152
164
  return "API 요청 제한을 초과했습니다. 플랜 및 할당량을 확인하세요."
@@ -161,28 +173,37 @@ class Chat_title
161
173
  answer ||= title # 응답이 없을 경우 기본 메시지 설정
162
174
  rescue => e
163
175
  puts "Error: #{e.message}"
164
- answer = "오류가 발생했습니다."
176
+ if e.message.include?('502') && retry_count < max_retries
177
+ retry_count += 1
178
+ puts "Retrying... Attempt ##{retry_count}"
179
+ sleep(5) # 잠시 대기 후 재시도
180
+ retry
181
+ else
182
+ answer = "오류가 발생했습니다."
183
+ end
165
184
  end
166
185
 
167
186
  # "생성 중..." 메시지 출력 종료
168
187
  thread.kill
169
188
 
170
- puts 'API return ==> '
171
- puts answer
189
+ puts 'API return ==> '.cyan
190
+ puts answer.cyan
172
191
  answer
173
192
  end
174
193
  end
175
194
 
176
195
 
177
196
  class Chat_content
178
- def initialize(api_key, gpt_content_prompt)
197
+ def initialize(api_key, gpt_content_prompt, model)
179
198
  @api_key = api_key
180
199
  @gpt_content_prompt = gpt_content_prompt
200
+ @model = model # 모델을 인자로 받도록 수정
181
201
  end
182
202
 
183
203
  def message(content)
184
- puts '주의:GPT 특성상 원고 길이가 공백 포함 4천자를 넘기면 오류가 발생할 수 있습니다.'
185
- puts 'Sending request to GPT...(내용 변형 중...)'
204
+ puts '주의:GPT 특성상 원고 길이가 공백 포함 4천자를 넘기면 오류가 발생할 수 있습니다.'.cyan
205
+ puts 'Sending request to GPT...(내용 변형 중...)'.cyan
206
+
186
207
  # "키워드 기반 글 생성 중..." 메시지를 별도 스레드로 처리
187
208
  thread = Thread.new do
188
209
  while true
@@ -190,14 +211,15 @@ class Chat_content
190
211
  sleep(3)
191
212
  end
192
213
  end
193
-
214
+
194
215
  url = 'https://api.openai.com/v1/chat/completions'
195
216
  headers = {
196
217
  'Content-Type' => 'application/json',
197
218
  'Authorization' => 'Bearer ' + @api_key
198
219
  }
220
+
199
221
  data = {
200
- 'model' => 'gpt-4',
222
+ 'model' => @model,
201
223
  'messages' => [{
202
224
  "role" => "system",
203
225
  "content" => "너는 매우 친절하고 성의 있게 답변하는 AI 어시스턴트야."
@@ -205,16 +227,18 @@ class Chat_content
205
227
  {
206
228
  "role" => "user",
207
229
  "content" => "#{@gpt_content_prompt}\n#{content}"
208
-
209
230
  }]
210
231
  }
211
232
 
233
+ answer = ''
234
+ retry_count = 0
235
+ max_retries = 5 # 최대 재시도 횟수
236
+
212
237
  begin
213
238
  req = HTTP.headers(headers).post(url, json: data)
214
239
 
215
240
  response = JSON.parse(req.body.to_s)
216
-
217
-
241
+
218
242
  if req.status == 429
219
243
  return "API 요청 제한을 초과했습니다. 플랜 및 할당량을 확인하세요."
220
244
  end
@@ -224,20 +248,28 @@ class Chat_content
224
248
  answer ||= (content) # 응답이 없을 경우 기본 메시지 설정
225
249
  rescue => e
226
250
  puts "Error: #{e.message}"
227
- answer = "오류가 발생했습니다."
251
+ if e.message.include?('502') && retry_count < max_retries
252
+ retry_count += 1
253
+ puts "Retrying... Attempt ##{retry_count}"
254
+ sleep(5) # 잠시 대기 후 재시도
255
+ retry
256
+ else
257
+ answer = "오류가 발생했습니다."
258
+ end
228
259
  end
229
260
 
230
261
  # "생성 중..." 메시지 출력 종료
231
262
  thread.kill
232
263
 
233
- puts 'API return ==> '
234
- puts answer
264
+ puts 'API return ==> '.cyan
265
+ puts answer.cyan
235
266
  answer
236
267
  end
237
268
  end
238
269
 
239
270
 
240
271
 
272
+
241
273
  #############################################gpt############################################
242
274
 
243
275
  class Naver
@@ -275,7 +307,6 @@ class Naver
275
307
  # end
276
308
  #end
277
309
 
278
-
279
310
  def chrome_setup(user_id, proxy)
280
311
  naver_cookie_dir = "C:/naver_cookie"
281
312
  FileUtils.mkdir_p(naver_cookie_dir) unless File.exist?(naver_cookie_dir)
@@ -373,7 +404,7 @@ class Naver
373
404
  begin
374
405
  begin
375
406
  Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
376
- rescue => e
407
+ rescue => e
377
408
  puts "chromedriver 버전 불일치!!"
378
409
  puts "아래 지침을 따라주세요."
379
410
  puts "1.프로그램 종료!"
@@ -382,7 +413,7 @@ class Naver
382
413
  puts "4.안내된 방식으로 크롬 드라이버 교체"
383
414
  puts "5.재 시작"
384
415
  exit 1
385
- end
416
+ end
386
417
  options = Selenium::WebDriver::Chrome::Options.new
387
418
  options.add_argument('--no-first-run') # 자동 실행 시 나타나는 "첫 실행" 화면 방지
388
419
  options.add_argument('--disable-extensions') # 확장 프로그램 초기화 화면 방지
@@ -738,7 +769,7 @@ class Naver
738
769
  puts "사용한 이미지가 없으므로 삭제 미 처리"
739
770
  end
740
771
  end
741
-
772
+
742
773
  def update(title, content, option, soosick_1, soosick_2, dd_time)
743
774
  #@driver.get(@url+'?Redirect=Write')
744
775
  #sleep(15)
@@ -1381,6 +1412,32 @@ class Naver
1381
1412
  end
1382
1413
 
1383
1414
 
1415
+ elsif i2.to_s.include?('<clip_number')
1416
+ # <clip_number> 태그에서 값을 추출하여 clip_123 배열에 저장 (중복 제거)
1417
+ clip_123 = i2.to_s.scan(/<clip_number>(\d+)<\/clip_number>/).flatten.uniq
1418
+
1419
+ # 내 클립 버튼 클릭
1420
+ @driver.find_element(:xpath, '//*[@type="button" and @data-name="moment" and @data-log="dot.moment"]').click
1421
+ sleep(2)
1422
+
1423
+ # clip_123에 있는 모든 번호를 사용하여 클립을 선택하고 삽입
1424
+ clip_123.each do |clip_number|
1425
+ # clip_number - 1을 사용하여 data-index에 맞는 클립을 클릭
1426
+ @driver.find_element(:xpath, "//*[@class='se-sidebar-element se-sidebar-element-moment' and @data-index='#{clip_number.to_i - 1}']").click
1427
+ sleep(2)
1428
+ end
1429
+
1430
+ # 클립 창 닫기
1431
+ @driver.find_element(:xpath, '//*[@type="button" and @class="se-sidebar-close-button"]').click
1432
+ sleep(2)
1433
+
1434
+ # 본문 입력 탭 닫기 1
1435
+ @driver.find_element(:xpath, '//*[@type="button" and @data-type="toggle" and @data-name="bold"]').click
1436
+ sleep(1)
1437
+
1438
+ # 본문 입력 탭 닫기 2
1439
+ @driver.find_element(:xpath, '//*[@type="button" and @data-type="toggle" and @data-name="bold"]').click
1440
+ sleep(1)
1384
1441
 
1385
1442
 
1386
1443
  elsif i2.to_s.include?('<inyonggoo')
@@ -2771,6 +2828,19 @@ class Wordpress
2771
2828
  end
2772
2829
  end
2773
2830
 
2831
+ if @data['포스트설정']['gpt35'].checked? || @data['포스트설정']['gpt4turbo'].checked? || @data['포스트설정']['gpt4'].checked?
2832
+ gpt_model = if @data['포스트설정']['gpt35'].checked?
2833
+ 'gpt-3.5-turbo'
2834
+ elsif @data['포스트설정']['gpt4turbo'].checked?
2835
+ 'gpt-4-turbo'
2836
+ elsif @data['포스트설정']['gpt4'].checked?
2837
+ 'gpt-4'
2838
+ end
2839
+ puts "선택 된 GPT model: #{gpt_model}".green
2840
+ else
2841
+
2842
+ end
2843
+
2774
2844
  if @data['포스트설정']['gpt제목'].checked?
2775
2845
  gpt_title_prompt = @data['포스트설정']['gpt제목_프롬프트'].text.to_s.force_encoding('utf-8')
2776
2846
 
@@ -2778,7 +2848,7 @@ class Wordpress
2778
2848
  gpt_title_prompt_sample = gpt_title_prompt.strip.empty? ? "프롬프트: 문장을 비슷한 길이로 ChatGPT의 멘트는 빼고 표현을 더 추가해서 하나만 만들어줘." : gpt_title_prompt
2779
2849
 
2780
2850
  # gpt_title_prompt_sample을 Chat_title 객체에 전달
2781
- chat = Chat_title.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'), gpt_title_prompt_sample)
2851
+ chat = Chat_title.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'), gpt_title_prompt_sample, gpt_model)
2782
2852
 
2783
2853
  # 메시지 요청 후 title에 저장
2784
2854
  gpt_text1 = chat.message(title)
@@ -2834,7 +2904,7 @@ class Wordpress
2834
2904
  gpt_content_prompt_sample = gpt_content_prompt.strip.empty? ? "프롬프트:ChatGPT의 멘트는 빼고 위 전체적인 내용의 형식을 똑같이 표현을 더 추가하고 유사어로 변경하여 하나 만들어줘! 전화번호,연락처,가격,홈페이지안내 ,상담안내 관련 문구는 유지해야해" : gpt_content_prompt
2835
2905
 
2836
2906
  # Chat_content 객체 생성 시 api_key와 gpt_content_prompt_sample을 두 개의 인자로 전달
2837
- chat = Chat_content.new(api_key, gpt_content_prompt_sample)
2907
+ chat = Chat_content.new(api_key, gpt_content_prompt_sample, gpt_model)
2838
2908
 
2839
2909
  # 메시지 요청 후 content에 저장
2840
2910
  gpt_text3 = chat.message(content)
@@ -2982,7 +3052,7 @@ class Wordpress
2982
3052
  if @data['포스트설정']['gpt키워드'].checked?
2983
3053
  gpt_keyword_prompt = @data['포스트설정']['gpt키워드_프롬프트'].text.to_s.force_encoding('utf-8')
2984
3054
  gpt_keyword_prompt_sample = gpt_keyword_prompt.strip.empty? ? "프롬프트: 관련된 글을 1500자에서 2500자 사이로 만들어줘" : gpt_keyword_prompt
2985
- chat = Chat.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'), gpt_keyword_prompt)
3055
+ chat = Chat.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'), gpt_keyword_prompt, gpt_model)
2986
3056
  gpt_text = chat.message(keyword)
2987
3057
  #content = content.to_s + "\n(자동생성글)\n" + gpt_text.to_s
2988
3058
  content = content.to_s + "(자동생성글)" + gpt_text.to_s
@@ -3347,6 +3417,51 @@ class Wordpress
3347
3417
  @data['table'] << []
3348
3418
  @data['table'].pop
3349
3419
 
3420
+ ##여기서부터 클립####-------------------------------------------------------------------------------
3421
+ if @data['포스트설정']['클립적용'].checked?
3422
+ clip_word = @data['포스트설정']['클립단어'].text.to_s.force_encoding('utf-8')
3423
+ clip_123 = @data['포스트설정']['클립넘버'].text.to_s.force_encoding('utf-8').split(',')
3424
+
3425
+ # content를 줄 단위로 분리
3426
+ content_lines = content.split("\n")
3427
+ new_lines = []
3428
+
3429
+ content_lines.each do |line|
3430
+ processed = false
3431
+
3432
+ # 1. 클립 단어 패턴 처리: 클립 단어를 <clip_number>로 감싸기
3433
+ if line.include?(clip_word)
3434
+ # 클립 단어를 <clip_number> 태그로 감싸기
3435
+ parts = line.split(clip_word, 2)
3436
+ prefix = parts[0]
3437
+ suffix = parts[1]
3438
+
3439
+ # 클립 넘버를 순차적으로 적용
3440
+ clip_number = clip_123.shift || clip_123.last
3441
+
3442
+ open_tag = prefix[/<p[^>]*?>/i] || ""
3443
+ close_tag = suffix[/<\/p>/i] || ""
3444
+
3445
+ prefix_text = prefix.sub(open_tag, '')
3446
+ suffix_text = suffix.sub(close_tag, '')
3447
+
3448
+ # 새로운 라인으로 변경
3449
+ new_lines << "#{open_tag}#{prefix_text}</p>" unless prefix_text.strip.empty?
3450
+ new_lines << "<clip_number>#{clip_number}</clip_number>"
3451
+ new_lines << "#{open_tag}#{suffix_text}#{close_tag}" unless suffix_text.strip.empty?
3452
+
3453
+ processed = true
3454
+ end
3455
+
3456
+ # 변경이 없었으면 원래 줄 추가
3457
+ new_lines << line unless processed
3458
+ end
3459
+
3460
+ content = new_lines.join("\n")
3461
+ end
3462
+ ######-------------------------------------------------------------------------------
3463
+
3464
+
3350
3465
 
3351
3466
 
3352
3467
  if @data['포스트설정']['단어링크적용'].checked?
@@ -3800,7 +3915,7 @@ class Wordpress
3800
3915
  dd_time = @data['table'][index][10].to_s.force_encoding('utf-8').to_i
3801
3916
  #template_no = @data['table'][index][7].to_s.force_encoding('utf-8').to_i
3802
3917
  naver.update(title,content,option,soosick_1,soosick_2, dd_time)
3803
-
3918
+
3804
3919
 
3805
3920
  # if @data['포스트설정']['태그삽입2'].checked?
3806
3921
  # snumber = @data['포스트설정']['태그삽입2시작숫자'].text.to_s.force_encoding('utf-8').to_i
@@ -4899,7 +5014,11 @@ class Wordpress
4899
5014
  vertical_box{
4900
5015
  horizontal_box{
4901
5016
  stretchy false
4902
- @data['image_type'][0] = checkbox('저장 사진 사용'){
5017
+ grid{
5018
+ stretchy false
5019
+ @data['image_type'][0] = checkbox('저장 사진 사용    '){
5020
+ top 0
5021
+ left 0
4903
5022
  on_toggled{
4904
5023
  if @data['image_type'][0].checked?
4905
5024
  @data['image_type'][1].checked = false
@@ -4907,7 +5026,9 @@ class Wordpress
4907
5026
  end
4908
5027
  }
4909
5028
  }
4910
- @data['image_type'][1] = checkbox('색상 사진 사용'){
5029
+ @data['image_type'][1] = checkbox('색상 사진 사용    '){
5030
+ top 0
5031
+ left 1
4911
5032
  on_toggled{
4912
5033
  if @data['image_type'][1].checked?
4913
5034
  @data['image_type'][0].checked = false
@@ -4916,6 +5037,8 @@ class Wordpress
4916
5037
  }
4917
5038
  }
4918
5039
  @data['image_type'][2] = checkbox('자동 다운로드 사진 사용'){
5040
+ top 0
5041
+ left 2
4919
5042
  on_toggled{
4920
5043
  if @data['image_type'][2].checked?
4921
5044
  @data['image_type'][1].checked = false
@@ -4924,7 +5047,7 @@ class Wordpress
4924
5047
  }
4925
5048
  }
4926
5049
  }
4927
-
5050
+ }
4928
5051
  grid{
4929
5052
  stretchy false
4930
5053
  @data['이미지설정']['글자삽입1'] = checkbox('글자 삽입1'){
@@ -5002,8 +5125,12 @@ class Wordpress
5002
5125
  top 1
5003
5126
  left 6
5004
5127
  }
5005
- @data['이미지설정']['글자순서'] = checkbox('글자 리스트 순서대로 사용'){
5006
- top 2
5128
+ }
5129
+
5130
+ grid{
5131
+ stretchy false
5132
+ @data['이미지설정']['글자순서'] = checkbox('글자 리스트 순서 사용 '){
5133
+ top 1
5007
5134
  left 0
5008
5135
  on_toggled{
5009
5136
  if @data['이미지설정']['글자순서'].checked?
@@ -5012,8 +5139,8 @@ class Wordpress
5012
5139
  }
5013
5140
  }
5014
5141
 
5015
- @data['이미지설정']['글자랜덤'] = checkbox('글자 리스트 랜덤으로 사용'){
5016
- top 2
5142
+ @data['이미지설정']['글자랜덤'] = checkbox('글자 리스트 랜덤 사용'){
5143
+ top 1
5017
5144
  left 1
5018
5145
  on_toggled{
5019
5146
  if @data['이미지설정']['글자랜덤'].checked?
@@ -5021,32 +5148,38 @@ class Wordpress
5021
5148
  end
5022
5149
  }
5023
5150
  }
5151
+ }
5024
5152
 
5025
5153
 
5026
- @data['이미지설정']['필터사용'] = checkbox('필터사용(색상 사진 적용불가)'){
5027
- top 2
5028
- left 2
5154
+ grid{
5155
+ stretchy false
5156
+ @data['이미지설정']['필터사용'] = checkbox('사진 필터 사용 [흑백,흐림,가우시안,,,등 랜덤] (※색상 사진 사용시 적용 불가)'){
5157
+ top 0
5158
+ left 0
5029
5159
  }
5030
- @data['이미지설정']['테두리사용'] = checkbox('테두리 사용'){
5031
- top 3
5160
+ }
5161
+ grid{
5162
+ stretchy false
5163
+ @data['이미지설정']['테두리사용'] = checkbox('사진 테두리 적용하기 '){
5164
+ top 1
5032
5165
  left 0
5033
5166
  }
5034
5167
  @data['이미지설정']['테두리크기1'] = entry{
5035
- top 3
5168
+ top 1
5036
5169
  left 2
5037
5170
  text 'ex) 1'
5038
5171
  }
5039
- label('pt'){
5040
- top 3
5172
+ label('px'){
5173
+ top 1
5041
5174
  left 3
5042
5175
  }
5043
5176
  @data['이미지설정']['테두리크기2'] = entry{
5044
- top 3
5177
+ top 1
5045
5178
  left 4
5046
5179
  text 'ex) 33'
5047
5180
  }
5048
- label('pt'){
5049
- top 3
5181
+ label('px'){
5182
+ top 1
5050
5183
  left 5
5051
5184
  }
5052
5185
 
@@ -5205,7 +5338,7 @@ class Wordpress
5205
5338
  stretchy false
5206
5339
  grid{
5207
5340
  stretchy false
5208
- @data['포스트설정']['제목키워드변경'] = checkbox('제목에 특정 단어를 내용에 사용할 키워드로 변경'){
5341
+ @data['포스트설정']['제목키워드변경'] = checkbox('제목에 특정 단어를 키워드로 변경'){
5209
5342
  top 0
5210
5343
  left 0
5211
5344
 
@@ -5248,13 +5381,10 @@ class Wordpress
5248
5381
  left 3
5249
5382
  text '최대수량'
5250
5383
  }
5251
- label('ㄴ'){
5252
- top 3
5253
- left 2
5254
- }
5255
- @data['포스트설정']['제목앞'] = checkbox('제목에 키워드 삽입 제목 앞'){
5384
+
5385
+ @data['포스트설정']['제목앞'] = checkbox('제목에 키워드 삽입시 제목 앞에 붙이기'){
5256
5386
  top 3
5257
- left 3
5387
+ left 0
5258
5388
  enabled false # 기본적으로 비활성화
5259
5389
  on_toggled{
5260
5390
  if @data['포스트설정']['제목앞'].checked? == true
@@ -5264,13 +5394,10 @@ class Wordpress
5264
5394
  end
5265
5395
  }
5266
5396
  }
5267
- label('ㄴ'){
5268
- top 4
5269
- left 2
5270
- }
5271
- @data['포스트설정']['제목뒤'] = checkbox('제목에 키워드 삽입 제목 뒤'){
5272
- top 4
5273
- left 3
5397
+
5398
+ @data['포스트설정']['제목뒤'] = checkbox('제목에 키워드시 삽입 제목 뒤에 붙이기'){
5399
+ top 3
5400
+ left 1
5274
5401
  enabled false # 기본적으로 비활성화
5275
5402
  on_toggled{
5276
5403
  if @data['포스트설정']['제목뒤'].checked? == true
@@ -5484,18 +5611,65 @@ class Wordpress
5484
5611
  text 'URL'
5485
5612
  }
5486
5613
 
5487
- @data['포스트설정']['ChatGPT사용'] = checkbox('Chat GPT 사용하기'){
5614
+ @data['포스트설정']['클립적용'] = checkbox('클립 내용에 넣기'){
5488
5615
  top 15+ aa1
5489
5616
  left 0
5490
5617
  }
5491
5618
 
5492
- @data['포스트설정']['api_key'] = entry(){
5619
+ @data['포스트설정']['클립단어'] = entry(){
5493
5620
  top 15+ aa1
5494
5621
  left 1
5495
- text 'api key 입력 필수!!'
5622
+ text '특정단어'
5623
+ }
5624
+ @data['포스트설정']['클립넘버'] = entry(){
5625
+ top 15+ aa1
5626
+ left 3
5627
+ text '클립넘버 ex)1,2,3'
5496
5628
  }
5497
-
5498
5629
  }
5630
+ grid{
5631
+ stretchy false
5632
+ @data['포스트설정']['ChatGPT사용'] = checkbox('Chat GPT 사용하기             '){
5633
+ top 1
5634
+ left 0
5635
+ }
5636
+
5637
+ @data['포스트설정']['api_key'] = entry(){
5638
+ top 1
5639
+ left 1
5640
+ text 'api key 입력'
5641
+ }
5642
+ @data['포스트설정']['gpt35'] = checkbox('GPT 3.5-turbo'){
5643
+ top 1
5644
+ left 2
5645
+ on_toggled {
5646
+ if @data['포스트설정']['gpt35'].checked?
5647
+ @data['포스트설정']['gpt4'].checked = false
5648
+ @data['포스트설정']['gpt4turbo'].checked = false
5649
+ end
5650
+ }
5651
+ }
5652
+ @data['포스트설정']['gpt4'] = checkbox('GPT 4'){
5653
+ top 1
5654
+ left 3
5655
+ on_toggled {
5656
+ if @data['포스트설정']['gpt4'].checked?
5657
+ @data['포스트설정']['gpt35'].checked = false
5658
+ @data['포스트설정']['gpt4turbo'].checked = false
5659
+ end
5660
+ }
5661
+ }
5662
+ @data['포스트설정']['gpt4turbo'] = checkbox('GPT 4-turbo'){
5663
+ top 1
5664
+ left 4
5665
+ on_toggled {
5666
+ if @data['포스트설정']['gpt4turbo'].checked?
5667
+ @data['포스트설정']['gpt35'].checked = false
5668
+ @data['포스트설정']['gpt4'].checked = false
5669
+ end
5670
+ }
5671
+ }
5672
+ }
5499
5673
  }
5500
5674
 
5501
5675
  vertical_separator{
@@ -6035,6 +6209,7 @@ class Wordpress
6035
6209
  @data['포스트설정']['발행기능'].checked = true
6036
6210
  @data['포스트설정']['인용구랜덤'].checked = true
6037
6211
  @data['이미지설정']['글자순서'].checked = true
6212
+ @data['포스트설정']['gpt35'].checked = true
6038
6213
  }.show
6039
6214
  end
6040
6215
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nblog_duo
3
3
  version: !ruby/object:Gem::Version
4
- version: 111.117.999
4
+ version: 111.120.001
5
5
  platform: ruby
6
6
  authors:
7
7
  - zon
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-05-30 00:00:00.000000000 Z
10
+ date: 2025-06-26 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: File to Clipboard gem
13
13
  email: mymin26@naver.com