cafe_basics 0.0.72 → 0.1.33
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/cafe_basics.rb +175 -155
- metadata +3 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad6177d348599083944ff5ff033854d1312dd29d01de0b1233e48137a7260290
|
4
|
+
data.tar.gz: edc6948cd9f7e643d8f59e79e3d0d93ee3ac407b04fbb6d184df6964603adaab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5888d3053856bfebd7a89af2cfdf42662f30c553c4e12043233e80a570fffab8b57cfffd5d4041cd98ef376e40ef511bc5296c88cf2b2a5eec8a2b6b5b7d61e
|
7
|
+
data.tar.gz: a203cb5d7412893098e648c1cb2a558640048e18ba7b49c16406bc6e3c17f6323cfd3bf97fcbd59b1ba3b307c651cbb1f4bb067434779fe81674cb5a8a64681c
|
data/lib/cafe_basics.rb
CHANGED
@@ -1975,20 +1975,27 @@ class Wordpress
|
|
1975
1975
|
|
1976
1976
|
def save_image
|
1977
1977
|
if @data['이미지설정']['이미지'].length == 0
|
1978
|
-
|
1978
|
+
return
|
1979
|
+
end
|
1980
|
+
|
1981
|
+
if @data['이미지설정']['순서사용'].checked?
|
1982
|
+
image_path = @data['이미지설정']['이미지'][@image_counter][2]
|
1983
|
+
@image_counter += 1
|
1984
|
+
if @image_counter > @data['이미지설정']['이미지'].length - 1
|
1985
|
+
@image_counter = 0
|
1986
|
+
end
|
1979
1987
|
else
|
1980
|
-
|
1981
|
-
|
1982
|
-
|
1983
|
-
|
1984
|
-
@image_counter = 0
|
1985
|
-
end
|
1986
|
-
else
|
1987
|
-
image_path = @data['이미지설정']['이미지'].sample[2]
|
1988
|
+
# 초기화가 안됐거나 다 썼으면 새롭게 섞는다
|
1989
|
+
@shuffled_images ||= []
|
1990
|
+
if @shuffled_images.empty?
|
1991
|
+
@shuffled_images = @data['이미지설정']['이미지'].shuffle
|
1988
1992
|
end
|
1989
|
-
|
1990
|
-
|
1993
|
+
|
1994
|
+
image_path = @shuffled_images.shift[2]
|
1991
1995
|
end
|
1996
|
+
|
1997
|
+
img = Magick::Image.read(image_path).first
|
1998
|
+
img.write('./image/memory.png')
|
1992
1999
|
end
|
1993
2000
|
|
1994
2001
|
def change_image_size(w)
|
@@ -2505,6 +2512,22 @@ class Wordpress
|
|
2505
2512
|
@data['table'].pop
|
2506
2513
|
#제목끝
|
2507
2514
|
# content = " #{content} "
|
2515
|
+
if @data['포스트설정']['gpt키워드'].checked?
|
2516
|
+
gpt_keyword_prompt = @data['포스트설정']['gpt키워드_프롬프트'].text.to_s.force_encoding('utf-8')
|
2517
|
+
gpt_keyword_prompt_sample = gpt_keyword_prompt.strip.empty? ? "프롬프트: 관련된 글을 1500자에서 2500자 사이로 만들어줘" : gpt_keyword_prompt
|
2518
|
+
chat = Chat.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'), gpt_keyword_prompt)
|
2519
|
+
gpt_text = chat.message(keyword)
|
2520
|
+
#content = content.to_s + "\n(자동생성글)\n" + gpt_text.to_s
|
2521
|
+
content = content.to_s + "(자동생성글)" + gpt_text.to_s
|
2522
|
+
elsif @data['포스트설정']['내용을자동생성'].checked?
|
2523
|
+
content = auto_text
|
2524
|
+
elsif @data['포스트설정']['내용과자동생성'].checked?
|
2525
|
+
#content = content + "\n(자동생성글)\n" + auto_text
|
2526
|
+
content = content + "(자동생성글)" + auto_text
|
2527
|
+
end
|
2528
|
+
@data['table'][index][-1] = 45
|
2529
|
+
@data['table'] << []
|
2530
|
+
@data['table'].pop
|
2508
2531
|
|
2509
2532
|
if @data['포스트설정']['특정단어굵기'].checked?
|
2510
2533
|
content2 = ''
|
@@ -2544,7 +2567,7 @@ class Wordpress
|
|
2544
2567
|
content = content2
|
2545
2568
|
end
|
2546
2569
|
end
|
2547
|
-
@data['table'][index][-1] =
|
2570
|
+
@data['table'][index][-1] = 50
|
2548
2571
|
@data['table'] << []
|
2549
2572
|
@data['table'].pop
|
2550
2573
|
if @data['포스트설정']['단어크기변경'].checked?
|
@@ -2565,19 +2588,7 @@ class Wordpress
|
|
2565
2588
|
@data['table'][index][-1] = 50
|
2566
2589
|
@data['table'] << []
|
2567
2590
|
@data['table'].pop
|
2568
|
-
|
2569
|
-
gpt_keyword_prompt = @data['포스트설정']['gpt키워드_프롬프트'].text.to_s.force_encoding('utf-8')
|
2570
|
-
gpt_keyword_prompt_sample = gpt_keyword_prompt.strip.empty? ? "프롬프트: 관련된 글을 1500자에서 2500자 사이로 만들어줘" : gpt_keyword_prompt
|
2571
|
-
chat = Chat.new(@data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8'), gpt_keyword_prompt)
|
2572
|
-
gpt_text = chat.message(keyword)
|
2573
|
-
#content = content.to_s + "\n(자동생성글)\n" + gpt_text.to_s
|
2574
|
-
content = content.to_s + "(자동생성글)" + gpt_text.to_s
|
2575
|
-
elsif @data['포스트설정']['내용을자동생성'].checked?
|
2576
|
-
content = auto_text
|
2577
|
-
elsif @data['포스트설정']['내용과자동생성'].checked?
|
2578
|
-
#content = content + "\n(자동생성글)\n" + auto_text
|
2579
|
-
content = content + "(자동생성글)" + auto_text
|
2580
|
-
end
|
2591
|
+
|
2581
2592
|
|
2582
2593
|
if @data['포스트설정']['내용키워드삽입'].checked?
|
2583
2594
|
puts '내용키워드삽입...'
|
@@ -2762,134 +2773,86 @@ class Wordpress
|
|
2762
2773
|
puts '내용사진자동삽입...'
|
2763
2774
|
sn = @data['포스트설정']['내용사진자동삽입시작숫자'].text.to_s.force_encoding('utf-8').to_i
|
2764
2775
|
en = @data['포스트설정']['내용사진자동삽입끝숫자'].text.to_s.force_encoding('utf-8').to_i
|
2776
|
+
|
2765
2777
|
begin
|
2766
2778
|
cn = rand(sn..en)
|
2767
2779
|
rescue
|
2768
2780
|
cn = 0
|
2769
2781
|
puts 'cn = rand(sn..en) error cn = 1'
|
2770
2782
|
end
|
2771
|
-
|
2783
|
+
|
2772
2784
|
if cn != 0
|
2773
|
-
|
2785
|
+
# content5 구성 및 위치 배열 생성
|
2774
2786
|
if @data['포스트설정']['내용과자동생성'].checked?
|
2775
|
-
if @data['포스트설정']['자동글 수식에 입력'].checked?
|
2776
|
-
for n in 1..cn
|
2777
|
-
position << rand(0..(content.split("(자동생성글)")[0].split("\n").length-1))
|
2778
|
-
sleep(2)
|
2779
|
-
end
|
2780
|
-
else
|
2781
|
-
for n in 1..cn
|
2782
|
-
position << rand(0..(content.split("(자동생성글)")[0].split("\n").length-1))
|
2783
|
-
sleep(2)
|
2784
|
-
end
|
2785
|
-
end
|
2786
|
-
# position.pop
|
2787
|
-
else
|
2788
|
-
for n in 1..cn
|
2789
|
-
position << rand(0..(content.split("\n").length-2))
|
2790
|
-
sleep(2)
|
2791
|
-
end
|
2792
|
-
end
|
2793
|
-
|
2794
|
-
if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt키워드'].checked?
|
2795
2787
|
if @data['포스트설정']['자동글 수식에 입력'].checked?
|
2796
2788
|
content5 = content.split("(자동생성글)")[0].to_s.split("\n")
|
2797
2789
|
content55 = content.split("(자동생성글)")[1].to_s
|
2790
|
+
position = content5.length.times.to_a.sample(cn).sort.reverse
|
2798
2791
|
else
|
2799
2792
|
content5 = content.split("(자동생성글)")[0].to_s.split("\n")
|
2800
2793
|
content55 = content.split("(자동생성글)")[1].to_s
|
2794
|
+
position = content5.length.times.to_a.sample(cn).sort.reverse
|
2801
2795
|
end
|
2796
|
+
elsif @data['포스트설정']['gpt키워드'].checked?
|
2797
|
+
content5 = content.split("(자동생성글)")[1].to_s.split("\n")
|
2798
|
+
content_prefix = content.split("(자동생성글)")[0].to_s
|
2799
|
+
content55 = ''
|
2800
|
+
position = content5.length.times.to_a.sample(cn).sort.reverse
|
2802
2801
|
else
|
2802
|
+
content5 = content.split("\n")
|
2803
2803
|
content55 = ''
|
2804
|
-
|
2804
|
+
position = content5.length.times.to_a.sample(cn).sort.reverse
|
2805
2805
|
end
|
2806
|
-
|
2807
|
-
|
2808
|
-
puts content55
|
2809
|
-
p position
|
2810
|
-
|
2806
|
+
|
2807
|
+
# 중복 필터링 로직
|
2811
2808
|
while true
|
2812
2809
|
check11 = 0
|
2813
|
-
|
2814
|
-
if content5[
|
2810
|
+
position.each_with_index do |pos, idx|
|
2811
|
+
if content5[pos].to_s.include?('style') || content5[pos].to_s.include?('<') || content5[pos].to_s.include?('>')
|
2815
2812
|
check11 = 1
|
2816
|
-
position[
|
2813
|
+
position[idx] += 4
|
2817
2814
|
end
|
2818
2815
|
end
|
2819
|
-
if check11 == 0
|
2820
|
-
break
|
2821
|
-
end
|
2816
|
+
break if check11 == 0
|
2822
2817
|
end
|
2823
|
-
|
2824
|
-
|
2825
|
-
|
2826
|
-
|
2827
|
-
|
2828
|
-
|
2829
|
-
|
2830
|
-
|
2831
|
-
|
2832
|
-
|
2833
|
-
|
2834
|
-
# puts '사진넣는위치 => '+i.to_s
|
2835
|
-
# if @data['포스트설정']['내용사진링크'].checked?
|
2836
|
-
# 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>'+""
|
2837
|
-
# content5.insert(i, '**image**')
|
2838
|
-
# else
|
2839
|
-
# image_memory << ""+'<img src="'+image_url+'" alt="'+keyword+'" class="aligncenter size-full">'+""
|
2840
|
-
# content5.insert(i, '**image**')
|
2841
|
-
# end
|
2842
|
-
# end
|
2843
|
-
|
2844
|
-
# if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt키워드'].checked?
|
2845
|
-
# content = content5.join("\n")+'(자동생성글)'+content55
|
2846
|
-
# iconv = Iconv.new('UTF-8', 'ASCII-8BIT')
|
2847
|
-
# content = iconv.iconv(content)
|
2848
|
-
# content = content.encode('UTF-8', 'binary', invalid: :replace, replace: '')
|
2849
|
-
# puts content
|
2850
|
-
# image_url = image_url22
|
2851
|
-
|
2852
|
-
# if @data['포스트설정']['자동글 수식에 입력'].checked?
|
2853
|
-
|
2854
|
-
# else
|
2855
|
-
# if @data['포스트설정']['내용사진링크'].checked?
|
2856
|
-
# content = content.split('(자동생성글)')[0]+""+'<a href="'+@data['포스트설정']['내용사진링크값'].text.to_s.force_encoding('utf-8')+'"><img src="'+image_url+'" alt="'+keyword+'"></a>'+""+'(자동생성글)'+content.split('(자동생성글)')[1]
|
2857
|
-
# else
|
2858
|
-
# content = content.split('(자동생성글)')[0]+""+'<img src="'+image_url+'" alt="'+keyword+'" >'+""+'(자동생성글)'+content.split('(자동생성글)')[1]
|
2859
|
-
# end
|
2860
|
-
# end
|
2861
|
-
###여기까지 이미지 순서대로 안되서 변경##-------------------------------------------------------------------------------
|
2862
|
-
|
2863
|
-
##여기서부터 이미지 순서대로 수정코드 변경####-------------------------------------------------------------------------------
|
2864
|
-
if @data['포스트설정']['내용과자동생성'].checked? or @data['포스트설정']['gpt키워드'].checked?
|
2818
|
+
|
2819
|
+
if @data['포스트설정']['내용과자동생성'].checked? || @data['포스트설정']['gpt키워드'].checked?
|
2820
|
+
sleep(2)
|
2821
|
+
puts '이미지 자동 세탁 중 · · · '
|
2822
|
+
end
|
2823
|
+
|
2824
|
+
p content5
|
2825
|
+
puts content55
|
2826
|
+
p position
|
2827
|
+
|
2865
2828
|
sleep(2)
|
2866
|
-
|
2867
|
-
|
2868
|
-
|
2869
|
-
|
2870
|
-
|
2871
|
-
|
2872
|
-
|
2873
|
-
|
2874
|
-
|
2875
|
-
content5.insert(i, '**image**')
|
2876
|
-
else
|
2877
|
-
image_memory << ""+'<img src="'+image_url22+'" alt="'+keyword+'" class="aligncenter size-full">'+""
|
2878
|
-
content5.insert(i, '**image**')
|
2829
|
+
position.each do |i|
|
2830
|
+
image_url22 = get_image_file().force_encoding('utf-8')
|
2831
|
+
if @data['포스트설정']['내용사진링크'].checked?
|
2832
|
+
image_tag = '<a href="' + @data['포스트설정']['내용사진링크값'].text.to_s.force_encoding('utf-8') +
|
2833
|
+
'"><img src="' + image_url22 + '" alt="' + keyword.force_encoding('utf-8') + '" class="aligncenter size-full"></a>'
|
2834
|
+
else
|
2835
|
+
image_tag = '<img src="' + image_url22 + '" alt="' + keyword + '" class="aligncenter size-full">'
|
2836
|
+
end
|
2837
|
+
content5.insert(i, image_tag)
|
2879
2838
|
end
|
2880
|
-
|
2881
|
-
|
2882
|
-
|
2883
|
-
|
2884
|
-
|
2885
|
-
|
2886
|
-
|
2839
|
+
|
2840
|
+
sleep(2)
|
2841
|
+
puts '이미지 자동 세탁 완료 · · · '
|
2842
|
+
|
2843
|
+
if @data['포스트설정']['내용과자동생성'].checked?
|
2844
|
+
content = content5.join("\n") + '(자동생성글)' + content55
|
2845
|
+
elsif @data['포스트설정']['gpt키워드'].checked?
|
2846
|
+
content = content_prefix + "(자동생성글)" + content5.join("\n")
|
2887
2847
|
else
|
2888
2848
|
content = content5.join("\n")
|
2889
2849
|
end
|
2890
2850
|
end
|
2891
2851
|
end
|
2852
|
+
|
2892
2853
|
|
2854
|
+
|
2855
|
+
##여기서부터 이미지 순서대로 수정코드 변경####-------------------------------------------------------------------------------
|
2893
2856
|
@data['table'][index][-1] = 70
|
2894
2857
|
@data['table'] << []
|
2895
2858
|
@data['table'].pop
|
@@ -2897,13 +2860,22 @@ class Wordpress
|
|
2897
2860
|
content_memory = content.split('(자동생성글)')
|
2898
2861
|
content = content_memory[0]
|
2899
2862
|
content_end = content_memory[1].to_s
|
2863
|
+
if @data['포스트설정']['gpt키워드'].checked?
|
2864
|
+
if @data['포스트설정']['gpt상단'].checked?
|
2865
|
+
content = "(자동생성글)\n" + content_end + "\n" + content
|
2866
|
+
else
|
2867
|
+
content = content + "\n(자동생성글)\n" + content_end
|
2868
|
+
end
|
2869
|
+
else
|
2870
|
+
content = content + "\n(자동생성글)\n" + content_end
|
2871
|
+
end
|
2900
2872
|
|
2901
2873
|
if @data['포스트설정']['특정단어키워드로변경'].checked?
|
2902
2874
|
@data['포스트설정']['특정단어키워드로변경값'].text.to_s.force_encoding('utf-8').split(',').each do |i|
|
2903
2875
|
content = content.split(i.force_encoding('utf-8')).join(keyword)
|
2904
2876
|
end
|
2905
2877
|
end
|
2906
|
-
|
2878
|
+
|
2907
2879
|
@data['table'][index][-1] = 75
|
2908
2880
|
@data['table'] << []
|
2909
2881
|
@data['table'].pop
|
@@ -2920,12 +2892,7 @@ class Wordpress
|
|
2920
2892
|
ttr = 0
|
2921
2893
|
@data['포스트설정']['단어사진으로변경단어'].text.to_s.force_encoding('utf-8').split(',').each do |i|
|
2922
2894
|
ttr = 1
|
2923
|
-
|
2924
|
-
# if @data['포스트설정']['내용사진링크'].checked?
|
2925
|
-
# content = content.split(i.force_encoding('utf-8')).join('<a href="'+@data['포스트설정']['내용사진링크값'].text.to_s.force_encoding('utf-8')+'"><img src="'+image_url+'" alt="'+keyword+'"></a>')
|
2926
|
-
# else
|
2927
|
-
# content = content.split(i.force_encoding('utf-8')).join('<img src="'+image_url+'" alt="'+keyword+'">')
|
2928
|
-
# end
|
2895
|
+
|
2929
2896
|
content = content.split(i.force_encoding('utf-8'))
|
2930
2897
|
content.each_with_index do |ccm, index3|
|
2931
2898
|
if index3 == content.length-1
|
@@ -2935,6 +2902,7 @@ class Wordpress
|
|
2935
2902
|
if i.force_encoding('utf-8').to_s.include?('@')
|
2936
2903
|
image_memory << ""+'<img src="'+image_url+'" alt="'+keyword+'">'+""
|
2937
2904
|
content[index3] = content[index3] + '**image()**'
|
2905
|
+
|
2938
2906
|
else
|
2939
2907
|
image_memory << ""+ '<img src="'+image_url+'" alt="'+keyword+'">'+""
|
2940
2908
|
content[index3] = content[index3] + '**image**'
|
@@ -2944,6 +2912,8 @@ class Wordpress
|
|
2944
2912
|
content = content.join('')
|
2945
2913
|
end
|
2946
2914
|
end
|
2915
|
+
|
2916
|
+
|
2947
2917
|
|
2948
2918
|
con_memory = Array.new
|
2949
2919
|
index5 = 0
|
@@ -2981,6 +2951,8 @@ class Wordpress
|
|
2981
2951
|
content = content.split(i.force_encoding('utf-8')).join("<sticker></sticker>")
|
2982
2952
|
end
|
2983
2953
|
end
|
2954
|
+
|
2955
|
+
|
2984
2956
|
|
2985
2957
|
if @data['포스트설정']['영상으로변경'].checked?
|
2986
2958
|
if @video.length == 0
|
@@ -3009,36 +2981,79 @@ class Wordpress
|
|
3009
2981
|
# end
|
3010
2982
|
#end
|
3011
2983
|
if @data['포스트설정']['지도로변경'].checked?
|
3012
|
-
# 지도 주소와 사용자 설정 단어들을 가져옵니다.
|
3013
2984
|
map_address = @data['포스트설정']['지도주소'].text.to_s.force_encoding('utf-8')
|
3014
|
-
|
3015
|
-
# 여러 단어로 설정된 '지도로변경단어'를 분리하여 배열로 저장
|
3016
2985
|
change_words = @data['포스트설정']['지도로변경단어'].text.to_s.force_encoding('utf-8').split(',')
|
3017
2986
|
|
3018
|
-
# content를 각 줄로 분할
|
3019
2987
|
content_lines = content.split("\n")
|
2988
|
+
new_lines = []
|
2989
|
+
|
2990
|
+
content_lines.each do |line|
|
2991
|
+
# 이미 처리된 줄은 건너뜀
|
2992
|
+
if line.include?("<koreamap>")
|
2993
|
+
new_lines << line
|
2994
|
+
next
|
2995
|
+
end
|
2996
|
+
|
2997
|
+
processed = false
|
3020
2998
|
|
3021
|
-
content_lines.each_with_index do |line, index|
|
3022
|
-
# 각 단어에 대해 처리
|
3023
2999
|
change_words.each do |change_word|
|
3024
|
-
#
|
3025
|
-
if line.
|
3026
|
-
|
3027
|
-
if
|
3028
|
-
|
3029
|
-
|
3030
|
-
|
3031
|
-
|
3032
|
-
#
|
3033
|
-
|
3000
|
+
# 1. [단어][주소] 패턴 처리: 분리 + 출력
|
3001
|
+
if line =~ /#{Regexp.escape(change_word)}\[(.*?)\]/
|
3002
|
+
match_data = line.match(/(.*)#{Regexp.escape(change_word)}\[(.*?)\](.*)/)
|
3003
|
+
if match_data
|
3004
|
+
before = match_data[1]
|
3005
|
+
address = match_data[2]
|
3006
|
+
after = match_data[3]
|
3007
|
+
|
3008
|
+
# 태그 추출
|
3009
|
+
open_tag = before[/<p[^>]*?>/i] || ""
|
3010
|
+
close_tag = after[/<\/p>/i] || ""
|
3011
|
+
|
3012
|
+
# 텍스트 정리
|
3013
|
+
before_text = before.sub(open_tag, '')
|
3014
|
+
after_text = after.sub(close_tag, '')
|
3015
|
+
|
3016
|
+
# 줄 분리
|
3017
|
+
new_lines << "#{open_tag}#{before_text}</p>" unless before_text.strip.empty?
|
3018
|
+
new_lines << "<koreamap>#{address}</koreamap>"
|
3019
|
+
new_lines << "#{open_tag}#{after_text}#{close_tag}" unless after_text.strip.empty?
|
3020
|
+
|
3021
|
+
processed = true
|
3022
|
+
break
|
3034
3023
|
end
|
3035
3024
|
end
|
3025
|
+
|
3026
|
+
# 2. 일반 단어 처리 (한 줄에만 등장하는 경우)
|
3027
|
+
if !processed && line.include?(change_word)
|
3028
|
+
parts = line.split(change_word, 2)
|
3029
|
+
prefix = parts[0]
|
3030
|
+
suffix = parts[1]
|
3031
|
+
|
3032
|
+
open_tag = prefix[/<p[^>]*?>/i] || ""
|
3033
|
+
close_tag = suffix[/<\/p>/i] || ""
|
3034
|
+
|
3035
|
+
prefix_text = prefix.sub(open_tag, '')
|
3036
|
+
suffix_text = suffix.sub(close_tag, '')
|
3037
|
+
|
3038
|
+
new_lines << "#{open_tag}#{prefix_text}</p>" unless prefix_text.strip.empty?
|
3039
|
+
new_lines << "<koreamap>#{map_address}</koreamap>"
|
3040
|
+
new_lines << "#{open_tag}#{suffix_text}#{close_tag}" unless suffix_text.strip.empty?
|
3041
|
+
|
3042
|
+
processed = true
|
3043
|
+
break
|
3044
|
+
end
|
3036
3045
|
end
|
3046
|
+
|
3047
|
+
# 변경이 없었으면 원래 줄 추가
|
3048
|
+
new_lines << line unless processed
|
3037
3049
|
end
|
3038
3050
|
|
3039
|
-
|
3040
|
-
content = content_lines.join("\n")
|
3051
|
+
content = new_lines.join("\n")
|
3041
3052
|
end
|
3053
|
+
|
3054
|
+
|
3055
|
+
|
3056
|
+
|
3042
3057
|
|
3043
3058
|
if @data['포스트설정']['인용구변경'].checked?
|
3044
3059
|
if @data['포스트설정']['인용구문구설정'].checked?
|
@@ -3076,21 +3091,26 @@ class Wordpress
|
|
3076
3091
|
@data['table'] << []
|
3077
3092
|
@data['table'].pop
|
3078
3093
|
|
3094
|
+
|
3095
|
+
parts = content.split('(자동생성글)', 2)
|
3096
|
+
content_main = parts[0].strip
|
3097
|
+
content_end = parts[1].to_s.strip
|
3098
|
+
|
3079
3099
|
soosick_1 = ''
|
3080
3100
|
soosick_2 = ''
|
3081
3101
|
if @data['포스트설정']['자동글 수식에 입력'].checked?
|
3082
|
-
|
3083
|
-
|
3102
|
+
content = content_main
|
3103
|
+
soosick_1 = content_end
|
3084
3104
|
else
|
3085
|
-
|
3086
|
-
|
3087
|
-
|
3088
|
-
else
|
3089
|
-
content = content+"\n"+content_end+"\n"
|
3090
|
-
end
|
3105
|
+
if @data['포스트설정']['gpt키워드'].checked?
|
3106
|
+
if @data['포스트설정']['gpt상단'].checked?
|
3107
|
+
content = content_end + "\n" + content_main + "\n"
|
3091
3108
|
else
|
3092
|
-
|
3109
|
+
content = content_main + "\n" + content_end + "\n"
|
3093
3110
|
end
|
3111
|
+
else
|
3112
|
+
content = content_main + "\n" + content_end + "\n"
|
3113
|
+
end
|
3094
3114
|
end
|
3095
3115
|
|
3096
3116
|
if @data['포스트설정']['막글삽입'].checked?
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cafe_basics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zon
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date: 2025-
|
10
|
+
date: 2025-04-24 00:00:00.000000000 Z
|
12
11
|
dependencies: []
|
13
12
|
description: File to Clipboard gem
|
14
13
|
email: mymin26@naver.com
|
@@ -21,7 +20,6 @@ homepage: ''
|
|
21
20
|
licenses:
|
22
21
|
- zon
|
23
22
|
metadata: {}
|
24
|
-
post_install_message:
|
25
23
|
rdoc_options: []
|
26
24
|
require_paths:
|
27
25
|
- lib
|
@@ -36,8 +34,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
36
34
|
- !ruby/object:Gem::Version
|
37
35
|
version: '0'
|
38
36
|
requirements: []
|
39
|
-
rubygems_version: 3.
|
40
|
-
signing_key:
|
37
|
+
rubygems_version: 3.6.7
|
41
38
|
specification_version: 4
|
42
39
|
summary: file to clipboard
|
43
40
|
test_files: []
|