From c1cf7c01a8cc5660a7d54c5182e3eeaa2f9ca58d Mon Sep 17 00:00:00 2001 From: Anas Rashid Date: Fri, 9 Oct 2026 18:10:51 +0200 Subject: [PATCH] =?UTF-8?q?Divan=20text:=20the=20source=20link=20field=20i?= =?UTF-8?q?s=20=D9=85=D8=A7=D8=AE=D8=B0=5F=D9=84=D9=86=DA=A9=20(was=20?= =?UTF-8?q?=D9=85=D8=A7=D8=AE=D8=B0=5F=D8=B1=D8=A8=D8=B7),=20in=20the=20co?= =?UTF-8?q?nverter,=20the=20editor's=20suggested=20fields,=20the=20guide?= =?UTF-8?q?=20and=20the=20examples?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- api/node_modules | 1 + api/src/owned.ts | 2 +- docs/content-model/ghalib-ghazal.dtx | 2 +- docs/content-model/sir-syed-azadi-e-rai.dtx | 2 +- web/node_modules | 1 + web/src/pages/mod/guide.astro | 2 +- web/src/pages/mod/rev/[id].astro | 2 +- 7 files changed, 7 insertions(+), 5 deletions(-) create mode 120000 api/node_modules create mode 120000 web/node_modules diff --git a/api/node_modules b/api/node_modules new file mode 120000 index 00000000..1ee83cb3 --- /dev/null +++ b/api/node_modules @@ -0,0 +1 @@ +/Users/anasrashid/divan/api/node_modules \ No newline at end of file diff --git a/api/src/owned.ts b/api/src/owned.ts index d13816e7..277368ae 100644 --- a/api/src/owned.ts +++ b/api/src/owned.ts @@ -13,7 +13,7 @@ type Verse = { Position: string; Text: string; CoupletIndex: number }; // a work (ganjoor-data poem JSON) as Divan text: verse in (blank line between couplets, stanzas and // lines), prose as paragraphs export function fromPoem(poem: { Title: string; Verses: Verse[]; SourceUrl?: string }, meta: Record = {}) { - const head = Object.entries({ عنوان: poem.Title, ...meta, ...(poem.SourceUrl && { ماخذ: 'ویکی ماخذ', ماخذ_ربط: poem.SourceUrl }) }) + const head = Object.entries({ عنوان: poem.Title, ...meta, ...(poem.SourceUrl && { ماخذ: 'ویکی ماخذ', ماخذ_لنک: poem.SourceUrl }) }) .map(([k, v]) => `| ${k} = ${v}`).join('\n'); const units = new Map(); for (const v of poem.Verses) (units.get(v.CoupletIndex) ?? units.set(v.CoupletIndex, []).get(v.CoupletIndex)!).push(v); diff --git a/docs/content-model/ghalib-ghazal.dtx b/docs/content-model/ghalib-ghazal.dtx index 9052f5f7..daffad67 100644 --- a/docs/content-model/ghalib-ghazal.dtx +++ b/docs/content-model/ghalib-ghazal.dtx @@ -4,7 +4,7 @@ | صنف = غزل | ردیف = ہوتا | ماخذ = ویکی ماخذ -| ماخذ_ربط = https://ur.wikisource.org/wiki/%DB%8C%DB%81_%D9%86%DB%81_%D8%AA%DA%BE%DB%8C_%DB%81%D9%85%D8%A7%D8%B1%DB%8C_%D9%82%D8%B3%D9%85%D8%AA_%DA%A9%DB%81_%D9%88%D8%B5%D8%A7%D9%84_%DB%8C%D8%A7%D8%B1_%DB%81%D9%88%D8%AA%D8%A7 +| ماخذ_لنک = https://ur.wikisource.org/wiki/%DB%8C%DB%81_%D9%86%DB%81_%D8%AA%DA%BE%DB%8C_%DB%81%D9%85%D8%A7%D8%B1%DB%8C_%D9%82%D8%B3%D9%85%D8%AA_%DA%A9%DB%81_%D9%88%D8%B5%D8%A7%D9%84_%DB%8C%D8%A7%D8%B1_%DB%81%D9%88%D8%AA%D8%A7 }} {{مطلع}} یہ نہ تھی ہماری قسمت کہ [[وصال]] یار ہوتا diff --git a/docs/content-model/sir-syed-azadi-e-rai.dtx b/docs/content-model/sir-syed-azadi-e-rai.dtx index 461875a8..a0b43f16 100644 --- a/docs/content-model/sir-syed-azadi-e-rai.dtx +++ b/docs/content-model/sir-syed-azadi-e-rai.dtx @@ -3,7 +3,7 @@ | مصنف = سید احمد خان | صنف = مضمون | ماخذ = ویکی ماخذ -| ماخذ_ربط = https://ur.wikisource.org/wiki/%D8%A2%D8%B2%D8%A7%D8%AF%DB%8C_%D8%B1%D8%A7%D8%A6%DB%92 +| ماخذ_لنک = https://ur.wikisource.org/wiki/%D8%A2%D8%B2%D8%A7%D8%AF%DB%8C_%D8%B1%D8%A7%D8%A6%DB%92 }} == آزادی رائے == diff --git a/web/node_modules b/web/node_modules new file mode 120000 index 00000000..0fd07bfe --- /dev/null +++ b/web/node_modules @@ -0,0 +1 @@ +/Users/anasrashid/divan/web/node_modules \ No newline at end of file diff --git a/web/src/pages/mod/guide.astro b/web/src/pages/mod/guide.astro index d84926d4..aeb3853b 100644 --- a/web/src/pages/mod/guide.astro +++ b/web/src/pages/mod/guide.astro @@ -13,7 +13,7 @@ const ex = { | ردیف = یاد ہے | قافیہ = بہانا، زمانا | ماخذ = ویکی ماخذ -| ماخذ_ربط = https://ur.wikisource.org/… +| ماخذ_لنک = https://ur.wikisource.org/… }}`, ghazal: ` چپکے چپکے رات دن آنسو بہانا یاد ہے diff --git a/web/src/pages/mod/rev/[id].astro b/web/src/pages/mod/rev/[id].astro index 19f24ae8..0c2aa759 100644 --- a/web/src/pages/mod/rev/[id].astro +++ b/web/src/pages/mod/rev/[id].astro @@ -270,7 +270,7 @@ import Icon from '../../../components/Icon.astro'; if (host && source) { const { editor, meta } = createEditor(host, source.value); const rows = document.getElementById('meta-rows')!; - const KNOWN = ['عنوان', 'شاعر', 'مصنف', 'صنف', 'ردیف', 'قافیہ', 'بحر', 'ماخذ', 'ماخذ_ربط']; + const KNOWN = ['عنوان', 'شاعر', 'مصنف', 'صنف', 'ردیف', 'قافیہ', 'بحر', 'ماخذ', 'ماخذ_لنک']; const row = (k = '', v = '') => { const r = document.createElement('div'); r.className = 'meta-row'; r.innerHTML = '';