Skip to content

Commit

Permalink
Update logref.js
Browse files Browse the repository at this point in the history
  • Loading branch information
shysolocup authored Sep 26, 2024
1 parent e7f2f94 commit c5b9fd8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/logs/scripts/logref.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,10 @@ groups.forEach((group, gi) => {

versionnames.forEach((vn, i) => {
if (group.includes(vn)) {
if (!versions[vn]) versions[vn] = [];
if (!versions[vn]) versions[vn] = { header: `### [${group}](${treelink}) (#${gi})`, content: [] };
v = versions[vn];
}
});

v.push(`### [${group}](${treelink}) (#${gi})`);

logs.forEach((log, li) => {
let logbloblink = `${bloblink}/${ log.split(" ").join("%20") }`;
Expand All @@ -108,14 +106,16 @@ groups.forEach((group, gi) => {
name = log.replace(".md", "");
};

v.push(`${li+1}. ${name} [(${ log })](${ logbloblink }) `)
v.content.push(`${li+1}. ${name} [(${ log })](${ logbloblink }) `)
});
});

versionnames.forEach((vn, i) => {
if (versions[vn]) {
let v = versions[vn].sort();
let v = versions[vn].content.sort();
v = (config.reverseSort) ? v.reverse() : v;

v.unshift(versions[vn].header);

content = content.concat(v);
}
Expand All @@ -124,7 +124,7 @@ versionnames.forEach((vn, i) => {
content = content.join("\n\n");


fs.writeFileSync(logrefdir, content)
fs.writeFileSync(logrefdir, content);


console.log(fs.readFileSync(logrefdir, 'utf8'));
Expand Down

0 comments on commit c5b9fd8

Please sign in to comment.