duo_cafe_comment 0.0.37 → 0.0.50

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/duo_cafe_comment.rb +59 -38
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67b74f8adb28747ea69dc9d12621e0bebf3d58289b08321c33da66d132306d98
4
- data.tar.gz: d3c7a576cdd74eff93c5b0fce1248cf1829d4c20279f6712508dd6cb1c6e6fe4
3
+ metadata.gz: cabde427e0735c5601a9e4eb4b65f902f9142d77e98b0d9dd13df2219ef9510a
4
+ data.tar.gz: fe91ed61260c781797a8bea41bb1d969e7bbff944161bcbdfa9f5dc425dd47a1
5
5
  SHA512:
6
- metadata.gz: 61318dfbc068e9d62ecb41a1e4f42d53411af9f46fe973e94a87cb3f6704d40c5d9bc880d3a9d9899bca208266b5ebe68b392b6a3558dc4859b44de44a43f5d2
7
- data.tar.gz: 11592ec23ca0baca7bef3dd8ff537848fd3d4824a458949941ed7e30e85539fbd35d3f904c7cf875ae0e5c232cb982968ef832af2d17b92a13086dee7b8d4cbd
6
+ metadata.gz: 78dc732b8c047feb5a5a82340ee93785c8940b050edf580c6a90c807386a663eef1b7bd6756478750a5b6189e2797c045f377bc40289323af37f694e8b4fff4d
7
+ data.tar.gz: cf8d99978872ed86f7f8352ec0e552290505bb26bc994f575bec1ddcb8976085fcf00dbc8bcb3f0aea04ad982cb92779621b8651d9069fe6883ca0579391a8a4
@@ -493,21 +493,22 @@ class Naver
493
493
  sleep(1)
494
494
  @driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="cafe_main"]')) # 아이프레임 선택
495
495
 
496
- content_soon = 0
497
- # 💬 content 설정 (여기 추가!)
498
- if @data['내용설정']['내용'].nil? || @data['내용설정']['내용'].empty?
499
- content = ''
500
- else
501
- if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
502
- content = @data['내용설정']['내용'].sample[2] # 랜덤 사용 시
496
+ if @data['포스트설정']['순서사용2'].checked?
497
+ @content_soon ||= 0 # 초기 번만 0으로 세팅
498
+
499
+ if @data['내용설정']['내용'].nil? || @data['내용설정']['내용'].empty?
500
+ content = ''
503
501
  else
504
- content = @data['내용설정']['내용'][content_soon][2] # 순차적으로 사용
505
- content_soon += 1
506
- if content_soon >= @data['내용설정']['내용'].length
507
- content_soon = 0
502
+ if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
503
+ content = @data['내용설정']['내용'].sample[2]
504
+ else
505
+ content = @data['내용설정']['내용'][@content_soon][2]
506
+ @content_soon += 1
507
+ @content_soon = 0 if @content_soon >= @data['내용설정']['내용'].length
508
508
  end
509
509
  end
510
- end
510
+ else
511
+ end
511
512
 
512
513
  # 디엠 자동 변경이 체크된 경우 content를 변환
513
514
  if @data['포스트설정']['내용자동변경'].checked?
@@ -755,21 +756,22 @@ class Naver
755
756
  sleep(1)
756
757
  @driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="cafe_main"]')) # 아이프레임 선택
757
758
 
758
- content_soon = 0
759
- # 💬 content 설정 (여기 추가!)
760
- if @data['내용설정']['내용'].nil? || @data['내용설정']['내용'].empty?
761
- content = ''
762
- else
763
- if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
764
- content = @data['내용설정']['내용'].sample[2] # 랜덤 사용 시
759
+ if @data['포스트설정']['순서사용2'].checked?
760
+ @content_soon ||= 0 # 초기 번만 0으로 세팅
761
+
762
+ if @data['내용설정']['내용'].nil? || @data['내용설정']['내용'].empty?
763
+ content = ''
765
764
  else
766
- content = @data['내용설정']['내용'][content_soon][2] # 순차적으로 사용
767
- content_soon += 1
768
- if content_soon >= @data['내용설정']['내용'].length
769
- content_soon = 0
765
+ if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
766
+ content = @data['내용설정']['내용'].sample[2]
767
+ else
768
+ content = @data['내용설정']['내용'][@content_soon][2]
769
+ @content_soon += 1
770
+ @content_soon = 0 if @content_soon >= @data['내용설정']['내용'].length
770
771
  end
771
772
  end
772
- end
773
+ else
774
+ end
773
775
 
774
776
  # 디엠 자동 변경이 체크된 경우 content를 변환
775
777
  if @data['포스트설정']['내용자동변경'].checked?
@@ -1103,21 +1105,22 @@ class Naver
1103
1105
  sleep(1)
1104
1106
  @driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="cafe_main"]')) # 아이프레임 선택
1105
1107
 
1106
- content_soon = 0
1107
- # 💬 content 설정 (여기 추가!)
1108
- if @data['내용설정']['내용'].nil? || @data['내용설정']['내용'].empty?
1109
- content = ''
1110
- else
1111
- if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
1112
- content = @data['내용설정']['내용'].sample[2] # 랜덤 사용 시
1108
+ if @data['포스트설정']['순서사용2'].checked?
1109
+ @content_soon ||= 0 # 초기 번만 0으로 세팅
1110
+
1111
+ if @data['내용설정']['내용'].nil? || @data['내용설정']['내용'].empty?
1112
+ content = ''
1113
1113
  else
1114
- content = @data['내용설정']['내용'][content_soon][2] # 순차적으로 사용
1115
- content_soon += 1
1116
- if content_soon >= @data['내용설정']['내용'].length
1117
- content_soon = 0
1114
+ if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
1115
+ content = @data['내용설정']['내용'].sample[2]
1116
+ else
1117
+ content = @data['내용설정']['내용'][@content_soon][2]
1118
+ @content_soon += 1
1119
+ @content_soon = 0 if @content_soon >= @data['내용설정']['내용'].length
1118
1120
  end
1119
1121
  end
1120
- end
1122
+ else
1123
+ end
1121
1124
 
1122
1125
  # 디엠 자동 변경이 체크된 경우 content를 변환
1123
1126
  if @data['포스트설정']['내용자동변경'].checked?
@@ -1713,7 +1716,14 @@ end
1713
1716
  @data['table'] << []
1714
1717
  @data['table'].pop
1715
1718
 
1716
-
1719
+ if @data['포스트설정']['순서사용2'].checked?
1720
+ option['순서사용2'] = 'true'
1721
+ else
1722
+ option['순서사용2'] = 'false'
1723
+ end
1724
+ @data['table'][index][-1] = 35
1725
+ @data['table'] << []
1726
+ @data['table'].pop
1717
1727
 
1718
1728
  #네이버로그인
1719
1729
  login_check = naver.login(user_id, user_pw, option['proxy'])
@@ -2901,11 +2911,21 @@ end
2901
2911
 
2902
2912
  horizontal_box{
2903
2913
  stretchy false
2904
- @data['내용설정']['순서사용'] = checkbox('순서사용'){
2914
+ @data['내용설정']['순서사용'] = checkbox('계정마다 순서사용'){
2905
2915
  stretchy false
2906
2916
  on_toggled{ |c|
2907
2917
  if c.checked?
2908
2918
  @data['내용설정']['랜덤사용'].checked = false
2919
+ @data['포스트설정']['순서사용2'].checked = false
2920
+ end
2921
+ }
2922
+ }
2923
+ @data['포스트설정']['순서사용2'] = checkbox('게시글마다 순서사용'){
2924
+ stretchy false
2925
+ on_toggled{ |c|
2926
+ if c.checked?
2927
+ @data['내용설정']['랜덤사용'].checked = false
2928
+ @data['내용설정']['순서사용'].checked = false
2909
2929
  end
2910
2930
  }
2911
2931
  }
@@ -2914,6 +2934,7 @@ end
2914
2934
  on_toggled{ |c|
2915
2935
  if c.checked?
2916
2936
  @data['내용설정']['순서사용'].checked = false
2937
+ @data['포스트설정']['순서사용2'].checked = false
2917
2938
  end
2918
2939
  }
2919
2940
  }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: duo_cafe_comment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.37
4
+ version: 0.0.50
5
5
  platform: ruby
6
6
  authors:
7
7
  - zon
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-06-12 00:00:00.000000000 Z
10
+ date: 2025-06-27 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: File to Clipboard gem
13
13
  email: mymin26@naver.com