Skip to content

suyuan2022/suyuan-skill / get-biji

get-biji

Verified

Get 笔记(biji.com):把账号里的笔记同步成本地 Markdown 并检索;用 Get 的转写额度把视频、播客、本地音视频转成逐字稿。 触发:用户要同步或查 Get 笔记里的录音和笔记;给了抖音、小红书、B 站、小宇宙链接或本地音视频,要逐字稿。

FileKindSize
.gitignoreother245 B
SKILL.mdskill md6.3 KB
package-lock.jsonmanifest1.8 KB
package.jsonmanifest497 B
references/检索.mdmarkdown3.1 KB
scripts/api.jsscript9.7 KB
scripts/dedupe.jsscript2.8 KB
scripts/format.jsscript13.4 KB
scripts/link-transcript.jsscript12.3 KB
scripts/paths.jsscript1.9 KB
scripts/rebuild-state.jsscript1.6 KB
scripts/sync.jsscript8.3 KB

scripts/dedupe.js

View on GitHub
#!/usr/bin/env node

/**
 * Get Notes Deduplication Tool
 *
 * Finds summary files that share a `note_id` anywhere under the notes directory,
 * keeps the largest one, and deletes the rest together with their `_原文.md` transcript file.
 * A summary and its own `_原文.md` share a note_id by design, so transcript files are never compared.
 */

const fs = require('fs');
const path = require('path');
const { resolveOutputDir } = require('./paths');

const TRANSCRIPT_SUFFIX = '_原文.md';

function listSummaryFiles(dir) {
    return fs.readdirSync(dir, { withFileTypes: true }).flatMap(entry => {
        const full = path.join(dir, entry.name);
        if (entry.isDirectory()) return listSummaryFiles(full);
        return entry.name.endsWith('.md') && !entry.name.endsWith(TRANSCRIPT_SUFFIX) ? [full] : [];
    });
}

function frontmatterField(content, field) {
    const match = content.match(new RegExp(`^${field}:\\s*"?([^"\\n]+)"?`, 'm'));
    return match ? match[1].trim() : null;
}

function main() {
    const notesDir = resolveOutputDir();
    if (!fs.existsSync(notesDir)) {
        throw new Error(`Notes directory not found: ${notesDir}`);
    }
    console.log(`🔍 Scanning ${notesDir}...\n`);

    const byNoteId = new Map();
    for (const file of listSummaryFiles(notesDir)) {
        const content = fs.readFileSync(file, 'utf8');
        const noteId = frontmatterField(content, 'note_id');
        if (!noteId) continue;
        const stats = fs.statSync(file);
        const entry = { file, size: stats.size, mtime: stats.mtimeMs, transcript: frontmatterField(content, 'transcript') };
        byNoteId.set(noteId, [...(byNoteId.get(noteId) || []), entry]);
    }

    const duplicates = [...byNoteId.entries()].filter(([, files]) => files.length > 1);
    if (duplicates.length === 0) {
        console.log('✅ No duplicates found.');
        return;
    }

    let deleted = 0;
    for (const [noteId, files] of duplicates) {
        files.sort((a, b) => b.size - a.size || b.mtime - a.mtime);
        const [keep, ...remove] = files;
        console.log(`📝 note_id ${noteId}\n   Keep:   ${path.relative(notesDir, keep.file)}`);
        for (const f of remove) {
            const paired = f.transcript ? path.join(path.dirname(f.file), f.transcript) : null;
            for (const target of [f.file, paired]) {
                if (target && target !== keep.file && fs.existsSync(target)) {
                    console.log(`   Delete: ${path.relative(notesDir, target)}`);
                    fs.unlinkSync(target);
                    deleted++;
                }
            }
        }
    }
    console.log(`\n📊 Deleted ${deleted} files in ${duplicates.length} duplicate sets.`);
}

try {
    main();
} catch (e) {
    console.error(`❌ ${e.message}`);
    process.exit(1);
}
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall