19 lines
712 B
JavaScript
19 lines
712 B
JavaScript
import fs from "fs";
|
|
import path from "path";
|
|
|
|
import { parseLigationData } from "../../export-data/ligation-data.mjs";
|
|
import { MdCol } from "../md-format-tools.mjs";
|
|
|
|
export default async function processLigSetPreDef(dirs) {
|
|
const ligData = await parseLigationData();
|
|
const md = new MdCol("Section-Predefined-Ligation-Sets");
|
|
const headerPath = path.resolve(dirs.fragments, "description-predefined-ligation-sets.md");
|
|
md.log(await fs.promises.readFile(headerPath, "utf-8"));
|
|
for (const gr in ligData.rawSets) {
|
|
const readmeDesc =
|
|
ligData.rawSets[gr].readmeDesc ||
|
|
`Default ligation set would be assigned to ${ligData.rawSets[gr].desc}`;
|
|
md.log(` - \`${gr}\`: ${readmeDesc}.`);
|
|
}
|
|
return md;
|
|
}
|