cafe_buy 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_buy.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: e540cc3f1a8bf05f04c1512909e670d9e12efe2165cbd4f57eb8b32e85674155
|
4
|
+
data.tar.gz: 59746495659750b93390306e1ebed84b3016402de73dfd721fce20a03ae577c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1b31d49952fb0af962ffe5d7769ab146d02ed2367c93f25dae0ab5eeb35a805aa6e2a994834e04bea8d076a4ecf41bc1225ffcadc6f7f73fb3f498083118e5d
|
7
|
+
data.tar.gz: 8195c729713e9e4099d8389098a3f942611ba3eed135e721c0b6a35875d40b1bc64fa5e475fc9fcf1a931962eca042d679c74b917e39f4c79337ad9f0afc7726
|
data/lib/cafe_buy.rb
CHANGED
@@ -3251,11 +3251,42 @@ class Wordpress
|
|
3251
3251
|
end
|
3252
3252
|
end
|
3253
3253
|
|
3254
|
+
#if @data['포스트설정']['지도로변경'].checked?
|
3255
|
+
# @data['포스트설정']['지도로변경단어'].text.to_s.force_encoding('utf-8').split(',').each do |i|
|
3256
|
+
# content = content.split(i.force_encoding('utf-8')).join("<koreamap>"+@data['포스트설정']['지도주소'].text.to_s.force_encoding('utf-8').force_encoding('utf-8')+"</koreamap>")
|
3257
|
+
# end
|
3258
|
+
#end
|
3254
3259
|
if @data['포스트설정']['지도로변경'].checked?
|
3255
|
-
|
3256
|
-
|
3260
|
+
# 지도 주소와 사용자 설정 단어들을 가져옵니다.
|
3261
|
+
map_address = @data['포스트설정']['지도주소'].text.to_s.force_encoding('utf-8')
|
3262
|
+
|
3263
|
+
# 여러 단어로 설정된 '지도로변경단어'를 분리하여 배열로 저장
|
3264
|
+
change_words = @data['포스트설정']['지도로변경단어'].text.to_s.force_encoding('utf-8').split(',')
|
3265
|
+
|
3266
|
+
# content를 각 줄로 분할
|
3267
|
+
content_lines = content.split("\n")
|
3268
|
+
|
3269
|
+
content_lines.each_with_index do |line, index|
|
3270
|
+
# 각 단어에 대해 처리
|
3271
|
+
change_words.each do |change_word|
|
3272
|
+
# 'change_word'가 포함된 줄에 대해서만 처리
|
3273
|
+
if line.include?(change_word)
|
3274
|
+
# 설정된 단어 뒤에 괄호가 있는지 확인
|
3275
|
+
if line.include?("[") && line.include?("]")
|
3276
|
+
# 괄호 안의 주소를 찾아서 그 주소는 그대로 두고, 지도로 변경된 주소로 교체
|
3277
|
+
address_in_brackets = line.match(/\[(.*?)\]/)[1] # 괄호 안의 주소를 추출
|
3278
|
+
content_lines[index] = "<koreamap>#{address_in_brackets}</koreamap>"
|
3279
|
+
else
|
3280
|
+
# 괄호가 없다면 @data['포스트설정']['지도주소']를 추가
|
3281
|
+
content_lines[index] = "<koreamap>#{map_address}</koreamap>"
|
3282
|
+
end
|
3283
|
+
end
|
3284
|
+
end
|
3257
3285
|
end
|
3258
|
-
|
3286
|
+
|
3287
|
+
# 다시 content로 합치기
|
3288
|
+
content = content_lines.join("\n")
|
3289
|
+
end
|
3259
3290
|
|
3260
3291
|
if @data['포스트설정']['인용구변경'].checked?
|
3261
3292
|
if @data['포스트설정']['인용구문구설정'].checked?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cafe_buy
|
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
|