Move the package list generator to the README amender
This commit is contained in:
parent
50d765a3d5
commit
5eda6c18ef
17 changed files with 510 additions and 508 deletions
31
utility/amend-readme/sections/lig-set-ot.mjs
Normal file
31
utility/amend-readme/sections/lig-set-ot.mjs
Normal file
|
@ -0,0 +1,31 @@
|
|||
import { parseLigationData } from "../../export-data/ligation-data.mjs";
|
||||
import { ImgX, MdCol } from "../md-format-tools.mjs";
|
||||
|
||||
export default async function processLigSetOt(dirs, index, fn) {
|
||||
const ligData = await parseLigationData();
|
||||
const md = new MdCol(`Section-OT-Ligation-Tags-${index}`);
|
||||
md.log(`<table>`);
|
||||
for (const ls of ligData.sets) {
|
||||
if (!fn(ls)) continue;
|
||||
{
|
||||
md.log(`<tr>`);
|
||||
if (ls.tagName)
|
||||
md.log(`<td>${ls.tagName.map(x => `<code>${x}</code>`).join("; ")}</td>`);
|
||||
else md.log(`<td><code>${ls.tag} off</td>`);
|
||||
md.log(`<td>${ls.desc}</td>`);
|
||||
md.log(`</tr>`);
|
||||
}
|
||||
{
|
||||
const imageId = `${dirs.images}/ligset-${ls.tag}-${ls.rank}`;
|
||||
md.log(`<tr>`);
|
||||
md.log(`<td colspan="2">${ImgX(imageId)}</td>`);
|
||||
md.log(`</tr>`);
|
||||
}
|
||||
}
|
||||
md.log(`</table>`);
|
||||
return md;
|
||||
}
|
||||
|
||||
export function isLanguageSpecificLigTag(tag) {
|
||||
return tag !== "calt" && tag !== "dlig";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue