nblog_duo 0.0.10 → 0.0.35
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/nblog_duo.rb +508 -196
- 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: 35c0a926935a5ca9f9c33424eab9c744482fae147e5b9aca1e27e5c4868162a2
|
4
|
+
data.tar.gz: 42f5e94c06b35d4634043989878b38774179a136de1397b3b8b1cd64af8c5a07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1fa9ce9149974af71edfafb728b5aec867d763fb3170874548e58b37a733c92908b9d006c9af4d04574e5581dd4449fdd5eada7374f5dc81eaad36cf7b22185
|
7
|
+
data.tar.gz: 803c23a9baeb37798b5adda82cbf5eaaee49760bfb3e87d309102067dd145c8fa5599e9846fe5d5ac5dfcfcc5bd6c87515554aa99faa12a61cd0bb99fc5cf7ed
|
data/lib/nblog_duo.rb
CHANGED
@@ -607,43 +607,76 @@ class Naver
|
|
607
607
|
@driver.find_element(:xpath, '//*[@data-log="ltpl.my"]').click
|
608
608
|
sleep(1)
|
609
609
|
begin
|
610
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 3.7)
|
611
|
+
wait.until { @driver.find_element(:xpath, '//*[@id="'+page_id+'"]/div[1]/div/div[1]/aside/div/div[3]/div[1]/div[2]/ul/li['+template.to_s+']/a') }
|
610
612
|
@driver.find_element(:xpath, '//*[@id="'+page_id+'"]/div[1]/div/div[1]/aside/div/div[3]/div[1]/div[2]/ul/li['+template.to_s+']/a').click
|
611
613
|
puts '탬플릿 ['+template.to_s+'] 번을 사용합니다'
|
614
|
+
sleep(1)
|
612
615
|
rescue
|
616
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 3.7)
|
617
|
+
wait.until { @driver.find_element(:xpath, '//*[@id="'+page_id+'"]/div[1]/div/div[1]/aside/div/div[3]/div[1]/div[2]/ul/li/a') }
|
613
618
|
@driver.find_element(:xpath, '//*[@id="'+page_id+'"]/div[1]/div/div[1]/aside/div/div[3]/div[1]/div[2]/ul/li/a').click
|
614
619
|
puts '탬플릿 ['+template.to_s+'] 번을 찾지못해 첫번째 탬플릿을 사용합니다.'
|
615
620
|
sleep(1)
|
616
621
|
end
|
622
|
+
|
623
|
+
begin
|
624
|
+
wait = Selenium::WebDriver::Wait.new(timeout: 10)
|
625
|
+
alert = wait.until { @driver.switch_to.alert }
|
626
|
+
sleep(1)
|
617
627
|
@driver.switch_to.alert.accept
|
618
|
-
|
628
|
+
rescue
|
629
|
+
end
|
630
|
+
|
631
|
+
begin
|
632
|
+
wait = Selenium::WebDriver::Wait.new(timeout: 10) # 최대 10초까지 대기
|
633
|
+
element = wait.until {
|
634
|
+
elem = @driver.find_element(:css, "div[style*='position: fixed; top: 0px; left: -9999px; width: 17px; height: 100%; border: 0px;']")
|
635
|
+
elem.style("display") == "block" ? elem : nil
|
636
|
+
}
|
637
|
+
rescue
|
638
|
+
end
|
639
|
+
|
619
640
|
@driver.find_element(:xpath, '//*[@data-name="template"]').click
|
620
641
|
sleep(1)
|
621
|
-
|
622
|
-
|
623
|
-
|
624
642
|
end
|
625
643
|
rescue
|
626
|
-
|
627
644
|
end
|
628
645
|
|
629
646
|
|
630
647
|
#제목 입력
|
631
648
|
ele = @driver.find_element(:xpath, '//*[@draggable="false"]')
|
632
649
|
@driver.action.click(ele).perform
|
633
|
-
sleep(
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
650
|
+
sleep(0.5)
|
651
|
+
if template.to_s == ''
|
652
|
+
# 템플릿이 사용되지 않았을 경우
|
653
|
+
else
|
654
|
+
# 템플릿이 사용된 경우
|
655
|
+
@driver.action.key_down(:control).key_down('a').key_up('a').key_up(:control).perform
|
656
|
+
sleep(0.5)
|
657
|
+
@driver.action.key_down(:delete).key_up(:delete).perform
|
658
|
+
sleep(0.5)
|
659
|
+
end
|
660
|
+
|
661
|
+
|
638
662
|
title = title.strip
|
639
663
|
@driver.action.send_keys(title).perform
|
640
664
|
sleep(1)
|
641
|
-
@driver.action.key_down(:enter).key_up(:enter).perform
|
642
|
-
sleep(1)
|
643
|
-
@driver.action.key_down(:control).key_down('a').key_up('a').key_up(:control).perform
|
644
|
-
sleep(1)
|
645
665
|
@driver.action.key_down(:down).key_up(:down).perform
|
646
|
-
|
666
|
+
sleep(1)
|
667
|
+
|
668
|
+
|
669
|
+
if template.to_s == ''
|
670
|
+
# 템플릿이 사용되지 않았을 경우
|
671
|
+
else
|
672
|
+
# 템플릿이 사용된 경우
|
673
|
+
@driver.action.key_down(:control).key_down('a').key_up('a').key_up(:control).perform
|
674
|
+
sleep(1)
|
675
|
+
@driver.action.key_down(:down).key_up(:down).perform
|
676
|
+
sleep(1)
|
677
|
+
@driver.action.key_down(:enter).key_up(:enter).perform
|
678
|
+
end
|
679
|
+
|
647
680
|
|
648
681
|
|
649
682
|
|
@@ -678,15 +711,20 @@ class Naver
|
|
678
711
|
sleep(1)
|
679
712
|
@driver.find_element(:xpath, '//*[@id="'+page_id+'"]/div[1]/div/header/div[2]/ul/li[12]/div/div/button[2]').click
|
680
713
|
sleep(1)
|
714
|
+
#@driver.actions.key_down(:control).key_down(:alt).send_keys('l').key_up(:alt).key_up(:control).perform
|
715
|
+
|
681
716
|
elsif i.to_s.include?('right')
|
682
717
|
@driver.find_element(:xpath, '//*[@id="'+page_id+'"]/div[1]/div/header/div[2]/ul/li[12]/div/button').click
|
683
718
|
sleep(1)
|
684
719
|
@driver.find_element(:xpath, '//*[@id="'+page_id+'"]/div[1]/div/header/div[2]/ul/li[12]/div/div/button[3]').click
|
685
720
|
sleep(1)
|
721
|
+
#@driver.actions.key_down(:control).key_down(:alt).send_keys('r').key_up(:alt).key_up(:control).perform
|
722
|
+
|
686
723
|
else
|
687
|
-
|
724
|
+
|
688
725
|
end
|
689
726
|
end
|
727
|
+
|
690
728
|
|
691
729
|
i.children.each do |i2|
|
692
730
|
puts i.to_s
|
@@ -694,7 +732,7 @@ class Naver
|
|
694
732
|
node_value = Hash.new
|
695
733
|
node_value['id'] = create_id()
|
696
734
|
node_value['@ctype'] = 'textNode'
|
697
|
-
sleep(1)
|
735
|
+
#sleep(1)
|
698
736
|
if i2.to_s.include?('<img')
|
699
737
|
path = i2.to_s.split('src="')[1].split('"')[0]
|
700
738
|
path = URI.decode_www_form(path)[0][0]
|
@@ -709,7 +747,7 @@ class Naver
|
|
709
747
|
iframe = wait.until { @driver.find_element(id: 'mainFrame') }
|
710
748
|
@driver.switch_to.frame(iframe)
|
711
749
|
begin
|
712
|
-
wait = Selenium::WebDriver::Wait.new(:timeout =>
|
750
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
713
751
|
wait.until { @driver.find_element(:xpath, '//*[@class="se-popup-button-text"]') }
|
714
752
|
@driver.find_element(:xpath, '//*[@class="se-popup-button-text"]').click
|
715
753
|
sleep(1)
|
@@ -783,9 +821,7 @@ class Naver
|
|
783
821
|
sleep(1)
|
784
822
|
end
|
785
823
|
|
786
|
-
|
787
|
-
|
788
|
-
|
824
|
+
|
789
825
|
# end
|
790
826
|
# components_value['src'] = 'https://blogfiles.pstatic.net'+image_data['item']['url']+'?type=w1'
|
791
827
|
# components_value['internalResource'] = true
|
@@ -839,6 +875,167 @@ class Naver
|
|
839
875
|
@driver.find_element(:xpath, '//*[@id="video-uploader-wrap"]/div/div/div[3]/button/span').click
|
840
876
|
sleep(3)
|
841
877
|
|
878
|
+
|
879
|
+
elsif i2.to_s.include?('<slide')
|
880
|
+
if option['라이브러리사용안함'] == 'true'
|
881
|
+
|
882
|
+
posting_url = @driver.current_url
|
883
|
+
@driver.execute_script("window.open('#{posting_url}');")
|
884
|
+
sleep(1)
|
885
|
+
@driver.switch_to.window(@driver.window_handles[1])
|
886
|
+
wait = Selenium::WebDriver::Wait.new(timeout: 10)
|
887
|
+
iframe = wait.until { @driver.find_element(id: 'mainFrame') }
|
888
|
+
@driver.switch_to.frame(iframe)
|
889
|
+
begin
|
890
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
891
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="se-popup-button-text"]') }
|
892
|
+
@driver.find_element(:xpath, '//*[@class="se-popup-button-text"]').click
|
893
|
+
sleep(1)
|
894
|
+
rescue
|
895
|
+
end
|
896
|
+
|
897
|
+
slide_content = i2.to_s.split('<slide>').last.split('</slide>').first.strip
|
898
|
+
paths = slide_content.scan(/"([^"]+)"/).flatten # 큰따옴표로 감싸진 경로만 추출
|
899
|
+
|
900
|
+
# 2. 전체 경로를 추출하여 윈도우 경로로 변환
|
901
|
+
full_paths = paths.map { |path| path.strip.gsub('/', '\\') } # 윈도우 경로 구분자로 변경
|
902
|
+
|
903
|
+
paths_with_quotes = full_paths.map { |path| "\"#{path}\"" }.join(' ')
|
904
|
+
image_names = paths.map { |path| File.basename(path) }.map { |name| "\"#{name}\"" }.join(' ') # 큰따옴표로 감싼 파일 이름만 추출
|
905
|
+
# 3. 전체 경로를 클립보드에 복사
|
906
|
+
Clipboard.copy(paths_with_quotes)
|
907
|
+
|
908
|
+
# 4. 전체 경로를 붙여넣기
|
909
|
+
@driver.find_element(:xpath, '//*[@class="se-toolbar-item se-toolbar-item-image"]').click
|
910
|
+
sleep(1)
|
911
|
+
|
912
|
+
key_down('ctrl')
|
913
|
+
key_stroke('v')
|
914
|
+
key_up('ctrl')
|
915
|
+
sleep(1)
|
916
|
+
key_stroke('enter')
|
917
|
+
sleep(2)
|
918
|
+
#@driver.action.key_down(:control).send_keys('z').key_up(:control).perform
|
919
|
+
@driver.find_element(:xpath, '//*[@class="se-popup-close-button"]').click
|
920
|
+
|
921
|
+
# 6. 이미지 이름만 클립보드에 복사 (큰따옴표 포함)
|
922
|
+
Clipboard.copy(image_names)
|
923
|
+
|
924
|
+
# 8. 이미지 이름만 클립보드에 복사 후 붙여넣기
|
925
|
+
@driver.find_element(:xpath, '//*[@class="se-toolbar-item se-toolbar-item-image"]').click
|
926
|
+
sleep(1)
|
927
|
+
sleep(1)
|
928
|
+
key_down('ctrl')
|
929
|
+
key_stroke('v')
|
930
|
+
key_up('ctrl')
|
931
|
+
sleep(1)
|
932
|
+
key_stroke('enter')
|
933
|
+
sleep(2)
|
934
|
+
|
935
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 10)
|
936
|
+
wait.until { @driver.find_element(:xpath, '//*[@for="image-type-slide"]') }
|
937
|
+
@driver.find_element(:xpath, '//*[@for="image-type-slide"]').click
|
938
|
+
sleep(1)
|
939
|
+
@driver.action.send_keys(:up).perform
|
940
|
+
sleep(1)
|
941
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 10)
|
942
|
+
wait.until { @driver.find_element(:xpath, '//*[@data-log="ct.arrfit"]') }
|
943
|
+
@driver.find_element(:xpath, '//*[@data-log="ct.arrfit"]').click
|
944
|
+
sleep(1)
|
945
|
+
|
946
|
+
|
947
|
+
@driver.action.key_down(:control).send_keys('c').key_up(:control).perform
|
948
|
+
@driver.switch_to.default_content()
|
949
|
+
@driver.close
|
950
|
+
sleep(1)
|
951
|
+
@driver.switch_to.window(@driver.window_handles[0])
|
952
|
+
wait = Selenium::WebDriver::Wait.new(timeout: 10)
|
953
|
+
iframe = wait.until { @driver.find_element(id: 'mainFrame') }
|
954
|
+
@driver.switch_to.frame(iframe)
|
955
|
+
#@driver.action.key_down(:control).send_keys('v').key_up(:control).perform
|
956
|
+
key_down('ctrl')
|
957
|
+
key_stroke('v')
|
958
|
+
key_up('ctrl')
|
959
|
+
sleep(1)
|
960
|
+
|
961
|
+
else
|
962
|
+
|
963
|
+
slide_content = i2.to_s.split('<slide>').last.split('</slide>').first.strip
|
964
|
+
paths = slide_content.scan(/"([^"]+)"/).flatten # 큰따옴표로 감싸진 경로만 추출
|
965
|
+
|
966
|
+
# 2. 전체 경로를 추출하여 윈도우 경로로 변환
|
967
|
+
full_paths = paths.map { |path| path.strip.gsub('/', '\\') } # 윈도우 경로 구분자로 변경
|
968
|
+
|
969
|
+
paths_with_quotes = full_paths.map { |path| "\"#{path}\"" }.join(' ')
|
970
|
+
image_names = paths.map { |path| File.basename(path) }.map { |name| "\"#{name}\"" }.join(' ') # 큰따옴표로 감싼 파일 이름만 추출
|
971
|
+
# 3. 전체 경로를 클립보드에 복사
|
972
|
+
Clipboard.copy(paths_with_quotes)
|
973
|
+
|
974
|
+
# 4. 전체 경로를 붙여넣기
|
975
|
+
@driver.find_element(:xpath, '//*[@id="'+page_id+'"]/div[1]/div/header/div[1]/ul/li[1]/button').click
|
976
|
+
sleep(1)
|
977
|
+
|
978
|
+
key_down('ctrl')
|
979
|
+
key_stroke('v')
|
980
|
+
key_up('ctrl')
|
981
|
+
sleep(1)
|
982
|
+
key_stroke('enter')
|
983
|
+
sleep(2)
|
984
|
+
|
985
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 10)
|
986
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="se-popup-close-button"]') }
|
987
|
+
@driver.find_element(:xpath, '//*[@class="se-popup-close-button"]').click
|
988
|
+
|
989
|
+
|
990
|
+
# 6. 이미지 이름만 클립보드에 복사 (큰따옴표 포함)
|
991
|
+
Clipboard.copy(image_names)
|
992
|
+
|
993
|
+
# 8. 이미지 이름만 클립보드에 복사 후 붙여넣기
|
994
|
+
@driver.find_element(:xpath, '//*[@id="'+page_id+'"]/div[1]/div/header/div[1]/ul/li[1]/button').click
|
995
|
+
sleep(1)
|
996
|
+
sleep(1)
|
997
|
+
key_down('ctrl')
|
998
|
+
key_stroke('v')
|
999
|
+
key_up('ctrl')
|
1000
|
+
sleep(1)
|
1001
|
+
key_stroke('enter')
|
1002
|
+
sleep(2)
|
1003
|
+
|
1004
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 10)
|
1005
|
+
wait.until { @driver.find_element(:xpath, '//*[@for="image-type-slide"]') }
|
1006
|
+
@driver.find_element(:xpath, '//*[@for="image-type-slide"]').click
|
1007
|
+
sleep(1)
|
1008
|
+
@driver.action.send_keys(:up).perform
|
1009
|
+
sleep(1)
|
1010
|
+
|
1011
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 10)
|
1012
|
+
wait.until { @driver.find_element(:xpath, '//*[@data-log="ct.arrfit"]') }
|
1013
|
+
@driver.find_element(:xpath, '//*[@data-log="ct.arrfit"]').click
|
1014
|
+
sleep(1)
|
1015
|
+
@driver.action.key_down(:enter).key_up(:enter).perform
|
1016
|
+
|
1017
|
+
|
1018
|
+
end
|
1019
|
+
|
1020
|
+
|
1021
|
+
|
1022
|
+
|
1023
|
+
|
1024
|
+
|
1025
|
+
|
1026
|
+
|
1027
|
+
|
1028
|
+
|
1029
|
+
|
1030
|
+
|
1031
|
+
|
1032
|
+
|
1033
|
+
|
1034
|
+
|
1035
|
+
|
1036
|
+
|
1037
|
+
|
1038
|
+
|
842
1039
|
elsif i2.to_s.include?('<inyonggoo')
|
843
1040
|
if i2.text == ''
|
844
1041
|
|
@@ -874,6 +1071,11 @@ class Naver
|
|
874
1071
|
# components_value['source'] = nil
|
875
1072
|
# components_value['@ctype'] = 'quotation'
|
876
1073
|
end
|
1074
|
+
|
1075
|
+
|
1076
|
+
|
1077
|
+
|
1078
|
+
|
877
1079
|
elsif i2.to_s.include?('<sticker')
|
878
1080
|
@driver.find_element(:xpath, '//*[@id="'+page_id+'"]/div[1]/div/header/div[1]/ul/li[4]/button').click
|
879
1081
|
sleep(1)
|
@@ -1061,49 +1263,6 @@ class Naver
|
|
1061
1263
|
@driver.action.key_down(:space).key_up(:space).perform
|
1062
1264
|
@driver.action.key_down(:left).key_up(:left).perform
|
1063
1265
|
end
|
1064
|
-
|
1065
|
-
# begin
|
1066
|
-
# if i.to_s.split('text-align: ')[1].split(';')[0] == 'center'
|
1067
|
-
# if value_data['style'] == nil
|
1068
|
-
# value_data['style'] = Hash.new
|
1069
|
-
# end
|
1070
|
-
# value_data['style']['align'] = 'center'
|
1071
|
-
# value_data['style']['@ctype'] = 'paragraphStyle'
|
1072
|
-
# elsif i.to_s.split('text-align: ')[1].split(';')[0] == 'right'
|
1073
|
-
# if value_data['style'] == nil
|
1074
|
-
# value_data['style'] = Hash.new
|
1075
|
-
# end
|
1076
|
-
# value_data['style']['align'] = 'right'
|
1077
|
-
# value_data['style']['@ctype'] = 'paragraphStyle'
|
1078
|
-
# else
|
1079
|
-
|
1080
|
-
# end
|
1081
|
-
# rescue => e
|
1082
|
-
# puts e
|
1083
|
-
|
1084
|
-
# end
|
1085
|
-
|
1086
|
-
# if toomung == 1
|
1087
|
-
# if node_value['style'] == nil
|
1088
|
-
# node_value['style'] = Hash.new
|
1089
|
-
# end
|
1090
|
-
# node_value['style']['fontSizeCode'] = 'fs0'
|
1091
|
-
# end
|
1092
|
-
|
1093
|
-
# if i2.to_s.include?('<a href="')
|
1094
|
-
# if i2.to_s.include?('<img src=')
|
1095
|
-
|
1096
|
-
# else
|
1097
|
-
# node_value['link'] = {
|
1098
|
-
# 'url' => i2.to_s.split('href="')[1].split('"')[0],
|
1099
|
-
# '@ctype' => 'urlLink'
|
1100
|
-
# }
|
1101
|
-
# end
|
1102
|
-
# end
|
1103
|
-
|
1104
|
-
# if node_value['style'] != nil
|
1105
|
-
# node_value['style']['@ctype'] = 'nodeStyle'
|
1106
|
-
# end
|
1107
1266
|
end
|
1108
1267
|
|
1109
1268
|
if check_image == 0
|
@@ -1191,50 +1350,14 @@ class Naver
|
|
1191
1350
|
end
|
1192
1351
|
end
|
1193
1352
|
end
|
1194
|
-
sleep(
|
1353
|
+
sleep(0.5)
|
1195
1354
|
@driver.action.key_down(:end).key_up(:end).perform
|
1196
|
-
sleep(
|
1355
|
+
sleep(0.5)
|
1197
1356
|
@driver.action.key_down(:enter).key_up(:enter).perform
|
1198
|
-
sleep(
|
1199
|
-
# if check_image == 0
|
1200
|
-
# if value_data['nodes'].length == 0
|
1201
|
-
# value_data['nodes'][0] = {
|
1202
|
-
# 'id' => create_id(),
|
1203
|
-
# '@ctype' => 'textNode',
|
1204
|
-
# 'value' => ''
|
1205
|
-
# }
|
1206
|
-
# end
|
1207
|
-
# begin
|
1208
|
-
# components_value['value'] << value_data
|
1209
|
-
# rescue
|
1210
|
-
|
1211
|
-
# end
|
1212
|
-
# end
|
1213
|
-
|
1214
|
-
# if components_value['value'] != nil
|
1215
|
-
# if components_value['value'].length == 0
|
1216
|
-
# components_value['value'][0] = {
|
1217
|
-
# 'id' => create_id(),
|
1218
|
-
# 'nodes' => [{
|
1219
|
-
# 'id' => create_id(),
|
1220
|
-
# '@ctype' => 'textNode',
|
1221
|
-
# 'value' => ''
|
1222
|
-
# }],
|
1223
|
-
# '@ctype' => 'paragraph'
|
1224
|
-
# }
|
1225
|
-
# end
|
1226
|
-
# end
|
1227
|
-
# data['documentModel']['document']['components'] << components_value
|
1357
|
+
sleep(0.5)
|
1228
1358
|
end
|
1229
1359
|
|
1230
1360
|
if soosick_1 != ''
|
1231
|
-
# data['documentModel']['document']['components'] << {
|
1232
|
-
# 'id' => create_id(),
|
1233
|
-
# 'layout' => 'default',
|
1234
|
-
# 'fontSizeCode' => 'fs13',
|
1235
|
-
# 'codeContents' => soosick_1,
|
1236
|
-
# '@ctype' => 'code'
|
1237
|
-
# }
|
1238
1361
|
@driver.find_element(:xpath, '//*[@id="'+page_id+'"]/div[1]/div/header/div[1]/ul/li[13]/button').click
|
1239
1362
|
sleep(3)
|
1240
1363
|
# @driver.action.send_keys(soosick_1.text).perform
|
@@ -1246,13 +1369,6 @@ class Naver
|
|
1246
1369
|
end
|
1247
1370
|
|
1248
1371
|
if soosick_2 != ''
|
1249
|
-
# data['documentModel']['document']['components'] << {
|
1250
|
-
# 'id' => create_id(),
|
1251
|
-
# 'layout' => 'default',
|
1252
|
-
# 'fontSizeCode' => 'fs13',
|
1253
|
-
# 'codeContents' => soosick_2,
|
1254
|
-
# '@ctype' => 'code'
|
1255
|
-
# }
|
1256
1372
|
@driver.find_element(:xpath, '//*[@id="'+page_id+'"]/div[1]/div/header/div[1]/ul/li[13]/button').click
|
1257
1373
|
sleep(3)
|
1258
1374
|
# @driver.action.send_keys(soosick_2).perform
|
@@ -1263,6 +1379,32 @@ class Naver
|
|
1263
1379
|
sleep(3)
|
1264
1380
|
end
|
1265
1381
|
|
1382
|
+
if option['중앙정렬'] == 'true'
|
1383
|
+
@driver.action.key_down(:control).key_down('a').key_up('a').key_up(:control).perform
|
1384
|
+
sleep(1)
|
1385
|
+
@driver.action.key_down(:control).key_down(:alt).send_keys('c').key_up(:alt).key_up(:control).perform
|
1386
|
+
sleep(1)
|
1387
|
+
else
|
1388
|
+
|
1389
|
+
end
|
1390
|
+
if option['좌측정렬'] == 'true'
|
1391
|
+
@driver.action.key_down(:control).key_down('a').key_up('a').key_up(:control).perform
|
1392
|
+
sleep(1)
|
1393
|
+
@driver.action.key_down(:control).key_down(:alt).send_keys('l').key_up(:alt).key_up(:control).perform
|
1394
|
+
sleep(1)
|
1395
|
+
else
|
1396
|
+
|
1397
|
+
end
|
1398
|
+
if option['우측정렬'] == 'true'
|
1399
|
+
@driver.action.key_down(:control).key_down('a').key_up('a').key_up(:control).perform
|
1400
|
+
sleep(1)
|
1401
|
+
@driver.action.key_down(:control).key_down(:alt).send_keys('r').key_up(:alt).key_up(:control).perform
|
1402
|
+
sleep(1)
|
1403
|
+
else
|
1404
|
+
|
1405
|
+
end
|
1406
|
+
|
1407
|
+
|
1266
1408
|
@driver.find_element(:xpath, '//*[@data-focus-lock="publishLayer"]').click #1차 등록버튼
|
1267
1409
|
sleep(3)
|
1268
1410
|
category = option['category']
|
@@ -1403,45 +1545,13 @@ class Naver
|
|
1403
1545
|
|
1404
1546
|
end
|
1405
1547
|
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1409
|
-
|
1410
|
-
|
1411
|
-
#sleep(dd_time.to_i)
|
1412
|
-
#@driver.find_element(:xpath, '//*[@id="root"]/div/div[1]/div/div[3]/div[3]/div/div/div/div[8]/div/button').click
|
1413
|
-
|
1414
|
-
#sleep(10)
|
1415
1548
|
begin
|
1416
1549
|
@driver.close
|
1417
1550
|
rescue
|
1418
1551
|
|
1419
1552
|
end
|
1420
1553
|
|
1421
|
-
|
1422
|
-
# http = HTTP.headers(h).post('https://api-blog.blog.naver.com/rabbit/auto/save', :form => data)
|
1423
|
-
# else
|
1424
|
-
# ip = option['proxy'].to_s.split(':')[0]
|
1425
|
-
# port = option['proxy'].to_s.split(':')[1]
|
1426
|
-
# http = HTTP.via(ip, port.to_i).headers(h).post('https://api-blog.blog.naver.com/rabbit/auto/save', :form => data)
|
1427
|
-
# end
|
1428
|
-
# puts http.to_s
|
1429
|
-
# http.cookies.each do |i|
|
1430
|
-
# puts i
|
1431
|
-
# end
|
1432
|
-
# sleep(3)
|
1433
|
-
# data['productApiVersion'] = 'v1'
|
1434
|
-
# if option['proxy'] == ''
|
1435
|
-
# http = HTTP.headers(h).post('https://blog.naver.com/RabbitWrite.naver', :form => data)
|
1436
|
-
# else
|
1437
|
-
# ip = option['proxy'].to_s.split(':')[0]
|
1438
|
-
# port = option['proxy'].to_s.split(':')[1]
|
1439
|
-
# http = HTTP.via(ip, port.to_i).headers(h).post('https://blog.naver.com/RabbitWrite.naver', :form => data)
|
1440
|
-
# end
|
1441
|
-
# puts http.to_s
|
1442
|
-
# http.cookies.each do |i|
|
1443
|
-
# puts i
|
1444
|
-
# end
|
1554
|
+
|
1445
1555
|
end
|
1446
1556
|
end
|
1447
1557
|
|
@@ -2673,6 +2783,7 @@ class Wordpress
|
|
2673
2783
|
if i.force_encoding('utf-8').to_s.include?('@')
|
2674
2784
|
image_memory << ""+'<img src="'+image_url+'" alt="'+keyword+'">'+""
|
2675
2785
|
content[index3] = content[index3] + '**image()**'
|
2786
|
+
|
2676
2787
|
else
|
2677
2788
|
image_memory << ""+ '<img src="'+image_url+'" alt="'+keyword+'">'+""
|
2678
2789
|
content[index3] = content[index3] + '**image**'
|
@@ -2682,10 +2793,61 @@ class Wordpress
|
|
2682
2793
|
content = content.join('')
|
2683
2794
|
end
|
2684
2795
|
end
|
2685
|
-
|
2686
|
-
|
2687
|
-
|
2688
|
-
|
2796
|
+
|
2797
|
+
if @data['포스트설정']['슬라이드로변경'].checked?
|
2798
|
+
@data['포스트설정']['단어슬라이드변경'].text.to_s.force_encoding('utf-8').split(',').each do |i|
|
2799
|
+
content = content.split(i.force_encoding('utf-8'))
|
2800
|
+
content.each_with_index do |ccm, index3|
|
2801
|
+
if index3 == content.length - 1
|
2802
|
+
# 마지막 인덱스인 경우, 아무 작업하지 않음
|
2803
|
+
else
|
2804
|
+
image_url = get_image_file().force_encoding('utf-8') # 실제 이미지 경로
|
2805
|
+
image_number = @data['포스트설정']['슬라이드사진수량'].text.to_s.force_encoding('utf-8').to_i
|
2806
|
+
image = Magick::Image.read(image_url).first
|
2807
|
+
image_width = image.columns # 이미지의 가로 크기
|
2808
|
+
image_height = image.rows # 이미지의 세로 크기
|
2809
|
+
split_width = image_width / image_number # 가로로 나누는 너비
|
2810
|
+
|
2811
|
+
# 이미지 분할 작업
|
2812
|
+
slide_images = (0...image_number).map do |n|
|
2813
|
+
split_image = image.crop(n * split_width, 0, split_width, image_height)
|
2814
|
+
|
2815
|
+
# 현재 초를 사용하여 고유한 파일 이름 생성
|
2816
|
+
timestamp = Time.now.to_i
|
2817
|
+
split_image_path = "./image/#{@keyword}_slide_#{n + 1}_#{timestamp}.png"
|
2818
|
+
absolute_path = File.expand_path(split_image_path) # 절대 경로 계산
|
2819
|
+
|
2820
|
+
# 이미지 저장
|
2821
|
+
split_image.write(absolute_path)
|
2822
|
+
|
2823
|
+
# 이미지 파일 이름만 추출
|
2824
|
+
image_name = File.basename(absolute_path)
|
2825
|
+
|
2826
|
+
# 1. 전체 경로를 포함한 <slide> 태그
|
2827
|
+
full_path_slide = "\"#{absolute_path}\""
|
2828
|
+
|
2829
|
+
# 2. 이미지 이름만 포함한 <slide1> 태그
|
2830
|
+
name_only_slide = "\"#{image_name}\""
|
2831
|
+
|
2832
|
+
# 전체 경로와 이미지 이름을 각각 모아서 반환
|
2833
|
+
[full_path_slide, name_only_slide]
|
2834
|
+
end
|
2835
|
+
|
2836
|
+
# <slide> 태그는 전체 경로만, <slide1> 태그는 이미지 이름만 포함
|
2837
|
+
slide_full_paths = slide_images.map { |pair| pair[0] }.join(' ')
|
2838
|
+
slide_names_only = slide_images.map { |pair| pair[1] }.join(' ')
|
2839
|
+
|
2840
|
+
# 각각 <slide>와 <slide1> 태그로 감싸기
|
2841
|
+
slide_html_full = "<slide>" + slide_full_paths + "</slide>"
|
2842
|
+
slide_html_names = "<slide1>" + slide_names_only + "</slide1>"
|
2843
|
+
|
2844
|
+
# 두 태그를 content에 추가
|
2845
|
+
content[index3] = content[index3] + slide_html_full
|
2846
|
+
end
|
2847
|
+
end
|
2848
|
+
content = content.join('')
|
2849
|
+
end
|
2850
|
+
end
|
2689
2851
|
|
2690
2852
|
con_memory = Array.new
|
2691
2853
|
index5 = 0
|
@@ -2754,10 +2916,36 @@ class Wordpress
|
|
2754
2916
|
end
|
2755
2917
|
|
2756
2918
|
if @data['포스트설정']['인용구변경'].checked?
|
2757
|
-
@data['포스트설정']['
|
2758
|
-
|
2919
|
+
if @data['포스트설정']['인용구문구설정'].checked?
|
2920
|
+
# 인용구순서 사용 시
|
2921
|
+
if @data['포스트설정']['인용구순서'].checked?
|
2922
|
+
quote_index = 0
|
2923
|
+
@data['포스트설정']['인용구변경단어'].text.to_s.force_encoding('utf-8').split(',').each do |i|
|
2924
|
+
content = content.gsub(i.force_encoding('utf-8')) {
|
2925
|
+
quote = "<inyonggoo src=''>" + @data['포스트설정']['인용구'][quote_index] + "</inyonggoo>"
|
2926
|
+
quote_index = (quote_index + 1) % @data['포스트설정']['인용구'].length
|
2927
|
+
quote
|
2928
|
+
}
|
2929
|
+
end
|
2930
|
+
elsif @data['포스트설정']['인용구랜덤'].checked?
|
2931
|
+
# 인용구랜덤 사용 시
|
2932
|
+
@data['포스트설정']['인용구변경단어'].text.to_s.force_encoding('utf-8').split(',').each do |i|
|
2933
|
+
# 랜덤으로 인용구를 선택하여 각 단어마다 다른 인용구가 적용되도록 함
|
2934
|
+
content = content.gsub(i.force_encoding('utf-8')) {
|
2935
|
+
# 랜덤으로 인용구를 선택
|
2936
|
+
chosen_quote = @data['포스트설정']['인용구'].sample
|
2937
|
+
"<inyonggoo src=''>" + chosen_quote + "</inyonggoo>"
|
2938
|
+
}
|
2939
|
+
end
|
2940
|
+
end
|
2941
|
+
elsif @data['포스트설정']['인용구제목사용'].checked?
|
2942
|
+
# 제목으로 적용할 경우, 특정 단어가 포함된 위치에 제목 스타일을 적용
|
2943
|
+
@data['포스트설정']['인용구변경단어'].text.to_s.force_encoding('utf-8').split(',').each do |i|
|
2944
|
+
# i는 '특정단어'입니다. 이 단어가 content에 여러 번 있을 수 있습니다.
|
2945
|
+
content = content.split(i.force_encoding('utf-8')).join(""+'<inyonggoo src="">'+title+'</inyonggoo>'+"")
|
2759
2946
|
end
|
2760
2947
|
end
|
2948
|
+
end
|
2761
2949
|
|
2762
2950
|
@data['table'][index][-1] = 80
|
2763
2951
|
@data['table'] << []
|
@@ -2899,20 +3087,35 @@ class Wordpress
|
|
2899
3087
|
option['검색허용'] = 'false'
|
2900
3088
|
end
|
2901
3089
|
|
2902
|
-
if @data['포스트설정']['
|
2903
|
-
title = content.split("\n")[0]
|
3090
|
+
if @data['포스트설정']['내용첫줄제목에입력'].checked?
|
3091
|
+
title = content.split("\n")[0]
|
3092
|
+
|
3093
|
+
end
|
3094
|
+
|
3095
|
+
if @data['포스트설정']['제목을내용첫줄입력'].checked?
|
3096
|
+
|
3097
|
+
content = "#{title}\n" + content
|
2904
3098
|
end
|
2905
3099
|
|
2906
3100
|
if @data['포스트설정']['중앙정렬'].checked?
|
2907
3101
|
content = content.split("\n").map {|row| '<p style="text-align: center;">'+row+'</p>'}.join("\n")
|
3102
|
+
option['중앙정렬'] = 'true'
|
3103
|
+
else
|
3104
|
+
option['중앙정렬'] = 'false'
|
2908
3105
|
end
|
2909
3106
|
|
2910
3107
|
if @data['포스트설정']['우측정렬'].checked?
|
2911
3108
|
content = content.split("\n").map {|row| '<p style="text-align: right;">'+row+'</p>'}.join("\n")
|
3109
|
+
option['우측정렬'] = 'true'
|
3110
|
+
else
|
3111
|
+
option['우측정렬'] = 'false'
|
2912
3112
|
end
|
2913
3113
|
|
2914
3114
|
if @data['포스트설정']['좌측정렬'].checked?
|
2915
3115
|
content = content.split("\n").map {|row| '<p style="text-align: left;">'+row+'</p>'}.join("\n")
|
3116
|
+
option['좌측정렬'] = 'true'
|
3117
|
+
else
|
3118
|
+
option['좌측정렬'] = 'false'
|
2916
3119
|
end
|
2917
3120
|
|
2918
3121
|
@data['table'][index][-1] = 90
|
@@ -4191,15 +4394,80 @@ class Wordpress
|
|
4191
4394
|
}
|
4192
4395
|
}
|
4193
4396
|
}
|
4397
|
+
|
4398
|
+
horizontal_box{
|
4399
|
+
stretchy false
|
4400
|
+
label('※이미지 리스트와 위 세팅을 하였다면 포스트설정1 탭에서 어떤위치(방식)으로 삽입시킬지 세팅이 필요합니다.'){
|
4401
|
+
}
|
4402
|
+
}
|
4403
|
+
horizontal_box{
|
4404
|
+
stretchy false
|
4405
|
+
label('※이미지를 아래 특정단어 슬라이드 변경 기능만 사용한다면 포스트설정1 탭에서 설정을 할 필요는 없습니다.'){
|
4406
|
+
}
|
4407
|
+
}
|
4194
4408
|
vertical_separator{
|
4195
4409
|
stretchy false
|
4196
|
-
|
4410
|
+
}
|
4197
4411
|
horizontal_box{
|
4198
4412
|
stretchy false
|
4199
4413
|
@data['포스트설정']['라이브러리사용안함'] = checkbox('사진 라이브러리에서 제외시키기 적용'){
|
4200
4414
|
|
4201
4415
|
}
|
4202
|
-
}
|
4416
|
+
}
|
4417
|
+
horizontal_box{
|
4418
|
+
stretchy false
|
4419
|
+
label('※해당 기능에 체크시 로직 활용으로 브라우저 창을 하나 더 사용하게 되므로 PC 사양(인터넷속도) 낮은 환경에서는 비 추천입니다.'){
|
4420
|
+
}
|
4421
|
+
}
|
4422
|
+
|
4423
|
+
vertical_separator{
|
4424
|
+
stretchy false
|
4425
|
+
}
|
4426
|
+
horizontal_box{
|
4427
|
+
stretchy false
|
4428
|
+
@data['포스트설정']['슬라이드로변경'] = checkbox('특정단어를 슬라이드사진 변경'){
|
4429
|
+
}
|
4430
|
+
@data['포스트설정']['단어슬라이드변경'] = entry{
|
4431
|
+
text 'ex)특정단어a'
|
4432
|
+
}
|
4433
|
+
grid{
|
4434
|
+
@data['포스트설정']['슬라이드사진수량'] = entry{
|
4435
|
+
text '수량 ex)3'
|
4436
|
+
}
|
4437
|
+
}
|
4438
|
+
}
|
4439
|
+
horizontal_box{
|
4440
|
+
stretchy false
|
4441
|
+
grid{
|
4442
|
+
label('※이미지 순서 사용시 참고 사항!!'){
|
4443
|
+
top 0
|
4444
|
+
left 0
|
4445
|
+
|
4446
|
+
}
|
4447
|
+
label('내용 중 원하는 위치에 특정단어 예로 "특정단어a" 분할사진" 이라 넣어 두고 해당 항목에도 "특정단어a" 단어를 넣어주세요. '){
|
4448
|
+
top 1
|
4449
|
+
left 0
|
4450
|
+
|
4451
|
+
}
|
4452
|
+
label('삽입되는 사진부터 계산 후 슬라이드 사용 이미지를 계산하며, 예로 이미지5개 중 사진 삽입이 3장, 슬라이드 사용 사진 2장이라면'){
|
4453
|
+
top 2
|
4454
|
+
left 0
|
4455
|
+
|
4456
|
+
}
|
4457
|
+
|
4458
|
+
label('사진 삽입에 1번부터~3번까지 차례로 순서를 정하고 슬라이드에 사용되는 사진이 다음으로 4번부터~5번까지가 설정됩니다'){
|
4459
|
+
top 3
|
4460
|
+
left 0
|
4461
|
+
|
4462
|
+
}
|
4463
|
+
|
4464
|
+
}
|
4465
|
+
}
|
4466
|
+
horizontal_box{
|
4467
|
+
stretchy false
|
4468
|
+
label('※수량은 이미지 하나를 분할하려는 수이며, 블로그 규정에 맞게 최대10 이하로 설정해주세요'){
|
4469
|
+
}
|
4470
|
+
}
|
4203
4471
|
}
|
4204
4472
|
}
|
4205
4473
|
}
|
@@ -4221,26 +4489,7 @@ class Wordpress
|
|
4221
4489
|
text '특정단어'
|
4222
4490
|
}
|
4223
4491
|
|
4224
|
-
|
4225
|
-
# top 1
|
4226
|
-
# left 0
|
4227
|
-
# }
|
4228
|
-
# @data['포스트설정']['제목단어변경파일불러오기'] = button('설정 파일 불러오기'){
|
4229
|
-
# top 1
|
4230
|
-
# left 1
|
4231
|
-
# on_clicked{
|
4232
|
-
# file = open_file
|
4233
|
-
# if file != nil
|
4234
|
-
# file_data = File.open(file, 'r', :encoding => 'utf-8').read()
|
4235
|
-
# file_data.split("\n").each do |i|
|
4236
|
-
# i2 = i.split('>')
|
4237
|
-
# text_key = i2[0].to_s
|
4238
|
-
# text_val = i2[1].to_s.split(',')
|
4239
|
-
# @data['포스트설정']['제목특정단어변경데이터'][text_key] = text_val
|
4240
|
-
# end
|
4241
|
-
# end
|
4242
|
-
# }
|
4243
|
-
# }
|
4492
|
+
|
4244
4493
|
@data['포스트설정']['제목에키워드삽입'] = checkbox('제목에 키워드 삽입'){
|
4245
4494
|
top 2
|
4246
4495
|
left 0
|
@@ -4313,21 +4562,29 @@ class Wordpress
|
|
4313
4562
|
top 5
|
4314
4563
|
left 0
|
4315
4564
|
on_toggled{
|
4316
|
-
if @data['포스트설정']['제목을랜덤'].checked?
|
4317
|
-
|
4318
|
-
|
4319
|
-
end
|
4565
|
+
if @data['포스트설정']['제목을랜덤'].checked?
|
4566
|
+
@data['포스트설정']['내용첫줄제목에입력'].checked = false
|
4567
|
+
@data['포스트설정']['제목을내용첫줄입력'].checked = false
|
4320
4568
|
end
|
4321
4569
|
}
|
4322
4570
|
}
|
4323
|
-
@data['포스트설정']['
|
4571
|
+
@data['포스트설정']['내용첫줄제목에입력'] = checkbox('내용의 첫 문장을 제목으로 설정'){
|
4324
4572
|
top 6
|
4325
4573
|
left 0
|
4326
4574
|
on_toggled{
|
4327
|
-
if @data['포스트설정']['
|
4328
|
-
|
4329
|
-
|
4330
|
-
|
4575
|
+
if @data['포스트설정']['내용첫줄제목에입력'].checked?
|
4576
|
+
@data['포스트설정']['제목을랜덤'].checked = false
|
4577
|
+
@data['포스트설정']['제목을내용첫줄입력'].checked = false
|
4578
|
+
end
|
4579
|
+
}
|
4580
|
+
}
|
4581
|
+
@data['포스트설정']['제목을내용첫줄입력'] = checkbox('제목을 내용 첫 줄에 넣기'){
|
4582
|
+
top 6
|
4583
|
+
left 1
|
4584
|
+
on_toggled{
|
4585
|
+
if @data['포스트설정']['제목을내용첫줄입력'].checked?
|
4586
|
+
@data['포스트설정']['내용첫줄제목에입력'].checked = false
|
4587
|
+
@data['포스트설정']['제목을랜덤'].checked = false
|
4331
4588
|
end
|
4332
4589
|
}
|
4333
4590
|
}
|
@@ -4565,16 +4822,6 @@ class Wordpress
|
|
4565
4822
|
}
|
4566
4823
|
|
4567
4824
|
|
4568
|
-
# @data['포스트설정']['슬라이드로변경'] = checkbox('특정단어를 슬라이드사진 변경'){
|
4569
|
-
# top 6
|
4570
|
-
# left 0
|
4571
|
-
# }
|
4572
|
-
# @data['포스트설정']['단어슬라이드변경'] = entry{
|
4573
|
-
# top 6
|
4574
|
-
# left 1
|
4575
|
-
# text '특정단어'
|
4576
|
-
# }
|
4577
|
-
|
4578
4825
|
@data['포스트설정']['스티커로변경'] = checkbox('특정단어를 스티커로 변경'){
|
4579
4826
|
top 6
|
4580
4827
|
left 0
|
@@ -4623,19 +4870,63 @@ class Wordpress
|
|
4623
4870
|
@data['포스트설정']['인용구변경'] = checkbox('특정단어를 인용구로 적용'){
|
4624
4871
|
top 11
|
4625
4872
|
left 0
|
4873
|
+
on_toggled {
|
4874
|
+
if @data['포스트설정']['인용구변경'].checked?
|
4875
|
+
@data['포스트설정']['인용구제목사용'].enabled = true # '내용투명' 활성화
|
4876
|
+
@data['포스트설정']['인용구문구설정'].enabled = true # '내용투명' 활성화
|
4877
|
+
else
|
4878
|
+
@data['포스트설정']['인용구변경'].checked = false # 체크 해제
|
4879
|
+
@data['포스트설정']['인용구제목사용'].enabled = false # 비활성화
|
4880
|
+
@data['포스트설정']['인용구문구설정'].enabled = false # 비활성화
|
4881
|
+
@data['포스트설정']['인용구순서'].enabled = false # 비활성화
|
4882
|
+
@data['포스트설정']['인용구랜덤'].enabled = false # 비활성화
|
4883
|
+
end
|
4884
|
+
}
|
4626
4885
|
}
|
4627
4886
|
@data['포스트설정']['인용구변경단어'] = entry{
|
4628
4887
|
top 11
|
4629
4888
|
left 1
|
4630
4889
|
text '특정단어'
|
4631
4890
|
}
|
4632
|
-
|
4891
|
+
@data['포스트설정']['인용구제목사용'] = checkbox('인용구를 제목으로 삽입 설정'){
|
4633
4892
|
top 12
|
4634
4893
|
left 0
|
4894
|
+
enabled false # 기본적으로 비활성화
|
4895
|
+
on_toggled {
|
4896
|
+
if @data['포스트설정']['인용구제목사용'].checked?
|
4897
|
+
@data['포스트설정']['인용구문구설정'].checked = false # 체크 해제
|
4898
|
+
@data['포스트설정']['인용구문구설정'].enabled = false
|
4899
|
+
else
|
4900
|
+
@data['포스트설정']['인용구문구설정'].enabled = true
|
4901
|
+
end
|
4902
|
+
}
|
4903
|
+
|
4904
|
+
}
|
4905
|
+
#label('ㄴ인용구 사용시 들어갈 문구'){
|
4906
|
+
@data['포스트설정']['인용구문구설정'] = checkbox('인용구에 들어갈 문구 설정'){
|
4907
|
+
top 13
|
4908
|
+
left 0
|
4909
|
+
enabled false # 기본적으로 비활성화
|
4910
|
+
|
4911
|
+
on_toggled {
|
4912
|
+
if @data['포스트설정']['인용구문구설정'].checked?
|
4913
|
+
@data['포스트설정']['인용구제목사용'].checked = false
|
4914
|
+
@data['포스트설정']['인용구제목사용'].enabled = false
|
4915
|
+
@data['포스트설정']['인용구순서'].enabled = true # '내용투명' 활성화
|
4916
|
+
@data['포스트설정']['인용구랜덤'].enabled = true # '내용투명' 활성화
|
4917
|
+
else
|
4918
|
+
@data['포스트설정']['인용구문구설정'].checked = false # 체크 해제
|
4919
|
+
@data['포스트설정']['인용구순서'].enabled = false # 비활성화
|
4920
|
+
@data['포스트설정']['인용구랜덤'].enabled = false # 비활성화
|
4921
|
+
@data['포스트설정']['인용구제목사용'].enabled = true
|
4922
|
+
end
|
4923
|
+
}
|
4924
|
+
|
4635
4925
|
}
|
4636
4926
|
button('설정 파일 불러오기'){
|
4637
|
-
top
|
4927
|
+
top 13
|
4638
4928
|
left 1
|
4929
|
+
|
4639
4930
|
on_clicked{
|
4640
4931
|
file = open_file
|
4641
4932
|
if file != nil
|
@@ -4643,9 +4934,30 @@ class Wordpress
|
|
4643
4934
|
@data['포스트설정']['인용구'] = file_data.split(',')
|
4644
4935
|
end
|
4645
4936
|
}
|
4937
|
+
}
|
4938
|
+
@data['포스트설정']['인용구순서'] = checkbox('인용구 순서 사용'){
|
4939
|
+
top 14
|
4940
|
+
left 0
|
4941
|
+
enabled false # 기본적으로 비활성화
|
4942
|
+
on_toggled {
|
4943
|
+
if @data['포스트설정']['인용구순서'].checked?
|
4944
|
+
@data['포스트설정']['인용구랜덤'].checked = false
|
4945
|
+
end
|
4946
|
+
}
|
4947
|
+
|
4646
4948
|
}
|
4647
|
-
|
4648
|
-
|
4949
|
+
@data['포스트설정']['인용구랜덤'] = checkbox('인용구 랜덤 사용'){
|
4950
|
+
top 14
|
4951
|
+
left 1
|
4952
|
+
enabled false # 기본적으로 비활성화
|
4953
|
+
on_toggled {
|
4954
|
+
if @data['포스트설정']['인용구랜덤'].checked?
|
4955
|
+
@data['포스트설정']['인용구순서'].checked = false
|
4956
|
+
end
|
4957
|
+
}
|
4958
|
+
}
|
4959
|
+
|
4960
|
+
|
4649
4961
|
}
|
4650
4962
|
}
|
4651
4963
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nblog_duo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.35
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: File to Clipboard gem
|
14
14
|
email: mymin26@naver.com
|