nblog_zon 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_zon.rb +244 -70
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9ce89f8219b95ca6c39243a9ac8a1d29b6c4953121bc189eaf16bf555c096f4
4
- data.tar.gz: f37a898581fa16f973fa11288ddf5fac9dc309980e90878232ce642cceb99ac3
3
+ metadata.gz: 4e878087c2dca81eb560830ac36bef62b0555a09031fb7ea6b8230bee47c0007
4
+ data.tar.gz: 9acc1171220502c7395f5674eff0cb07d8df5c4ed1e16168b2d0cc59042e2163
5
5
  SHA512:
6
- metadata.gz: 6e4e67b3970f3dc4dcf7d968bad3f1c041233ce7aab52d790f0e4b013964898c8c4ee57454cbc4350da5899a43f6c4740122766149ced1781912fa2120061aad
7
- data.tar.gz: 8cee76e53d4f3fcdebcd346c5d0c2737a892d841bfb29694d2aabb1e7c0c1cc720b7cc0ea15bdf2bc6709c6091f8ca1862414e2cf85c0f326d28d3458df86d6a
6
+ metadata.gz: 9132d31e3a36202c849b2df2ba64dddd681a41863fde72ad3093cafa4c754764cf33142e02bb5814d7fc356cb321820a0ad878dc197c6c1e0be449a14c126222
7
+ data.tar.gz: 9211eca1af240c069a09f4548d1034d20ced569a3268deced7df4ae407b030357665f89959620add1c18243eada3c94533ba9cd50d37bdd794de0ab4bcf79567
data/lib/nblog_zon.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,26 @@ 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
-
241
271
  #############################################gpt############################################
242
272
 
243
273
  class Naver
@@ -1380,6 +1410,32 @@ class Naver
1380
1410
  end
1381
1411
 
1382
1412
 
1413
+ elsif i2.to_s.include?('<clip_number')
1414
+ # <clip_number> 태그에서 값을 추출하여 clip_123 배열에 저장 (중복 제거)
1415
+ clip_123 = i2.to_s.scan(/<clip_number>(\d+)<\/clip_number>/).flatten.uniq
1416
+
1417
+ # 내 클립 버튼 클릭
1418
+ @driver.find_element(:xpath, '//*[@type="button" and @data-name="moment" and @data-log="dot.moment"]').click
1419
+ sleep(2)
1420
+
1421
+ # clip_123에 있는 모든 번호를 사용하여 클립을 선택하고 삽입
1422
+ clip_123.each do |clip_number|
1423
+ # clip_number - 1을 사용하여 data-index에 맞는 클립을 클릭
1424
+ @driver.find_element(:xpath, "//*[@class='se-sidebar-element se-sidebar-element-moment' and @data-index='#{clip_number.to_i - 1}']").click
1425
+ sleep(2)
1426
+ end
1427
+
1428
+ # 클립 창 닫기
1429
+ @driver.find_element(:xpath, '//*[@type="button" and @class="se-sidebar-close-button"]').click
1430
+ sleep(2)
1431
+
1432
+ # 본문 입력 탭 닫기 1
1433
+ @driver.find_element(:xpath, '//*[@type="button" and @data-type="toggle" and @data-name="bold"]').click
1434
+ sleep(1)
1435
+
1436
+ # 본문 입력 탭 닫기 2
1437
+ @driver.find_element(:xpath, '//*[@type="button" and @data-type="toggle" and @data-name="bold"]').click
1438
+ sleep(1)
1383
1439
 
1384
1440
 
1385
1441
  elsif i2.to_s.include?('<inyonggoo')
@@ -2701,6 +2757,19 @@ class Wordpress
2701
2757
  end
2702
2758
  end
2703
2759
 
