Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ongaeshi/3f2f4d46c3ea8bada698aa16375cbbd4 to your computer and use it in GitHub Desktop.
Save ongaeshi/3f2f4d46c3ea8bada698aa16375cbbd4 to your computer and use it in GitHub Desktop.
今週のデイリーノートを分析してまとめてください。  
- デイリーノートを今から添付します。
- 段落は切らずに箇条書きでまとめて。  
- 全体で5行程度、コンパクトにお願いします。  
- Markdown 形式でコピーできるように出力してください。

PowerShell 上で実行する。

cat *-*-*.md | Set-Clipboard

<%* const fileName = tp.file.title; const [, year, weekStr] = fileName.match(/(\d{4})-W(\d+)/); const week = parseInt(weekStr);

const prev = week - 1; const after = week + 1;

tR += <<[[${year}-W${prev}]] [[${year}-W${after}]]>> %>

今週の感想。

window.pages = dv.pages(`"${dv.current().file.folder}"`).where(p => p.file.name.match(new RegExp(`${dv.current().file.name.split('-')[0]}-\\d{2}-\\d{2}`))).sort(p => p.file.name);

デイリーノート

dv.span(window.pages.map(n => `[[${n.file.name}]]`).join(" ・ "));

LLM による今週の分析

[[LLM に今週の作業を分析させるためのプロンプト]]

睡眠時間

const times = [];
for (let page of window.pages) {
    times.push(page['睡眠']);
}

// 平均睡眠時間計算
const avgTimes = times.filter(t => !isNaN(t) && t !== null);
const avgSleep = avgTimes.length > 0 ? (avgTimes.reduce((sum, t) => sum + t, 0) / avgTimes.length) : 0;
dv.paragraph(`平均: ${avgSleep.toFixed(2)}`);

const chartData = {
    type: 'line',
    data: {
        labels: window.pages.file.name.array(),
        datasets: [{
            label: '睡眠時間',
            data: times,
            pointBackgroundColor: '#6c40d6',
            borderColor: '#6c40d65c',
            tension: 0.4,
            spanGaps: true,
        }],
    },
    options: {
        scales: {
            y: {
                type: 'linear',
                min: 2,
                max: 12,
            }
        }
    }
}

window.renderChart(chartData, this.container);

筋トレ

TABLE 筋トレmin AS "トレーニング時間(分)"
FROM ""
WHERE 筋トレmin AND contains(file.folder, this.file.folder)
SORT file.name ASC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment