first commit
This commit is contained in:
commit
9399a88d39
347 files changed
+167716
No files matched your search
@@ -0,0 +1,13 @@
|
||||
import fs from 'node:fs';
|
||||
const J = JSON.parse(fs.readFileSync('.cdp/out/items-7d-30d.json', 'utf8'));
|
||||
const N = s => Number(s) || 0;
|
||||
const L = [];
|
||||
for (const dt of ['recent7d', 'recent30d']) {
|
||||
const its = J.data[dt].items.filter(x => /手环11|Watch\s*[789]|S1[01]|GT\s*[56]|FIT\s*[45]/i.test(String(x.name)));
|
||||
L.push(`=== ${dt} 新型号条目 ${its.length} 个 ===`);
|
||||
its.sort((a, b) => N(b.pv) - N(a.pv)).forEach(x => L.push(
|
||||
[x.id, x.days + '天', '曝光' + x.pv, '浏览人' + x.ipvUv, '询单' + x.chat,
|
||||
x.ord + '单', '¥' + x.amt, '售价¥' + x.price, 'cvr' + x.cvr, x.c4,
|
||||
String(x.name).slice(0, 42)].join(' | ')));
|
||||
}
|
||||
fs.writeFileSync('.cdp/out/newmodels.txt', L.join('\n'), 'utf8');
|
||||
Reference in new issue
Block a user