cafe_buy 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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cafe_buy.rb +66 -27
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3496d677b8d99062764bb64f2b533b7a0f21e0723dfaad969f56cf39049a9cb3
4
- data.tar.gz: 4b4ab743e19492454d9f35d443fd605cd1099b94a2476019ec850caaab3b2bcc
3
+ metadata.gz: 4feb55f0f13d7e5c650f7b6dbf2b469a6984ea798111eca665179a6cd3455b9c
4
+ data.tar.gz: 065def18e36cd7871eb7474263fb39f00dbc57d4e1ea75e895021a42373e8287
5
5
  SHA512:
6
- metadata.gz: 964c96d31dea6da798729bdbbd1b945b8bb07b4128c05cc5febe5ac194d855a1092caaca9710d0decb63bdf63f3831c16d69b686b7b46aeffa0c0ab17b33c6ec
7
- data.tar.gz: 582f6b9750438eb0c361b936ec280434d88bef981a3b84f9cce227d50bd9671250589d43cdc42308a1335aa7206883ed2ddd27f8a6694c5b94fb5ea013fee22f
6
+ metadata.gz: 984e47ea3e4f5285edabed02505226c8025571db386555b5302362678694ba885eeae8e4f2fa1ceb4ca229515f97a98fb78e9c41d485f05e2c2019d16c6c99e4
7
+ data.tar.gz: c43b511a84e2ce8ebb65207fc29008aa0dc8ce98f963c5b21dfa636a4a4ce13bc32861302a11dbf18f9520b8da8afd84bd3c4a4979d449dcf4de7d5c9cf26978
data/lib/cafe_buy.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,10 +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)
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
+
1133
+ @driver.action.key_down(:enter).key_up(:enter).perform #엔터
1134
+
1122
1135
 
1123
1136
  elsif i2.to_s.include?('<inyonggoo')
1124
1137
  if i2.text == ''
@@ -2869,33 +2882,33 @@ class Wordpress
2869
2882
  end
2870
2883
  end
2871
2884
 
2872
- position = position.sort
2873
-
2874
- if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
2875
- image_url22 = get_image_file().force_encoding('utf-8')
2876
- end
2877
-
2878
- position.each do |i|
2879
- image_url = get_image_file().force_encoding('utf-8')
2880
- puts image_url
2881
-
2882
- puts '사진넣는위치 => '+i.to_s
2883
- if @data['포스트설정']['내용사진링크'].checked?
2884
- 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>'+""
2885
- content5.insert(i, '**image**')
2886
- else
2887
- image_memory << ""+'<img src="'+image_url+'" alt="'+keyword+'" class="aligncenter size-full">'+""
2888
- content5.insert(i, '**image**')
2889
- end
2890
- end
2891
-
2892
- if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
2893
- content = content5.join("\n")+'(자동생성글)'+content55
2885
+ position = position.sort
2886
+ ##여기서부터 이미지 순서대로 안되서 변경####-------------------------------------------------------------------------------
2887
+ # if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
2888
+ # image_url22 = get_image_file().force_encoding('utf-8')
2889
+ # end
2890
+
2891
+ # position.each do |i|
2892
+ # image_url = get_image_file().force_encoding('utf-8')
2893
+ # puts image_url
2894
+
2895
+ # puts '사진넣는위치 => '+i.to_s
2896
+ # if @data['포스트설정']['내용사진링크'].checked?
2897
+ # 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>'+""
2898
+ # content5.insert(i, '**image**')
2899
+ # else
2900
+ # image_memory << ""+'<img src="'+image_url+'" alt="'+keyword+'" class="aligncenter size-full">'+""
2901
+ # content5.insert(i, '**image**')
2902
+ # end
2903
+ # end
2904
+
2905
+ # if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
2906
+ # content = content5.join("\n")+'(자동생성글)'+content55
2894
2907
  # iconv = Iconv.new('UTF-8', 'ASCII-8BIT')
2895
2908
  # content = iconv.iconv(content)
2896
2909
  # content = content.encode('UTF-8', 'binary', invalid: :replace, replace: '')
2897
- puts content
2898
- image_url = image_url22
2910
+ # puts content
2911
+ # image_url = image_url22
2899
2912
 
2900
2913
  # if @data['포스트설정']['자동글 수식에 입력'].checked?
2901
2914
 
@@ -2906,6 +2919,32 @@ class Wordpress
2906
2919
  # content = content.split('(자동생성글)')[0]+""+'<img src="'+image_url+'" alt="'+keyword+'" >'+""+'(자동생성글)'+content.split('(자동생성글)')[1]
2907
2920
  # end
2908
2921
  # end
2922
+ ###여기까지 이미지 순서대로 안되서 변경##-------------------------------------------------------------------------------
2923
+
2924
+ ##여기서부터 이미지 순서대로 수정코드 변경####-------------------------------------------------------------------------------
2925
+ if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
2926
+ sleep(2)
2927
+ puts '이미지 자동 세탁 중 · · · '
2928
+ end
2929
+ sleep(2)
2930
+ position.each do |i|
2931
+ image_url22 = get_image_file().force_encoding('utf-8')
2932
+ puts image_url22
2933
+ puts '사진넣는위치 => '+i.to_s
2934
+ if @data['포스트설정']['내용사진링크'].checked?
2935
+ 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>'+""
2936
+ content5.insert(i, '**image**')
2937
+ else
2938
+ image_memory << ""+'<img src="'+image_url22+'" alt="'+keyword+'" class="aligncenter size-full">'+""
2939
+ content5.insert(i, '**image**')
2940
+ end
2941
+ end
2942
+ sleep(2)
2943
+ puts '이미지 자동 세탁 완료 · · · '
2944
+ if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt'].checked?
2945
+ content = content5.join("\n")+'(자동생성글)'+content55
2946
+ puts content
2947
+ ##여기서부터 이미지 순서대로 수정코드 변경####-------------------------------------------------------------------------------
2909
2948
  else
2910
2949
  content = content5.join("\n")
2911
2950
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cafe_buy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
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-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