nblog_zon 111.120.010 → 111.120.013
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.
- checksums.yaml +4 -4
- data/lib/nblog_zon.rb +75 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59aeb2dae68b6dbb4be2ee8d70fc2bbb8f17c4e4d19275f16c165f13f5bf55c3
|
4
|
+
data.tar.gz: b27398ae26251a03f50e6644e0f9406e24e7fc47e6e3e9504b3ea67fcb2fef74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 846a8d3007f04ddf1221dab9ee79ee94541cdb0c23fdd07c01d9b02288bf1d19ed8fc858769137e8076e1c787b217f57ec031e34453b06b4bd56ef61053631ae
|
7
|
+
data.tar.gz: d0f9a02a875911c45c1b8c4c26dd5e5ba3b60fcf23dbab41b65d09bbe70c91016524955d797880463093d7e7a4b669c23ab37db7f907f059733e4ae58cc7a784
|
data/lib/nblog_zon.rb
CHANGED
@@ -269,6 +269,8 @@ class Chat_content
|
|
269
269
|
end
|
270
270
|
|
271
271
|
|
272
|
+
|
273
|
+
|
272
274
|
#############################################gpt############################################
|
273
275
|
|
274
276
|
class Naver
|
@@ -513,6 +515,18 @@ class Naver
|
|
513
515
|
sleep(1.5)
|
514
516
|
@driver.find_element(:xpath, '//*[@type="submit" and @class="btn_check next_step" and @id="submit_btn"]').click
|
515
517
|
sleep(2.5)
|
518
|
+
begin
|
519
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 3)
|
520
|
+
#요소가 나타날 때까지 3초 동안 기다립니다.
|
521
|
+
wait.until { @driver.find_element(:xpath, '//button[@ype="button" and @id="new.save" and @class="btn_check nlog-click"]') } #기기 확인 버튼 확인
|
522
|
+
#wait.until { @driver.find_element(:xpath, '//button[@ype="button" and @id="new.dontsave" and @class="btn_white nlog-click"]') } #기기 취소 버튼 확인
|
523
|
+
sleep(1.5)
|
524
|
+
@driver.find_element(:xpath, '//button[@ype="button" and @id="new.save" and @class="btn_check nlog-click"]').click
|
525
|
+
#@driver.find_element(:xpath, '//button[@ype="button" and @id="new.dontsave" and @class="btn_white nlog-click"]') #기기 취소 버튼 클릭
|
526
|
+
rescue
|
527
|
+
end
|
528
|
+
|
529
|
+
|
516
530
|
rescue => e
|
517
531
|
puts '-[√] 로딩 지연 접속 실패.......'.red
|
518
532
|
@driver.window_handles.each do |handle|
|
@@ -762,7 +776,7 @@ class Naver
|
|
762
776
|
end
|
763
777
|
end
|
764
778
|
|
765
|
-
def update(title, content, option, soosick_1, soosick_2, dd_time)
|
779
|
+
def update(title, content, option, soosick_1, soosick_2, dd_time, image_nom)
|
766
780
|
#@driver.get(@url+'?Redirect=Write')
|
767
781
|
#sleep(15)
|
768
782
|
#sleep(2)
|
@@ -1799,6 +1813,43 @@ class Naver
|
|
1799
1813
|
else
|
1800
1814
|
|
1801
1815
|
end
|
1816
|
+
|
1817
|
+
if option['대표사진설정'] == 'true'
|
1818
|
+
puts "대표 사진 설정중"
|
1819
|
+
puts "대표 사진 넘버: #{image_nom}"
|
1820
|
+
|
1821
|
+
image_nom_int = image_nom.to_i # <- 여기 추가!
|
1822
|
+
|
1823
|
+
if image_nom_int < 1
|
1824
|
+
puts "⚠️ 대표사진 넘버가 잘못되었습니다. 최소값은 1입니다."
|
1825
|
+
else
|
1826
|
+
target_index = image_nom_int - 1
|
1827
|
+
begin
|
1828
|
+
wait = Selenium::WebDriver::Wait.new(timeout: 10)
|
1829
|
+
element = @driver.find_elements(:xpath, "//strong[@class='se-panel-title' and text()='라이브러리']")
|
1830
|
+
unless element.any? && element.first.displayed?
|
1831
|
+
span = wait.until {
|
1832
|
+
el = @driver.find_element(:xpath, "//span[@class='se-toolbar-label' and text()='라이브러리']")
|
1833
|
+
el if el.displayed?
|
1834
|
+
}
|
1835
|
+
span.click
|
1836
|
+
sleep(2)
|
1837
|
+
end
|
1838
|
+
|
1839
|
+
li = wait.until {
|
1840
|
+
el = @driver.find_element(:xpath, "//li[@class='se-sidebar-item' and @data-log='llib.ditmatt' and @data-index='#{target_index}']")
|
1841
|
+
el if el.displayed?
|
1842
|
+
}
|
1843
|
+
li.click
|
1844
|
+
sleep(2)
|
1845
|
+
puts "✅ 대표 사진 #{image_nom_int} 설정 완료"
|
1846
|
+
rescue => e
|
1847
|
+
puts "❌ 대표 사진 설정 중 오류: #{e.message}"
|
1848
|
+
end
|
1849
|
+
end
|
1850
|
+
else
|
1851
|
+
|
1852
|
+
end
|
1802
1853
|
|
1803
1854
|
|
1804
1855
|
begin
|
@@ -3852,6 +3903,13 @@ class Wordpress
|
|
3852
3903
|
|
3853
3904
|
end
|
3854
3905
|
|
3906
|
+
if @data['포스트설정']['대표사진설정'].checked?
|
3907
|
+
option['대표사진설정'] = 'true'
|
3908
|
+
image_nom = @data['포스트설정']['대표사진넘버'].text.to_s.force_encoding('utf-8')
|
3909
|
+
else
|
3910
|
+
option['대표사진설정'] = 'false'
|
3911
|
+
end
|
3912
|
+
|
3855
3913
|
if @data['포스트설정']['라이브러리사용안함'].checked?
|
3856
3914
|
option['라이브러리사용안함'] = 'true'
|
3857
3915
|
else
|
@@ -3973,7 +4031,7 @@ class Wordpress
|
|
3973
4031
|
|
3974
4032
|
dd_time = @data['table'][index][10].to_s.force_encoding('utf-8').to_i
|
3975
4033
|
#template_no = @data['table'][index][7].to_s.force_encoding('utf-8').to_i
|
3976
|
-
naver.update(title,content,option,soosick_1,soosick_2, dd_time)
|
4034
|
+
naver.update(title,content,option,soosick_1,soosick_2, dd_time, image_nom)
|
3977
4035
|
|
3978
4036
|
|
3979
4037
|
# if @data['포스트설정']['태그삽입2'].checked?
|
@@ -5310,14 +5368,26 @@ class Wordpress
|
|
5310
5368
|
|
5311
5369
|
horizontal_box{
|
5312
5370
|
stretchy false
|
5313
|
-
|
5314
|
-
|
5371
|
+
grid{
|
5372
|
+
|
5373
|
+
@data['포스트설정']['대표사진설정'] = checkbox('대표 사진 지정하기'){
|
5374
|
+
top 0
|
5375
|
+
left 0
|
5376
|
+
|
5377
|
+
}
|
5378
|
+
@data['포스트설정']['대표사진넘버'] = entry{
|
5379
|
+
top 0
|
5380
|
+
left 1
|
5381
|
+
text '예로 2번째 사진이라면 2 입력'
|
5382
|
+
}
|
5383
|
+
}
|
5315
5384
|
}
|
5316
5385
|
horizontal_box{
|
5317
5386
|
stretchy false
|
5318
|
-
label('
|
5387
|
+
label('※이미지 리스트와 위 세팅을 하였다면 포스트설정1 탭에서 어떤위치(방식)으로 삽입시킬지 세팅이 필요합니다.'){
|
5319
5388
|
}
|
5320
5389
|
}
|
5390
|
+
|
5321
5391
|
vertical_separator{
|
5322
5392
|
stretchy false
|
5323
5393
|
}
|
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.120.
|
4
|
+
version: 111.120.013
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zon
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-07-
|
10
|
+
date: 2025-07-16 00:00:00.000000000 Z
|
11
11
|
dependencies: []
|
12
12
|
description: File to Clipboard gem
|
13
13
|
email: rnjstnswp123@naver.com
|