The card shows last week's issue with a link to it, or a button to draft it. Drafting a week that already has an issue (draft or published) is refused, with a link to that issue, rather than making a duplicate. Generated-by: Claude Opus 5.5
22 lines
1.3 KiB
Markdown
22 lines
1.3 KiB
Markdown
# diigo-week
|
|
|
|
An EmDash plugin that drafts a potluck issue from a week of your shared diigo bookmarks. It reads them as microformats from diigo-cache's public page, so you edit a draft instead of copy-pasting links.
|
|
|
|
## Getting started
|
|
|
|
Run diigo-cache (with a filled public cache) and potluck, each in its own terminal:
|
|
|
|
```sh
|
|
pnpm install
|
|
(cd ../diigo-cache && pnpm dev) # → http://localhost:8787/
|
|
(cd ../potluck && pnpm dev) # → http://localhost:4321/_emdash/admin
|
|
```
|
|
|
|
On potluck's admin dashboard, the **This week's issue** card has a **Draft 2026-Wnn from diigo** button for last week; it links to the draft once made. For any other week: Plugins → **Draft from diigo**. A week that already has an issue isn't drafted again.
|
|
|
|
## How it reads the week
|
|
|
|
It asks diigo-cache for `/public/<user>?in=<week>&by=created` over the `DIIGO_CACHE` service binding (potluck's `wrangler.jsonc`), reads the page's `h-feed` of `h-entry` bookmarks, follows `rel=next`, and creates a draft in `issues`: title, week, dek, and a paragraph per bookmark with its description and tag links, as in potluck's `seed/issues.json`. The binding is its only reach outside the site; it declares `content:write` and `taxonomies:write` (the issue gets its bookmarks' tags, as the sample issues do), nothing else.
|
|
|
|
Checks: `pnpm lint && pnpm test`.
|