- ای بکس card beside the poet's books and genres on every poet page; /<poet>/ebooks with tabs
پی ڈی ایف (PDF) / ای پب (ePUB) / یونیکوڈ متن (Unicode) (+ آرکائیو when present) and a grid of covers.
- Covers: made in the moderator's browser from a PDF's first page (pdf.js) or an EPUB's cover (epub.js); archive.org's
thumbnail; a styled card for text; or the moderator's own image. سرورق بنائیں on existing books.
- PDF reader (pdf.js) reading right to left: next page to the left (button, ← key, left half), facing pages with the
cover alone then 2|3; left to right for LTR books; full screen (F); opens in a new tab; byte-range requests.
- Page bookmarks in the reader's library (kind 'page'), listed in نشانات and opening at that page.
- Details: writer as printed, co-authors (linked to poets on the site, who list the book too; new names kept as text),
language, reading direction (RTL/LTR), extra tags (on tag pages), source, copyright, note; in upload and review.
- Word lookup and selection menu only on reading text, not menus, buttons or tabs.
- Schema: the library kind check lists 'page' where it is defined (it was re-added without it).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ebooks permission (create, per poet); the upload button only for L2/L1 moderators with it (and admins).
- Files kept by SHA-256 in DIVAN_FILES_DIR (ab/cd/<sha>.<ext>; one copy per file), up to 100 MB, kind read from
the bytes; details in PostgreSQL indexed by poet and trigram (title, text of text books); search shows e-books.
- An upload is a revision (entity 'ebook') through L2 -> L1 -> admin; unpublished files only for moderators;
approved details committed to divan-data (divan/<poet>/ebooks/<id>.txt).
- ای بکس on the poet page; /ebook/<id>: PDF in the browser viewer, EPUB with epub.js, text, archive.org embed.
- README: e-books and the file store (attach growable block storage or an S3 bucket via rclone).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Types موضوع، صنف، بحر، شخصیت، مقام، دور and free ٹیگ; a work's tag may be on one couplet (شعر n, from 1).
- Tagging is a revision (tags-category / tags-work) through the L2 -> L1 -> admin pipeline with the new 'tags'
permission; publishing writes divan-data/divan/<url>.tags, commits it and updates the site; the import reloads them.
- Pages show tag chips (couplet tags under the couplet); /tag/<type>/<name> lists what carries a tag; /tags lists all.
- Search: tag:عشق / ٹیگ:"حب الوطنی" filters works (tagged work, couplet or book), matching tags shown as a group.
- Tag editor rows with suggestions, Urdu keyboard and Roman typing.
- Tests run one file at a time (they share Ghalib's ghazals); the library test picks a ghazal with three couplets.
- Mod buttons sit in a div (a form closes a p, which broke the row).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The keyboard finds its box again by id when a page redraws it (Base.astro), so it keeps typing into the
name box after a poet is added.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- home_sections: chosen-poets sections (مقبول شعرا) and century sections (every poet born in that Hijri century,
so new poets appear on their own); first use seeds the layout the home page had.
- New content type 'site' for grants (scope all, action edit); admins always. Changes apply at once and are audited.
- /mod/site editor (tab سرورق): names, ↑ ↓, remove, sort, add/remove/order poets with the Urdu name box.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Its own permission (arrange), separate from editing; same L2 -> L1 -> admin pipeline as a work's text
(revisions with entity 'order'), one line per item; only the order counts and every item stays listed.
- Publishing writes divan-data/divan/<url>.order, commits it and updates the site's positions.
- ترتیب دیں on poet and book/section pages; a sortable list (drag, ↑ ↓, اول, آخر); /mod/order/:id history.
- An unchanged arrangement is not kept, as with texts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- کوڈ in the toolbar: the Divan text next to the editor (stacked on phones), updated as you type; the سورس tab still edits it.
- A draft is only listed (my drafts, history, activity) once its text differs from the text it started from;
saving it unchanged drops it (compared as Divan text, so layout-only differences don't count) and says so;
submitting an unchanged returned draft is refused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- web/src/lib/editor.ts (Tiptap 3 MIT core): verse units of misras (1 = مصرع, 2 = شعر, 3+ = بند, as in
Divan text) with مطلع/حسن مطلع/مقطع labels, prose paragraphs, chapter headings and sub-headings, a
dictionary-link mark, footnotes and variant readings; Enter adds a misra (or moves into the next
empty one), Enter on an empty misra starts a new unit.
- Revision page: editor and source tabs over the same text, the work's data points as rows, a
toolbar (couplet, paragraph, headings, labels, dictionary link, footnote, variant, undo/redo,
Roman typing, Urdu keyboard). Saving always sends Divan text.
- Divan text: inline segments keep where links, footnotes and variants sit; toText writes a
document back. All 11,087 works round-trip unchanged through toText and through the editor.
- The Urdu keyboard and Roman typing type into rich editors; the reader's word sidebar and
selection menu stay out of editors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
/mod/guide, open to all: the tag summary table; the work header; ghazal couplets (Hasrat Mohani);
stanzas (Hali's musaddas); prose chapters and sub-headings (Muhammad Husain Azad's Aab-e-Hayat);
matla/maqta labels; dictionary links, footnotes and variant readings; Urdu letters, punctuation,
digits, diacritics, ZWNJ compounds and spacing; edit summaries; the L2 -> L1 -> admin review.
Every example shows its source beside the site's own rendering (shared DivanPreview component,
also used on the revision page). Linked from the moderation tabs and the editor.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- api/src/git.ts: each published version is a commit in the divan-data checkout (queued, one at a
time): the moderator as author by public name with a placeholder email, the summary and version
in the message, Reviewed-by / Approved-by / Divan-Revision / Divan-Version trailers;
DIVAN_GIT_PUSH=1 pushes. The commit id is kept with the revision.
- Privacy fix: published files and commits carry public names (profile name, else 'موڈریٹر <id>'),
never email addresses (divan-data is public).
- Poem pages: 'دیوان کا ورژن …' with who edited, reviewed and published, the date, and a link to
the commit diff (DIVAN_DATA_COMMIT_URL).
- deploy/sync.sh: pull --rebase so publishing commits are kept.
- Admins are super moderators (documented).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- revisions (a work's Divan text, summary, status, author/reviewer/publisher, the text it started from)
and revision_events (who did what, with comments): the review thread and the moderation log.
- API (api/src/moderation.ts): what a moderator may do on a work, queue, drafts (one open draft per
person and work), save, submit, approve, return/reject (reason required), publish; history; log.
Rules come from the IAM grants: L2 drafts, an L1 covering the work reviews, an admin publishes; L1
drafts go to the admin, admin drafts publish directly. Publishing numbers the version, writes it
to divan-data (owned.ts) and updates the site; a draft based on an older version is refused (409).
- Line diff (api/src/diff.ts) against the text a draft started from.
- Site: ترمیم کریں / تاریخچہ on works, /mod (queue, activity log), /mod/rev/<id> (editor with the Urdu
keyboard and Roman typing, diff, preview, actions, timeline), /mod/work/<id> (versions).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- api/src/owned.ts: fromPoem (a work as Divan text, the start of an edit) and writeOwned (the .dtx
source and the generated .json into divan-data/divan/); a CLI for writing one by hand.
- Divan text: chapter headings and sub-headings with levels, as their own verse entries.
- All 11,087 works convert to Divan text and back unchanged (apart from repeated spaces, and raw
'== … ==' markers in prose becoming headings).
- docs/content-model.md: the content management model (what is identified, versions and who did
what (#51), tags and tag search (#52), storage).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Results in groups: شعرا و ادبا (by name or pen name, with years, work counts and a 'search in their
works' link), کتابیں اور ابواب (books/chapters by title), and کلام (content).
- Content pages: numbered pagination (first, last, two either side, gaps) and 'نتائج ۴۱–۶۰ از ۸۱۱۶'.
- Author filter: chips for the authors the results come from, with counts; tick one or several to
narrow; a name box finds any other poet/writer, with the Urdu keyboard and Roman-to-Urdu typing.
The keyboard and Roman typing now work on any input marked data-urdu, not only the search box.
- API: poet=1,2 (several), authors with counts, poets and books on page 1 (api/src/search.ts).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner request. Saved state: filled accent-coloured glyph, bold accent text and border, light accent
tint; the label follows the state on load and on click. The selection menu's phrase option and the
couplet bookmark's label use the same words.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/content-model.md compares MediaWiki (+FlaggedRevs/Approved Revs, ProofreadPage, SMW, Wikibase),
Wiki.js, BookStack, Outline, Docmost, DokuWiki, wikiparser-node, Tiptap/ProseMirror/CodeMirror, TEI P5
and Ganjoor's correction model, and recommends: Divan text (a Wikisource-compatible markup subset)
as the published source in divan-data, one file per work; moderation workflow in PostgreSQL; Tiptap
editor with a source view; wikiparser-node for Wikisource sync; TEI export.
Prototype api/src/divantext.ts (parse, verse JSON, TEI) with tests on a real Ghalib ghazal and Sir
Syed chapter: identical verses to today's export, Wikisource markup reads as-is, TEI validates.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner reference: a Flaticon bookmark pack (similar, not the same). Drawn here, so no third-party
licence or attribution; grey outline when not set, filled brand colour when set.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>