cafe_buy_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_buy_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: fecdbc2a486c4f4a3b06212bd8495c43beda2a27f770352e95b410fc9b8e7782
|
4
|
+
data.tar.gz: daa79992b7e307715c2749329bd960b70dcc31a5ae2c98828b378ad2f3ffde66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b308ff74ed6d8e550f8ef8dfdcd0e5023bdb77a1eb56b8e100a32d75d2b648cc4d1081ae7022482589c574fa69647f7b394ab430cb136671bea8d39c82c7b224
|
7
|
+
data.tar.gz: 4ec2345bc031878976b6614dc7978fde5efefb4c322c08517c5dbd73fb8a0cf00b44be5c5a0e68f21a117e183bb47a8a511d3290553c1a378697ec2e6f4801fc
|
data/lib/cafe_buy_duo.rb
CHANGED
@@ -3320,11 +3320,42 @@ class Wordpress
|
|
3320
3320
|
end
|
3321
3321
|
end
|
3322
3322
|
|
3323
|
+
#if @data['포스트설정']['지도로변경'].checked?
|
3324
|
+
# @data['포스트설정']['지도로변경단어'].text.to_s.force_encoding('utf-8').split(',').each do |i|
|
3325
|
+
# content = content.split(i.force_encoding('utf-8')).join("<koreamap>"+@data['포스트설정']['지도주소'].text.to_s.force_encoding('utf-8').force_encoding('utf-8')+"</koreamap>")
|
3326
|
+
# end
|
3327
|
+
#end
|
3323
3328
|
if @data['포스트설정']['지도로변경'].checked?
|
3324
|
-
|
3325
|
-
|
3329
|
+
# 지도 주소와 사용자 설정 단어들을 가져옵니다.
|
3330
|
+
map_address = @data['포스트설정']['지도주소'].text.to_s.force_encoding('utf-8')
|
3331
|
+
|
3332
|
+
# 여러 단어로 설정된 '지도로변경단어'를 분리하여 배열로 저장
|
3333
|
+
change_words = @data['포스트설정']['지도로변경단어'].text.to_s.force_encoding('utf-8').split(',')
|
3334
|
+
|
3335
|
+
# content를 각 줄로 분할
|
3336
|
+
content_lines = content.split("\n")
|
3337
|
+
|
3338
|
+
content_lines.each_with_index do |line, index|
|
3339
|
+
# 각 단어에 대해 처리
|
3340
|
+
change_words.each do |change_word|
|
3341
|
+
# 'change_word'가 포함된 줄에 대해서만 처리
|
3342
|
+
if line.include?(change_word)
|
3343
|
+
# 설정된 단어 뒤에 괄호가 있는지 확인
|
3344
|
+
if line.include?("[") && line.include?("]")
|
3345
|
+
# 괄호 안의 주소를 찾아서 그 주소는 그대로 두고, 지도로 변경된 주소로 교체
|
3346
|
+
address_in_brackets = line.match(/\[(.*?)\]/)[1] # 괄호 안의 주소를 추출
|
3347
|
+
content_lines[index] = "<koreamap>#{address_in_brackets}</koreamap>"
|
3348
|
+
else
|
3349
|
+
# 괄호가 없다면 @data['포스트설정']['지도주소']를 추가
|
3350
|
+
content_lines[index] = "<koreamap>#{map_address}</koreamap>"
|
3351
|
+
end
|
3352
|
+
end
|
3353
|
+
end
|
3326
3354
|
end
|
3327
|
-
|
3355
|
+
|
3356
|
+
# 다시 content로 합치기
|
3357
|
+
content = content_lines.join("\n")
|
3358
|
+
end
|
3328
3359
|
|
3329
3360
|
if @data['포스트설정']['인용구변경'].checked?
|
3330
3361
|
if @data['포스트설정']['인용구문구설정'].checked?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cafe_buy_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
|