suyuan2022/suyuan-skill / get-biji
get-biji
VerifiedGet 笔记(biji.com):把账号里的笔记同步成本地 Markdown 并检索;用 Get 的转写额度把视频、播客、本地音视频转成逐字稿。 触发:用户要同步或查 Get 笔记里的录音和笔记;给了抖音、小红书、B 站、小宇宙链接或本地音视频,要逐字稿。
| File | Kind | Size |
|---|---|---|
| .gitignore | other | 245 B |
| SKILL.md | skill md | 6.3 KB |
| package-lock.json | manifest | 1.8 KB |
| package.json | manifest | 497 B |
| references/检索.md | markdown | 3.1 KB |
| scripts/api.js | script | 9.7 KB |
| scripts/dedupe.js | script | 2.8 KB |
| scripts/format.js | script | 13.4 KB |
| scripts/link-transcript.js | script | 12.3 KB |
| scripts/paths.js | script | 1.9 KB |
| scripts/rebuild-state.js | script | 1.6 KB |
| scripts/sync.js | script | 8.3 KB |
scripts/rebuild-state.js
View on GitHub#!/usr/bin/env node
/**
* Rebuild sync state from the notes already on disk.
* Notes found in the notes directory are marked as synced; the rest are left for the next sync.js run.
* Use it when the sync state is lost (new machine, deleted ~/.config/get-biji) but the notes directory is intact.
*/
const fs = require('fs');
const path = require('path');
const { fetchAllNotes, saveSyncState } = require('./api');
const { safeName } = require('./format');
const { resolveOutputDir } = require('./paths');
async function main() {
const outputDir = resolveOutputDir();
console.log(`🔄 Rebuilding sync state from ${outputDir}...\n`);
const allNotes = await fetchAllNotes();
const onDisk = [];
const missing = [];
for (const note of allNotes) {
const dateStr = (note.created_at || '').split(' ')[0] || 'unknown-date';
const rawTime = (note.created_at || '').split(' ')[1] || '00:00:00';
const timeStr = rawTime.substring(0, 8).replace(/:/g, '');
const filePath = path.join(outputDir, dateStr, `${timeStr}_${safeName(note.title)}.md`);
(fs.existsSync(filePath) ? onDisk : missing).push(note);
}
saveSyncState({
outputDir,
fullSyncAt: missing.length === 0 ? new Date().toISOString() : undefined,
syncedIds: onDisk.map(n => n.note_id),
lastSyncTime: new Date().toISOString(),
});
console.log(`📊 Notes in Get: ${allNotes.length}`);
console.log(` On disk (marked as synced): ${onDisk.length}`);
console.log(` Missing (next sync.js run fetches them): ${missing.length}`);
}
main().catch(e => {
console.error(`❌ ${e.message}`);
process.exit(1);
});
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |