cafe_buy_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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cafe_buy_duo.rb +65 -27
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb6ef129b5267937b5e70cba626b17d6ba04f0af723c2505738fd8695180c1ca
4
- data.tar.gz: 7c78e4f4cdbb04673239884d6c347de883ecbbd48939d08a794c6fad3c09456c
3
+ metadata.gz: 84fa4f8c8718e29aeff055962df53b2890981b19c48196e3e09915d11ffccda1
4
+ data.tar.gz: ad7c2b1498ec10b460da8c18bf5593d1d29349c7414a91e6cfe89b29b8d17107
5
5
  SHA512:
6
- metadata.gz: f73db7b61de41cc135eac8db2671ab0a7aa74f6b15a887fd2b9626aa4d8cded5847c1c115ba0e25dae37b3626d0465779ce4e785ed16c4d4817e5d41259d5288
7
- data.tar.gz: 073c80ff54c3159cdef7b94f06f0013c2c917d60cef36f8f3b8bd2044744b445613a8516401b154388a9c9c17300f9cc699e759b6de98f6c054fd1c440bbb5b6
6
+ metadata.gz: 9018272c68a874c8bd151d67cf8b690dc1833bff040e8cac94552c7cf4a77425e965ace9352db5230ced415011eed669627c187a97861a1f026df43d952aac2c
7
+ data.tar.gz: bebd1d216706fe1f4f0aa2230939134867693801ac0763e8e39e12d788cf3539f489150ee176871c82cce4cb236b6252c5b00382709de633cc94fe34a0cc4f83
data/lib/cafe_buy_duo.rb CHANGED
@@ -1106,7 +1106,14 @@ end
1106
1106
  key_up('ctrl')
1107
1107
  sleep(3)
1108
1108
  key_stroke('enter')
1109
- sleep(3)
1109
+ sleep(2)
1110
+
1111
+ @driver.find_element(:xpath, '//*[@id="nvu_inp_box_title"]').send_keys(title)
1112
+ sleep(1)
1113
+ @driver.find_element(:xpath, '//*[@id="nvu_inp_box_description"]').send_keys(title)
1114
+ sleep(1)
1115
+ @driver.find_element(:xpath, '//*[@id="nvu_inp_box_tag"]').send_keys(title)
1116
+ sleep(1)
1110
1117
 
1111
1118
  for n in 1..10
1112
1119
  puts @driver.find_element(:xpath, '//*[@id="video-uploader-wrap"]/div/div/div[2]/div[1]/ul/li/div/button[1]/div[2]/em').text
@@ -1115,11 +1122,16 @@ end
1115
1122
  end
1116
1123
  sleep(10)
1117
1124
  end
1118
- @driver.find_element(:xpath, '//*[@id="nvu_inp_box_title"]').send_keys(title)
1119
- sleep(5)
1120
1125
  @driver.find_element(:xpath, '//*[@id="video-uploader-wrap"]/div/div/div[3]/button/span').click
1121
1126
  sleep(3)
1122
-
1127
+ @driver.action.key_down(:up).key_up(:up).perform #x탭
1128
+ sleep(1)
1129
+ @driver.find_element(:xpath, '//*[@class="se-placeholder __se_placeholder se-ff-system se-fs13"]').click
1130
+ @driver.action.send_keys(title).perform
1131
+ sleep(1)
1132
+ @driver.action.key_down(:enter).key_up(:enter).perform #엔터
1133
+ sleep(1)
1134
+
1123
1135
  elsif i2.to_s.include?('<inyonggoo')
1124
1136
  if i2.text == ''
1125
1137
 
@@ -2939,32 +2951,32 @@ class Wordpress
2939
2951
  end
2940
2952
 
2941
2953
  position = position.sort
