cafe_basics 0.0.1 → 0.0.3
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.rb +65 -27
- 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: de9e856e2bb0e9839d659836e9b41b801b15c5de228b99a78e8ab74e2a59533a
|
4
|
+
data.tar.gz: 31244d75fdc88f4b8b8fb60837451b8148722cddab006e6852b3dbe6684280ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36e31c9118abce383f775eecbb98cfac32cb7dd41c1358d9f81f6831b793297cfac34788e0a96b15cc07b1fb192cc37c680f768b29b6405fbe56d8ec45668c4e
|
7
|
+
data.tar.gz: 00a8096966dd91fd2e9c0f3cbee9e1bf7514481dc8b6d20db01cc7ce7e58705373bfba5bf671c98097a9c7e4a26529f669dd25eb15a1691a7085c0fc4bfc377f
|
data/lib/cafe_basics.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
|
+
|
814
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
803
815
|
|
804
816
|
elsif i2.to_s.include?('<inyonggoo')
|
805
817
|
if i2.text == ''
|
@@ -2534,33 +2546,33 @@ class Wordpress
|
|
2534
2546
|
end
|
2535
2547
|
end
|
2536
2548
|
|
2537
|
-
|
2538
|
-
|
2539
|
-
if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
|
2540
|
-
image_url22 = get_image_file().force_encoding('utf-8')
|
2541
|
-
end
|
2542
|
-
|
2543
|
-
position.each do |i|
|
2544
|
-
image_url = get_image_file().force_encoding('utf-8')
|
2545
|
-
puts image_url
|
2546
|
-
|
2547
|
-
puts '사진넣는위치 => '+i.to_s
|
2548
|
-
if @data['포스트설정']['내용사진링크'].checked?
|
2549
|
-
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>'+""
|
2550
|
-
content5.insert(i, '**image**')
|
2551
|
-
else
|
2552
|
-
image_memory << ""+'<img src="'+image_url+'" alt="'+keyword+'" class="aligncenter size-full">'+""
|
2553
|
-
content5.insert(i, '**image**')
|
2554
|
-
end
|
2555
|
-
end
|
2556
|
-
|
2557
|
-
if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
|
2558
|
-
content = content5.join("\n")+'(자동생성글)'+content55
|
2549
|
+
position = position.sort
|
2550
|
+
##여기서부터 이미지 순서대로 안되서 변경####-------------------------------------------------------------------------------
|
2551
|
+
# if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
|
2552
|
+
# image_url22 = get_image_file().force_encoding('utf-8')
|
2553
|
+
# end
|
2554
|
+
|
2555
|
+
# position.each do |i|
|
2556
|
+
# image_url = get_image_file().force_encoding('utf-8')
|
2557
|
+
# puts image_url
|
2558
|
+
|
2559
|
+
# puts '사진넣는위치 => '+i.to_s
|
2560
|
+
# if @data['포스트설정']['내용사진링크'].checked?
|
2561
|
+
# 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>'+""
|
2562
|
+
# content5.insert(i, '**image**')
|
2563
|
+
# else
|
2564
|
+
# image_memory << ""+'<img src="'+image_url+'" alt="'+keyword+'" class="aligncenter size-full">'+""
|
2565
|
+
# content5.insert(i, '**image**')
|
2566
|
+
# end
|
2567
|
+
# end
|
2568
|
+
|
2569
|
+
# if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
|
2570
|
+
# content = content5.join("\n")+'(자동생성글)'+content55
|
2559
2571
|
# iconv = Iconv.new('UTF-8', 'ASCII-8BIT')
|
2560
2572
|
# content = iconv.iconv(content)
|
2561
2573
|
# content = content.encode('UTF-8', 'binary', invalid: :replace, replace: '')
|
2562
|
-
puts content
|
2563
|
-
image_url = image_url22
|
2574
|
+
# puts content
|
2575
|
+
# image_url = image_url22
|
2564
2576
|
|
2565
2577
|
# if @data['포스트설정']['자동글 수식에 입력'].checked?
|
2566
2578
|
|
@@ -2571,6 +2583,32 @@ class Wordpress
|
|
2571
2583
|
# content = content.split('(자동생성글)')[0]+""+'<img src="'+image_url+'" alt="'+keyword+'" >'+""+'(자동생성글)'+content.split('(자동생성글)')[1]
|
2572
2584
|
# end
|
2573
2585
|
# end
|
2586
|
+
###여기까지 이미지 순서대로 안되서 변경##-------------------------------------------------------------------------------
|
2587
|
+
|
2588
|
+
##여기서부터 이미지 순서대로 수정코드 변경####-------------------------------------------------------------------------------
|
2589
|
+
if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
|
2590
|
+
sleep(2)
|
2591
|
+
puts '이미지 자동 세탁 중 · · · '
|
2592
|
+
end
|
2593
|
+
sleep(2)
|
2594
|
+
position.each do |i|
|
2595
|
+
image_url22 = get_image_file().force_encoding('utf-8')
|
2596
|
+
puts image_url22
|
2597
|
+
puts '사진넣는위치 => '+i.to_s
|
2598
|
+
if @data['포스트설정']['내용사진링크'].checked?
|
2599
|
+
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>'+""
|
2600
|
+
content5.insert(i, '**image**')
|
2601
|
+
else
|
2602
|
+
image_memory << ""+'<img src="'+image_url22+'" alt="'+keyword+'" class="aligncenter size-full">'+""
|
2603
|
+
content5.insert(i, '**image**')
|
2604
|
+
end
|
2605
|
+
end
|
2606
|
+
sleep(2)
|
2607
|
+
puts '이미지 자동 세탁 완료 · · · '
|
2608
|
+
if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
|
2609
|
+
content = content5.join("\n")+'(자동생성글)'+content55
|
2610
|
+
puts content
|
2611
|
+
##여기서부터 이미지 순서대로 수정코드 변경####-------------------------------------------------------------------------------
|
2574
2612
|
else
|
2575
2613
|
content = content5.join("\n")
|
2576
2614
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cafe_basics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
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
|