cafe_basics_duo 0.0.52 → 0.0.53
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_duo.rb +34 -3
- 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: 93723a984d0dccded52d2a5f1e663692f89062c6b15c1b667d3c32fc8a5b4022
|
4
|
+
data.tar.gz: acf5a7fe88855c2f2538c0068fc9dee5fbfa981f152ac51a1618adfa2249007f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7fd209d32b72669184dfe546b78adf8d9b69c5749e56f915c0a49d6126e48dbf2967612f4bb0eb1a258a512fd31abd78f0df37ce74fc1b2b01cd1e49d84590e
|
7
|
+
data.tar.gz: ef047638a5089b6d4e6ed4a5eb440e1716002f6b3ff7f698e9af338e200485052ffdb1850f2b70a44a7ad0388f0f55fb7d86cd3e11bcd3dde9cff2542ae91904
|
data/lib/cafe_basics_duo.rb
CHANGED
@@ -2995,11 +2995,42 @@ class Wordpress
|
|
2995
2995
|
end
|
2996
2996
|
end
|
2997
2997
|
|
2998
|
+
#if @data['포스트설정']['지도로변경'].checked?
|
2999
|
+
# @data['포스트설정']['지도로변경단어'].text.to_s.force_encoding('utf-8').split(',').each do |i|
|
3000
|
+
# content = content.split(i.force_encoding('utf-8')).join("<koreamap>"+@data['포스트설정']['지도주소'].text.to_s.force_encoding('utf-8').force_encoding('utf-8')+"</koreamap>")
|
3001
|
+
# end
|
3002
|
+
#end
|
2998
3003
|
if @data['포스트설정']['지도로변경'].checked?
|
2999
|
-
|
3000
|
-
|
3004
|
+
# 지도 주소와 사용자 설정 단어들을 가져옵니다.
|
3005
|
+
map_address = @data['포스트설정']['지도주소'].text.to_s.force_encoding('utf-8')
|
3006
|
+
|
3007
|
+
# 여러 단어로 설정된 '지도로변경단어'를 분리하여 배열로 저장
|
3008
|
+
change_words = @data['포스트설정']['지도로변경단어'].text.to_s.force_encoding('utf-8').split(',')
|
3009
|
+
|
3010
|
+
# content를 각 줄로 분할
|
3011
|
+
content_lines = content.split("\n")
|
3012
|
+
|
3013
|
+
content_lines.each_with_index do |line, index|
|
3014
|
+
# 각 단어에 대해 처리
|
3015
|
+
change_words.each do |change_word|
|
3016
|
+
# 'change_word'가 포함된 줄에 대해서만 처리
|
3017
|
+
if line.include?(change_word)
|
3018
|
+
# 설정된 단어 뒤에 괄호가 있는지 확인
|
3019
|
+
if line.include?("[") && line.include?("]")
|
3020
|
+
# 괄호 안의 주소를 찾아서 그 주소는 그대로 두고, 지도로 변경된 주소로 교체
|
3021
|
+
address_in_brackets = line.match(/\[(.*?)\]/)[1] # 괄호 안의 주소를 추출
|
3022
|
+
content_lines[index] = "<koreamap>#{address_in_brackets}</koreamap>"
|
3023
|
+
else
|
3024
|
+
# 괄호가 없다면 @data['포스트설정']['지도주소']를 추가
|
3025
|
+
content_lines[index] = "<koreamap>#{map_address}</koreamap>"
|
3026
|
+
end
|
3027
|
+
end
|
3028
|
+
end
|
3001
3029
|
end
|
3002
|
-
|
3030
|
+
|
3031
|
+
# 다시 content로 합치기
|
3032
|
+
content = content_lines.join("\n")
|
3033
|
+
end
|
3003
3034
|
|
3004
3035
|
if @data['포스트설정']['인용구변경'].checked?
|
3005
3036
|
if @data['포스트설정']['인용구문구설정'].checked?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cafe_basics_duo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.53
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-02-
|
11
|
+
date: 2025-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: File to Clipboard gem
|
14
14
|
email: mymin26@naver.com
|