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.
- package/lib/parser.js +9 -3
- 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
|
-
|
|
250
|
-
|
|
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(
|
|
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);
|