2760
+ if @data['포스트설정']['gpt35'].checked? || @data['포스트설정']['gpt4turbo'].checked? || @data['포스트설정']['gpt4'].checked?
2761
+ gpt_model = if @data['포스트설정']['gpt35'].checked?
2762
+ 'gpt-3.5-turbo'
2763
+ elsif @data['포스트설정']['gpt4turbo'].checked?
2764
+ 'gpt-4-turbo'
2765
+ elsif @data['포스트설정']['gpt4'].checked?
2766
+ 'gpt-4'
2767
+ end
2768
+ puts "선택 된 GPT model: #{gpt_model}".green
2769
+ else
2770
+
2771
+ end
2772
+
2704
2773
  if @data['포스트설정']['gpt제목'].checked?
2705
2774
  gpt_title_prompt = @data['포스트설정']['gpt제목_프롬프트'].text.to_s.force_encoding('utf-8')
2706
2775
 
@@ -2708,7 +2777,7 @@ class Wordpress
2708
2777
  gpt_title_prompt_sample = gpt_title_prompt.strip.empty? ? "프롬프트: 문장을 비슷한 길이로 ChatGPT의 멘트는 빼고 표현을 더 추가해서 하나만 만들어줘." : gpt_title_prompt
2709
2778
 
2710
2779
  # gpt_title_prompt_sample을 Chat_title 객체에 전달
2711
- chat = Chat_title.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'), gpt_title_prompt_sample)
2780
+ chat = Chat_title.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'), gpt_title_prompt_sample, gpt_model)
2712
2781
 
2713
2782
  # 메시지 요청 후 title에 저장
2714
2783
  gpt_text1 = chat.message(title)
@@ -2764,7 +2833,7 @@ class Wordpress
2764
2833
  gpt_content_prompt_sample = gpt_content_prompt.strip.empty? ? "프롬프트:ChatGPT의 멘트는 빼고 위 전체적인 내용의 형식을 똑같이 표현을 더 추가하고 유사어로 변경하여 하나 만들어줘! 전화번호,연락처,가격,홈페이지안내 ,상담안내 관련 문구는 유지해야해" : gpt_content_prompt
2765
2834
 
2766
2835
  # Chat_content 객체 생성 시 api_key와 gpt_content_prompt_sample을 두 개의 인자로 전달
2767
- chat = Chat_content.new(api_key, gpt_content_prompt_sample)
2836
+ chat = Chat_content.new(api_key, gpt_content_prompt_sample, gpt_model)
2768
2837
 
2769
2838
  # 메시지 요청 후 content에 저장
2770
2839
  gpt_text3 = chat.message(content)
@@ -2912,7 +2981,7 @@ class Wordpress
2912
2981
  if @data['포스트설정']['gpt키워드'].checked?
2913
2982
  gpt_keyword_prompt = @data['포스트설정']['gpt키워드_프롬프트'].text.to_s.force_encoding('utf-8')
2914
2983
  gpt_keyword_prompt_sample = gpt_keyword_prompt.strip.empty? ? "프롬프트: 관련된 글을 1500자에서 2500자 사이로 만들어줘" : gpt_keyword_prompt
2915
- chat = Chat.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'), gpt_keyword_prompt)
2984
+ chat = Chat.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'), gpt_keyword_prompt, gpt_model)
2916
2985
  gpt_text = chat.message(keyword)
2917
2986
  #content = content.to_s + "\n(자동생성글)\n" + gpt_text.to_s
2918
2987
  content = content.to_s + "(자동생성글)" + gpt_text.to_s
@@ -3277,6 +3346,51 @@ class Wordpress
3277
3346
  @data['table'] << []
3278
3347
  @data['table'].pop
3279
3348
 
