koishi-plugin-xhs-parser 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/lib/parser.js +9 -3
  2. package/package.json +1 -1
package/lib/parser.js CHANGED
@@ -244,16 +244,22 @@ function buildNote(data, url, config) {
244
244
  videoUrls: extractVideoUrls(data),
245
245
  };
246
246
  }
247
+
248
+ const mobileLine = `------------------------------------`
249
+
247
250
  function formatNoteText(note, config) {
248
251
  const lines = [
249
- `小红书:${note.title}`,
250
- `作者:${note.authorName}`,
252
+ `📕: ${note.title}`,
253
+ `👤: ${note.authorName}`,
254
+ mobileLine,
251
255
  ];
252
256
  if (note.desc && config.maxDescLength > 0) {
253
257
  lines.push(trimText(note.desc, config.maxDescLength, config.descTruncateSuffix));
258
+ lines.push(mobileLine);
254
259
  }
255
260
  if (config.showStats) {
256
- lines.push(`点赞:${displayCount(note.likedCount)} 收藏:${displayCount(note.collectedCount)} 评论:${displayCount(note.commentCount)} 分享:${displayCount(note.shareCount)}`);
261
+ lines.push(`👍: ${displayCount(note.likedCount)} | 🌟: ${displayCount(note.collectedCount)} | 💬: ${displayCount(note.commentCount)} | 📤: ${displayCount(note.shareCount)}`);
262
+ lines.push(mobileLine);
257
263
  }
258
264
  if (config.showLink)
259
265
  lines.push(note.url);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koishi-plugin-xhs-parser",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Parse Xiaohongshu links and cards for Koishi.",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",