cafe_basics_duo 0.0.1 → 0.0.5
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/cafe_basics_duo.rb +64 -26
- 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: 30fd6952925e1abcbc4ed6202a064ab76949699ae082141ae884dfca7bc2baf6
|
4
|
+
data.tar.gz: 46162ccd40b248cf8b477acbcad6eb79a8b514670b1ece492cc6104608a470a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90a6aea8c673743d96c7fa024a52a1b8cdafd8433e1d69ac3eb221855c69f397dedde46fab4bcd745fe8b8ebaf5aa70880d81ff82c43e5303c038f1116efd956
|
7
|
+
data.tar.gz: 1c85bcfee884d9cd1c98d5b5ff7784757ceb6f5c880f9d574ef12b1b3476050c54fd5be7488e06fbfd0fd9a16d2d0039e2be9f00d5d54273b26f398432034b45
|
data/lib/cafe_basics_duo.rb
CHANGED
@@ -787,7 +787,14 @@ class Naver
|
|
787
787
|
key_up('ctrl')
|
788
788
|
sleep(3)
|
789
789
|
key_stroke('enter')
|
790
|
-
sleep(
|
790
|
+
sleep(2)
|
791
|
+
|
792
|
+
@driver.find_element(:xpath, '//*[@id="nvu_inp_box_title"]').send_keys(title)
|
793
|
+
sleep(1)
|
794
|
+
@driver.find_element(:xpath, '//*[@id="nvu_inp_box_description"]').send_keys(title)
|
795
|
+
sleep(1)
|
796
|
+
@driver.find_element(:xpath, '//*[@id="nvu_inp_box_tag"]').send_keys(title)
|
797
|
+
sleep(1)
|
791
798
|
|
792
799
|
for n in 1..10
|
793
800
|
puts @driver.find_element(:xpath, '//*[@id="video-uploader-wrap"]/div/div/div[2]/div[1]/ul/li/div/button[1]/div[2]/em').text
|
@@ -796,10 +803,15 @@ class Naver
|
|
796
803
|
end
|
797
804
|
sleep(10)
|
798
805
|
end
|
799
|
-
@driver.find_element(:xpath, '//*[@id="nvu_inp_box_title"]').send_keys(title)
|
800
|
-
sleep(5)
|
801
806
|
@driver.find_element(:xpath, '//*[@id="video-uploader-wrap"]/div/div/div[3]/button/span').click
|
802
807
|
sleep(3)
|
808
|
+
@driver.action.key_down(:up).key_up(:up).perform #x탭
|
809
|
+
sleep(1)
|
810
|
+
@driver.find_element(:xpath, '//*[@class="se-placeholder __se_placeholder se-ff-system se-fs13"]').click
|
811
|
+
@driver.action.send_keys(title).perform
|
812
|
+
sleep(1)
|
813
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
814
|
+
sleep(1)
|
803
815
|
|
804
816
|
elsif i2.to_s.include?('<inyonggoo')
|
805
817
|
if i2.text == ''
|
@@ -2604,32 +2616,32 @@ class Wordpress
|
|
2604
2616
|
end
|
2605
2617
|
|
2606
2618
|
position = position.sort
|
2607
|
-
|
2608
|
-
if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
|
2609
|
-
image_url22 = get_image_file().force_encoding('utf-8')
|
2610
|
-
end
|
2611
|
-
|
2612
|
-
position.each do |i|
|
2613
|
-
image_url = get_image_file().force_encoding('utf-8')
|
2614
|
-
puts image_url
|
2615
|
-
|
2616
|
-
puts '사진넣는위치 => '+i.to_s
|
2617
|
-
if @data['포스트설정']['내용사진링크'].checked?
|
2618
|
-
image_memory << ""+'<a href="'+@data['포스트설정']['내용사진링크값'].text.to_s.force_encoding('utf-8').force_encoding('utf-8')+'"><img src="'+image_url+'" alt="'+keyword.force_encoding('utf-8')+'"></a>'+""
|
2619
|
-
content5.insert(i, '**image**')
|
2620
|
-
else
|
2621
|
-
image_memory << ""+'<img src="'+image_url+'" alt="'+keyword+'" class="aligncenter size-full">'+""
|
2622
|
-
content5.insert(i, '**image**')
|
2623
|
-
end
|
2624
|
-
end
|
2625
|
-
|
2626
|
-
if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
|
2627
|
-
content = content5.join("\n")+'(자동생성글)'+content55
|
2619
|
+
##여기서부터 이미지 순서대로 안되서 변경####-------------------------------------------------------------------------------
|
2620
|
+
# if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
|
2621
|
+
# image_url22 = get_image_file().force_encoding('utf-8')
|
2622
|
+
# end
|
2623
|
+
|
2624
|
+
# position.each do |i|
|
2625
|
+
# image_url = get_image_file().force_encoding('utf-8')
|
2626
|
+
# puts image_url
|
2627
|
+
|
2628
|
+
# puts '사진넣는위치 => '+i.to_s
|
2629
|
+
# if @data['포스트설정']['내용사진링크'].checked?
|
2630
|
+
# image_memory << ""+'<a href="'+@data['포스트설정']['내용사진링크값'].text.to_s.force_encoding('utf-8').force_encoding('utf-8')+'"><img src="'+image_url+'" alt="'+keyword.force_encoding('utf-8')+'"></a>'+""
|
2631
|
+
# content5.insert(i, '**image**')
|
2632
|
+
# else
|
2633
|
+
# image_memory << ""+'<img src="'+image_url+'" alt="'+keyword+'" class="aligncenter size-full">'+""
|
2634
|
+
# content5.insert(i, '**image**')
|
2635
|
+
# end
|
2636
|
+
# end
|
2637
|
+
|
2638
|
+
# if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
|
2639
|
+
# content = content5.join("\n")+'(자동생성글)'+content55
|
2628
2640
|
# iconv = Iconv.new('UTF-8', 'ASCII-8BIT')
|
2629
2641
|
# content = iconv.iconv(content)
|
2630
2642
|
# content = content.encode('UTF-8', 'binary', invalid: :replace, replace: '')
|
2631
|
-
puts content
|
2632
|
-
image_url = image_url22
|
2643
|
+
# puts content
|
2644
|
+
# image_url = image_url22
|
2633
2645
|
|
2634
2646
|
# if @data['포스트설정']['자동글 수식에 입력'].checked?
|
2635
2647
|
|
@@ -2640,6 +2652,32 @@ class Wordpress
|
|
2640
2652
|
# content = content.split('(자동생성글)')[0]+""+'<img src="'+image_url+'" alt="'+keyword+'" >'+""+'(자동생성글)'+content.split('(자동생성글)')[1]
|
2641
2653
|
# end
|
2642
2654
|
# end
|
2655
|
+
###여기까지 이미지 순서대로 안되서 변경##-------------------------------------------------------------------------------
|
2656
|
+
|
2657
|
+
##여기서부터 이미지 순서대로 수정코드 변경####-------------------------------------------------------------------------------
|
2658
|
+
if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
|
2659
|
+
sleep(2)
|
2660
|
+
puts '이미지 자동 세탁 중 · · · '
|
2661
|
+
end
|
2662
|
+
sleep(2)
|
2663
|
+
position.each do |i|
|
2664
|
+
image_url22 = get_image_file().force_encoding('utf-8')
|
2665
|
+
puts image_url22
|
2666
|
+
puts '사진넣는위치 => '+i.to_s
|
2667
|
+
if @data['포스트설정']['내용사진링크'].checked?
|
2668
|
+
image_memory << ""+'<a href="'+@data['포스트설정']['내용사진링크값'].text.to_s.force_encoding('utf-8').force_encoding('utf-8')+'"><img src="'+image_url22+'" alt="'+keyword.force_encoding('utf-8')+'"></a>'+""
|
2669
|
+
content5.insert(i, '**image**')
|
2670
|
+
else
|
2671
|
+
image_memory << ""+'<img src="'+image_url22+'" alt="'+keyword+'" class="aligncenter size-full">'+""
|
2672
|
+
content5.insert(i, '**image**')
|
2673
|
+
end
|
2674
|
+
end
|
2675
|
+
sleep(2)
|
2676
|
+
puts '이미지 자동 세탁 완료 · · · '
|
2677
|
+
if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
|
2678
|
+
content = content5.join("\n")+'(자동생성글)'+content55
|
2679
|
+
puts content
|
2680
|
+
##여기서부터 이미지 순서대로 수정코드 변경####-------------------------------------------------------------------------------
|
2643
2681
|
else
|
2644
2682
|
content = content5.join("\n")
|
2645
2683
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cafe_basics_duo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: File to Clipboard gem
|
14
14
|
email: mymin26@naver.com
|