3349
+ ##여기서부터 클립####-------------------------------------------------------------------------------
3350
+ if @data['포스트설정']['클립적용'].checked?
3351
+ clip_word = @data['포스트설정']['클립단어'].text.to_s.force_encoding('utf-8')
3352
+ clip_123 = @data['포스트설정']['클립넘버'].text.to_s.force_encoding('utf-8').split(',')
3353
+
3354
+ # content를 줄 단위로 분리
3355
+ content_lines = content.split("\n")
3356
+ new_lines = []
3357
+
3358
+ content_lines.each do |line|
3359
+ processed = false
3360
+
3361
+ # 1. 클립 단어 패턴 처리: 클립 단어를 <clip_number>로 감싸기
3362
+ if line.include?(clip_word)
3363
+ # 클립 단어를 <clip_number> 태그로 감싸기
3364
+ parts = line.split(clip_word, 2)
3365
+ prefix = parts[0]
3366
+ suffix = parts[1]
3367
+
3368
+ # 클립 넘버를 순차적으로 적용
3369
+ clip_number = clip_123.shift || clip_123.last
3370
+
3371
+ open_tag = prefix[/<p[^>]*?>/i] || ""
3372
+ close_tag = suffix[/<\/p>/i] || ""
3373
+
3374
+ prefix_text = prefix.sub(open_tag, '')
3375
+ suffix_text = suffix.sub(close_tag, '')
3376
+
3377
+ # 새로운 라인으로 변경
3378
+ new_lines << "#{open_tag}#{prefix_text}</p>" unless prefix_text.strip.empty?
3379
+ new_lines << "<clip_number>#{clip_number}</clip_number>"
3380
+ new_lines << "#{open_tag}#{suffix_text}#{close_tag}" unless suffix_text.strip.empty?
3381
+
3382
+ processed = true
3383
+ end
3384
+
3385
+ # 변경이 없었으면 원래 줄 추가
3386
+ new_lines << line unless processed
3387
+ end
3388
+
3389
+ content = new_lines.join("\n")
3390
+ end
3391
+ ######-------------------------------------------------------------------------------
3392
+
3393
+
3280
3394
 
3281
3395
 
3282
3396
  if @data['포스트설정']['단어링크적용'].checked?
@@ -3800,7 +3914,7 @@ class Wordpress
3800
3914
  @data['포스트설정']['프록시리스트'] = Array.new
3801
3915
  @data['포스트설정']['인용구'] = Array.new
3802
3916
  @user_login_ok = "1"