2942
-
2943
- if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
2944
- image_url22 = get_image_file().force_encoding('utf-8')
2945
- end
2946
-
2947
- position.each do |i|
2948
- image_url = get_image_file().force_encoding('utf-8')
2949
- puts image_url
2950
-
2951
- puts '사진넣는위치 => '+i.to_s
2952
- if @data['포스트설정']['내용사진링크'].checked?
2953
- 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>'+""
2954
- content5.insert(i, '**image**')
2955
- else
2956
- image_memory << ""+'<img src="'+image_url+'" alt="'+keyword+'" class="aligncenter size-full">'+""
2957
- content5.insert(i, '**image**')
2958
- end
2959
- end
2960
-
2961
- if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
2962
- content = content5.join("\n")+'(자동생성글)'+content55
2954
+ ##여기서부터 이미지 순서대로 안되서 변경####-------------------------------------------------------------------------------
2955
+ # if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
2956
+ # image_url22 = get_image_file().force_encoding('utf-8')
2957
+ # end
2958
+
2959
+ # position.each do |i|
2960
+ # image_url = get_image_file().force_encoding('utf-8')
2961
+ # puts image_url
2962
+
2963
+ # puts '사진넣는위치 => '+i.to_s
2964
+ # if @data['포스트설정']['내용사진링크'].checked?
2965
+ # 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>'+""
2966
+ # content5.insert(i, '**image**')
2967
+ # else
2968
+ # image_memory << ""+'<img src="'+image_url+'" alt="'+keyword+'" class="aligncenter size-full">'+""
2969
+ # content5.insert(i, '**image**')
2970
+ # end
2971
+ # end
2972
+
2973
+ # if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
2974
+ # content = content5.join("\n")+'(자동생성글)'+content55
2963
2975
  # iconv = Iconv.new('UTF-8', 'ASCII-8BIT')
2964
2976
  # content = iconv.iconv(content)
2965
2977
  # content = content.encode('UTF-8', 'binary', invalid: :replace, replace: '')
2966
- puts content
2967
- image_url = image_url22
2978
+ # puts content
2979
+ # image_url = image_url22
2968
2980
 
2969
2981
  # if @data['포스트설정']['자동글 수식에 입력'].checked?
2970
2982
 
@@ -2975,6 +2987,32 @@ class Wordpress
2975
2987
  # content = content.split('(자동생성글)')[0]+""+'<img src="'+image_url+'" alt="'+keyword+'" >'+""+'(자동생성글)'+content.split('(자동생성글)')[1]
2976
2988
  # end
2977
2989
  # end
2990
+ ###여기까지 이미지 순서대로 안되서 변경##-------------------------------------------------------------------------------
2991
+
2992
+ ##여기서부터 이미지 순서대로 수정코드 변경####-------------------------------------------------------------------------------
2993
+ if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
2994
+ sleep(2)
2995
+ puts '이미지 자동 세탁 중 · · · '
2996
+ end
2997
+ sleep(2)
2998
+ position.each do |i|
2999
+ image_url22 = get_image_file().force_encoding('utf-8')
3000
+ puts image_url22
3001
+ puts '사진넣는위치 => '+i.to_s
3002
+ if @data['포스트설정']['내용사진링크'].checked?
3003
+ 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>'+""
3004
+ content5.insert(i, '**image**')
3005
+ else
3006
+ image_memory << ""+'<img src="'+image_url22+'" alt="'+keyword+'" class="aligncenter size-full">'+""
3007
+ content5.insert(i, '**image**')
3008
+ end
3009
+ end
3010
+ sleep(2)
3011
+ puts '이미지 자동 세탁 완료 · · · '
3012
+ if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
3013
+ content = content5.join("\n")+'(자동생성글)'+content55
3014
+ puts content
3015
+ ##여기서부터 이미지 순서대로 수정코드 변경####-------------------------------------------------------------------------------
2978
3016
  else
2979
3017
  content = content5.join("\n")
2980
3018
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cafe_buy_duo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
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-10-22 00:00:00.000000000 Z
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