正文增加字数上限、去除微博视频提示

This commit is contained in:
anian
2026-03-15 23:39:04 +08:00
parent 54fb39d15c
commit b1f30b374f
6 changed files with 9987 additions and 20 deletions
+13 -1
View File
@@ -1,3 +1,15 @@
# anian-plugin-friends
> 基于原作者v1.4.3代码修改
#### v1.4.3-1
1. 大幅增加description字段的字符数上限
2. 去除description字段内的微博视频提示
# plugin-friends
> 1.3.4版本重构朋友圈插件
> 如果使用了之前版本,请清掉之前的所有数据,不然会有问题
@@ -232,4 +244,4 @@ cd path/to/plugin-friends
# Windows
./gradlew.bat build
```
```
+1 -1
View File
@@ -16,7 +16,7 @@ repositories {
}
dependencies {
implementation platform('run.halo.tools.platform:plugin:2.20.0-SNAPSHOT')
implementation platform('run.halo.tools.platform:plugin:2.20.11')
compileOnly 'run.halo.app:api'
testImplementation 'run.halo.app:api'
+1 -1
View File
@@ -1 +1 @@
version=1.3.7
version=1.4.3-1
+9953
View File
File diff suppressed because it is too large Load Diff
@@ -177,9 +177,11 @@ public class RssSyncReconciler implements Reconciler<RssSyncReconciler.Request>,
String description = friendPost.getSpec().getDescription();
//解析html内容转换成文本
if (StringUtils.isNotEmpty(description)){
description = CommonUtils.parseAndTruncateHtml2Text(description, 200);
description = CommonUtils.parseAndTruncateHtml2Text(description, 100000);
String regexp = "[ *|\\s*]*";
description = description.replaceFirst(regexp, "").trim();
String weiboVideoRegex = "\\s[^\\s]*的微博视频 视频无法显示,请前往微博视频观看。";
description = description.replaceAll(weiboVideoRegex, "");
friendPostSpec.setDescription(description);
}
client.create(friendPost);
File diff suppressed because one or more lines are too long