3803
- window('N_BLOG POSTING', 800, 570) {
3917
+ window('N_BLOG POSTING', 800, 610) {
3804
3918
  margined true
3805
3919
 
3806
3920
  vertical_box {
@@ -4823,7 +4937,11 @@ class Wordpress
4823
4937
  vertical_box{
4824
4938
  horizontal_box{
4825
4939
  stretchy false
4826
- @data['image_type'][0] = checkbox('저장 사진 사용'){
4940
+ grid{
4941
+ stretchy false
4942
+ @data['image_type'][0] = checkbox('저장 사진 사용    '){
4943
+ top 0
4944
+ left 0
4827
4945
  on_toggled{
4828
4946
  if @data['image_type'][0].checked?
4829
4947
  @data['image_type'][1].checked = false
@@ -4831,7 +4949,9 @@ class Wordpress
4831
4949
  end
4832
4950
  }
4833
4951
  }
4834
- @data['image_type'][1] = checkbox('색상 사진 사용'){
4952
+ @data['image_type'][1] = checkbox('색상 사진 사용    '){
4953
+ top 0
4954
+ left 1
4835
4955
  on_toggled{
4836
4956
  if @data['image_type'][1].checked?
4837
4957
  @data['image_type'][0].checked = false
@@ -4840,6 +4960,8 @@ class Wordpress
4840
4960
  }
4841
4961
  }
4842
4962
  @data['image_type'][2] = checkbox('자동 다운로드 사진 사용'){
4963
+ top 0
4964
+ left 2
4843
4965
  on_toggled{
4844
4966
  if @data['image_type'][2].checked?
4845
4967
  @data['image_type'][1].checked = false
@@ -4848,7 +4970,7 @@ class Wordpress
4848
4970
  }
4849
4971
  }
4850
4972
  }
4851
-
4973
+ }
4852
4974
  grid{
4853
4975
  stretchy false
4854
4976
  @data['이미지설정']['글자삽입1'] = checkbox('글자 삽입1'){
@@ -4926,8 +5048,12 @@ class Wordpress
4926
5048
  top 1
4927
5049
  left 6
4928
5050
  }
4929
- @data['이미지설정']['글자순서'] = checkbox('글자 리스트 순서대로 사용'){
4930
- top 2
5051
+ }
5052
+
5053
+ grid{
5054
+ stretchy false
5055
+ @data['이미지설정']['글자순서'] = checkbox('글자 리스트 순서 사용 '){
5056
+ top 1
4931
5057
  left 0
4932
5058
  on_toggled{
4933
5059
  if @data['이미지설정']['글자순서'].checked?
@@ -4936,8 +5062,8 @@ class Wordpress
4936
5062
  }
4937
5063
  }
4938
5064
 
4939
- @data['이미지설정']['글자랜덤'] = checkbox('글자 리스트 랜덤으로 사용'){
4940
- top 2
5065
+ @data['이미지설정']['글자랜덤'] = checkbox('글자 리스트 랜덤 사용'){
5066
+ top 1
4941
5067
  left 1
4942
5068
  on_toggled{
4943
5069
  if @data['이미지설정']['글자랜덤'].checked?
@@ -4945,32 +5071,38 @@ class Wordpress
4945
5071
  end
4946
5072
  }
4947
5073
  }
5074
+ }
4948
5075
 
4949
5076
 
4950
- @data['이미지설정']['필터사용'] = checkbox('필터사용(색상 사진 적용불가)'){
4951
- top 2
4952
- left 2
5077
+ grid{
5078
+ stretchy false
5079
+ @data['이미지설정']['필터사용'] = checkbox('사진 필터 사용 [흑백,흐림,가우시안,,,등 랜덤] (※색상 사진 사용시 적용 불가)'){
5080
+ top 0
5081
+ left 0
4953
5082
  }
4954
- @data['이미지설정']['테두리사용'] = checkbox('테두리 사용'){
4955
- top 3
5083
+ }
5084
+ grid{
5085
+ stretchy false
5086
+ @data['이미지설정']['테두리사용'] = checkbox('사진 테두리 적용하기 '){
5087
+ top 1
4956
5088
  left 0
4957
5089
  }
4958
5090
  @data['이미지설정']['테두리크기1'] = entry{
4959
- top 3
5091
+ top 1
4960
5092
  left 2
4961
5093
  text 'ex) 1'
4962
5094
  }
4963
- label('pt'){
4964
- top 3
5095
+ label('px'){
5096
+ top 1
4965
5097
  left 3
4966
5098
  }
4967
5099
  @data['이미지설정']['테두리크기2'] = entry{
4968
- top 3
5100
+ top 1
4969
5101
  left 4
4970
5102
  text 'ex) 33'
4971
5103
  }
4972
- label('pt'){
4973
- top 3
5104
+ label('px'){
5105
+ top 1
4974
5106
  left 5
4975
5107
  }
4976
5108
 
@@ -5129,7 +5261,7 @@ class Wordpress
5129
5261
  stretchy false
5130
5262
  grid{
5131
5263
  stretchy false
5132
- @data['포스트설정']['제목키워드변경'] = checkbox('제목에 특정 단어를 내용에 사용할 키워드로 변경'){
5264
+ @data['포스트설정']['제목키워드변경'] = checkbox('제목에 특정 단어를 키워드로 변경'){
5133
5265
  top 0
5134
5266
  left 0
5135
5267
 
@@ -5172,13 +5304,10 @@ class Wordpress
5172
5304
  left 3
5173
5305
  text '최대수량'
5174
5306
  }
5175
- label('ㄴ'){
5176
- top 3
5177
- left 2
5178
- }
5179
- @data['포스트설정']['제목앞'] = checkbox('제목에 키워드 삽입 제목 앞'){
5307
+
5308
+ @data['포스트설정']['제목앞'] = checkbox('제목에 키워드 삽입시 제목 앞에 붙이기'){
5180
5309
  top 3
5181
- left 3
5310
+ left 0
5182
5311
  enabled false # 기본적으로 비활성화
5183
5312
  on_toggled{
5184
5313
  if @data['포스트설정']['제목앞'].checked? == true
@@ -5188,13 +5317,10 @@ class Wordpress
5188
5317
  end
5189
5318
  }
5190
5319
  }
5191
- label('ㄴ'){
5192
- top 4
5193
- left 2
5194
- }
5195
- @data['포스트설정']['제목뒤'] = checkbox('제목에 키워드 삽입 제목 뒤'){
5196
- top 4
5197
- left 3
5320
+
5321
+ @data['포스트설정']['제목뒤'] = checkbox('제목에 키워드시 삽입 제목 뒤에 붙이기'){
5322
+ top 3
5323
+ left 1
5198
5324
  enabled false # 기본적으로 비활성화
5199
5325
  on_toggled{
5200
5326
  if @data['포스트설정']['제목뒤'].checked? == true
@@ -5408,18 +5534,65 @@ class Wordpress
5408
5534
  text 'URL'
5409
5535
  }
5410
5536
 
5411
- @data['포스트설정']['ChatGPT사용'] = checkbox('Chat GPT 사용하기'){
5537
+ @data['포스트설정']['클립적용'] = checkbox('클립 내용에 넣기'){
5412
5538
  top 15+ aa1
5413
5539
  left 0
5414
5540
  }
5415
5541
 
5416
- @data['포스트설정']['api_key'] = entry(){
5542
+ @data['포스트설정']['클립단어'] = entry(){
5417
5543
  top 15+ aa1
5418
5544
  left 1
5419
- text 'api key 입력 필수!!'
5545
+ text '특정단어'
5546
+ }
5547
+ @data['포스트설정']['클립넘버'] = entry(){
5548
+ top 15+ aa1
5549
+ left 3
5550
+ text '클립넘버 ex)1,2,3'
5420
5551
  }
5421
-
5422
5552
  }
5553
+ grid{
5554
+ stretchy false
5555
+ @data['포스트설정']['ChatGPT사용'] = checkbox('Chat GPT 사용하기             '){
5556
+ top 1
5557
+ left 0
5558
+ }
5559
+
5560
+ @data['포스트설정']['api_key'] = entry(){
5561
+ top 1
5562
+ left 1
5563
+ text 'api key 입력'
5564
+ }
5565
+ @data['포스트설정']['gpt35'] = checkbox('GPT 3.5-turbo'){
5566
+ top 1
5567
+ left 2
5568
+ on_toggled {
5569
+ if @data['포스트설정']['gpt35'].checked?
5570
+ @data['포스트설정']['gpt4'].checked = false
5571
+ @data['포스트설정']['gpt4turbo'].checked = false
5572
+ end
5573
+ }
5574
+ }
5575
+ @data['포스트설정']['gpt4'] = checkbox('GPT 4'){
5576
+ top 1
5577
+ left 3
5578
+ on_toggled {
5579
+ if @data['포스트설정']['gpt4'].checked?
5580
+ @data['포스트설정']['gpt35'].checked = false
5581
+ @data['포스트설정']['gpt4turbo'].checked = false
5582
+ end
5583
+ }
5584
+ }
5585
+ @data['포스트설정']['gpt4turbo'] = checkbox('GPT 4-turbo'){
5586
+ top 1
5587
+ left 4
5588
+ on_toggled {
5589
+ if @data['포스트설정']['gpt4turbo'].checked?
5590
+ @data['포스트설정']['gpt35'].checked = false
5591
+ @data['포스트설정']['gpt4'].checked = false
5592
+ end
5593
+ }
5594
+ }
5595
+ }
5423
5596
  }
5424
5597
 
5425
5598
  vertical_separator{
@@ -5959,6 +6132,7 @@ class Wordpress
5959
6132
  @data['포스트설정']['발행기능'].checked = true
5960
6133
  @data['포스트설정']['인용구랜덤'].checked = true
5961
6134
  @data['이미지설정']['글자순서'].checked = true
6135
+ @data['포스트설정']['gpt35'].checked = true
5962
6136
  }.show
5963
6137
  end
5964
6138
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nblog_zon
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: rnjstnswp123@naver.com