cafe_basics_duo 0.1.33 → 0.1.36

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_basics_duo.rb +90 -29
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d41dca52ce32f729520ea19c0fee538e127cd50ddc24c45897883ee4dd09b331
4
- data.tar.gz: 40cff0587a7ee6f9b14819b5b062014388acf818a401255bd6e72bb9dae93ea0
3
+ metadata.gz: ed29b474605d5e69da6839887f2098f9440775ec05d0702341b143138a0c654b
4
+ data.tar.gz: bdb4ed6fee966c5f02f4089f2ad2f60858bcd3e2cc4d778848130cc642fd355c
5
5
  SHA512:
6
- metadata.gz: 620006031154254fc4a75709d8344dd6b60318e502bd374b045741a904f62de5e45411e2a7fc10a398922eb810b82821210f7c5b5feff9025d287afeeaa50fb4
7
- data.tar.gz: 2bd6b2d74f70ecf298fbefc1fde2c1c7f4484e49c2c99a5600d88171c4fcc84bf1a857daa74b5e525d3e3c42c8e4141a53fca78b2ae0cb269278002376bfe795
6
+ metadata.gz: a191bbefbfbfc7a7f1a46a6de3578da551839430a635d0add360e8e6572c076f1ace730a3fa45ddbe70e62f31b1adf1dc52ec369b0f56682afc260639231b4bf
7
+ data.tar.gz: 65dc2ff26d0ffc33ace43524d2c729a554aae460a5e11241865cdb089142cad4a277905226905993b143b84f55aefbd7e53935948ffb4b6f295f733eed3848c9
@@ -1,6 +1,6 @@
1
1
  require 'glimmer-dsl-libui'
2
2
  require 'selenium-webdriver'
3
- require 'webdrivers'
3
+ #require 'webdrivers'
4
4
  require 'iconv'
5
5
  require 'nokogiri'
6
6
  require 'http'
@@ -241,25 +241,6 @@ end
241
241
  class Naver
242
242
  def initialize
243
243
  @seed = 1
244
-
245
- begin
246
- # webdrivers가 사용자의 Chrome 버전에 맞는 chromedriver 다운로드 시도
247
-
248
- # Webdrivers가 드라이버를 다운로드할 경로를 설정
249
- Webdrivers.cache_time = 86_400 # 하루로 설정 (기본값: 86_400초)
250
- Webdrivers.install_dir = "./" # 크롬드라이버를 수동으로 설치할 경로를 설정
251
- # 크롬드라이버 자동 업데이트 시도
252
- Webdrivers::Chromedriver.update
253
- puts "chromedriver 자동 다운로드 성공"
254
- rescue => e
255
- puts "chromedriver 자동 다운로드 실패: #{e.message}"
256
- puts "폴더내 크롬드라이버를 사용합니다."
257
- puts "크롬드라이버가 오래된 경우 오류 발생될 수 있으며, 만일 오류 발생시 아래 지침을 따라주세요."
258
- puts "1.크롬 업데이트 2.프로그램 폴더 내부에 ★tip★-시작시-크롬창이....파일을 열어 드라이버를 교체하세요."
259
- chromedriver_path = './chromedriver.exe' # 수동 경로를 인스턴스 변수로 설정
260
- Selenium::WebDriver::Chrome::Service.driver_path = chromedriver_path
261
- end
262
-
263
244
  end
264
245
 
265
246
 
@@ -281,6 +262,18 @@ class Naver
281
262
  FileUtils.mkdir_p(naver_cookie_dir) unless File.exist?(naver_cookie_dir)
282
263
  if proxy == ''
283
264
  begin
265
+ begin
266
+ Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
267
+ rescue => e
268
+ puts "chromedriver 버전 불일치!!"
269
+ puts "아래 지침을 따라주세요."
270
+ puts "1.프로그램 종료!"
271
+ puts "2.크롬 업데이트!"
272
+ puts "3.프로그램 폴더 내부에 ★tip★-시작시-크롬창이....파일 실행"
273
+ puts "4.안내된 방식으로 크롬 드라이버 교체"
274
+ puts "5.재 시작"
275
+ exit 1
276
+ end
284
277
  options = Selenium::WebDriver::Chrome::Options.new
285
278
  options.add_argument('--no-first-run') # 자동 실행 시 나타나는 "첫 실행" 화면 방지
286
279
  #options.add_argument('--disable-extensions') # 확장 프로그램 초기화 화면 방지
@@ -308,7 +301,18 @@ class Naver
308
301
  end
309
302
  else
310
303
  begin
311
- #Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
304
+ begin
305
+ Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
306
+ rescue => e
307
+ puts "chromedriver 버전 불일치!!"
308
+ puts "아래 지침을 따라주세요."
309
+ puts "1.프로그램 종료!"
310
+ puts "2.크롬 업데이트!"
311
+ puts "3.프로그램 폴더 내부에 ★tip★-시작시-크롬창이....파일 실행"
312
+ puts "4.안내된 방식으로 크롬 드라이버 교체"
313
+ puts "5.재 시작"
314
+ exit 1
315
+ end
312
316
  options = Selenium::WebDriver::Chrome::Options.new
313
317
  options.add_argument('--no-first-run') # 자동 실행 시 나타나는 "첫 실행" 화면 방지
314
318
  options.add_argument('--disable-extensions') # 확장 프로그램 초기화 화면 방지
@@ -335,7 +339,18 @@ class Naver
335
339
  puts e
336
340
  puts 'proxy error...'
337
341
  begin
338
- #Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
342
+ begin
343
+ Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
344
+ rescue => e
345
+ puts "chromedriver 버전 불일치!!"
346
+ puts "아래 지침을 따라주세요."
347
+ puts "1.프로그램 종료!"
348
+ puts "2.크롬 업데이트!"
349
+ puts "3.프로그램 폴더 내부에 ★tip★-시작시-크롬창이....파일 실행"
350
+ puts "4.안내된 방식으로 크롬 드라이버 교체"
351
+ puts "5.재 시작"
352
+ exit 1
353
+ end
339
354
  options = Selenium::WebDriver::Chrome::Options.new
340
355
  options.add_argument('--no-first-run') # 자동 실행 시 나타나는 "첫 실행" 화면 방지
341
356
  options.add_argument('--disable-extensions') # 확장 프로그램 초기화 화면 방지
@@ -2170,18 +2185,40 @@ class Wordpress
2170
2185
  image_filter()
2171
2186
  end
2172
2187
 
2173
- insert_image_text1 = ''
2174
- insert_image_text2 = ''
2175
2188
  if @data['이미지설정']['글자삽입1'].checked?
2176
- insert_image_text1 = @data['이미지설정']['이미지글자1'].sample
2189
+ if @data['이미지설정']['이미지글자1'].length == 0
2190
+ image_text_path1 = ''
2191
+ else
2192
+ if @data['이미지설정']['글자랜덤'].checked?
2193
+ image_text_path1 = @data['이미지설정']['이미지글자1'].sample
2194
+ else
2195
+ image_text_path1 = @data['이미지설정']['이미지글자1'][@image_text_soon1]
2196
+ @image_text_soon1 += 1
2197
+ if @image_text_soon1 > @data['이미지설정']['이미지글자1'].length - 1
2198
+ @image_text_soon1 = 0
2199
+ end
2200
+ end
2201
+ end
2177
2202
  end
2178
2203
 
2179
2204
  if @data['이미지설정']['글자삽입2'].checked?
2180
- insert_image_text2 = @data['이미지설정']['이미지글자2'].sample
2205
+ if @data['이미지설정']['이미지글자2'].length == 0
2206
+ image_text_path2 = ''
2207
+ else
2208
+ if @data['이미지설정']['글자랜덤'].checked?
2209
+ image_text_path2 = @data['이미지설정']['이미지글자2'].sample
2210
+ else
2211
+ image_text_path2 = @data['이미지설정']['이미지글자2'][@image_text_soon2]
2212
+ @image_text_soon2 += 1
2213
+ if @image_text_soon2 > @data['이미지설정']['이미지글자2'].length - 1
2214
+ @image_text_soon2 = 0
2215
+ end
2216
+ end
2217
+ end
2181
2218
  end
2182
-
2219
+
2183
2220
  if @data['이미지설정']['글자삽입1'].checked? or @data['이미지설정']['글자삽입2'].checked?
2184
- image_text(insert_image_text1, insert_image_text2)
2221
+ image_text(image_text_path1, image_text_path2)
2185
2222
  end
2186
2223
 
2187
2224
  if @data['이미지설정']['테두리사용'].checked?
@@ -2245,6 +2282,8 @@ class Wordpress
2245
2282
  title_soon = 0
2246
2283
  keyword_soon = 0
2247
2284
  content_soon = 0
2285
+ @image_text_soon1 = 0
2286
+ @image_text_soon2 = 0
2248
2287
  @my_ip = 'init'
2249
2288
  @image_counter = 0
2250
2289
  @inumber2 = 0
@@ -4485,9 +4524,30 @@ class Wordpress
4485
4524
  top 1
4486
4525
  left 6
4487
4526
  }
4488
- @data['이미지설정']['필터사용'] = checkbox('필터사용(색상 사진 적용불가)'){
4527
+ @data['이미지설정']['글자순서'] = checkbox('글자 리스트 순서대로 사용'){
4489
4528
  top 2
4490
4529
  left 0
4530
+ on_toggled{
4531
+ if @data['이미지설정']['글자순서'].checked?
4532
+ @data['이미지설정']['글자랜덤'].checked = false
4533
+ end
4534
+ }
4535
+ }
4536
+
4537
+ @data['이미지설정']['글자랜덤'] = checkbox('글자 리스트 랜덤으로 사용'){
4538
+ top 2
4539
+ left 1
4540
+ on_toggled{
4541
+ if @data['이미지설정']['글자랜덤'].checked?
4542
+ @data['이미지설정']['글자순서'].checked = false
4543
+ end
4544
+ }
4545
+ }
4546
+
4547
+
4548
+ @data['이미지설정']['필터사용'] = checkbox('필터사용(색상 사진 적용불가)'){
4549
+ top 2
4550
+ left 2
4491
4551
  }
4492
4552
  @data['이미지설정']['테두리사용'] = checkbox('테두리 사용'){
4493
4553
  top 3
@@ -5398,6 +5458,7 @@ class Wordpress
5398
5458
  @data['포스트설정']['자동출처 사용'].checked = false
5399
5459
  @data['포스트설정']['CCL사용'].checked = false
5400
5460
  @data['포스트설정']['인용구랜덤'].checked = true
5461
+ @data['이미지설정']['글자순서'].checked = true
5401
5462
  }.show
5402
5463
  end
5403
5464
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cafe_basics_duo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.33
4
+ version: 0.1.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - zon
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-04-24 00:00:00.000000000 Z
10
+ date: 2025-05-23 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: File to Clipboard gem
13
13
  email: mymin26@naver.com