Skip to content
Snippets Groups Projects
Commit f71216f1 authored by echicken's avatar echicken :chicken:
Browse files

Ingestion stuff

parent 84d9d801
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,7 @@ export async function extractData(): Promise<void> {
const scope = element.querySelector('caption > b > tt').innerHTML;
if (sections[scope] === undefined) {
const h2 = element.previousElementSibling;
const url = URL + '#' + (h2 !== null && h2.tagName === 'h2' ? h2.querySelector('a').getAttribute('name') : scope);
const url = '#' + (h2 !== null && h2.tagName === 'h2' ? h2.querySelector('a').getAttribute('name') : scope);
sections[scope] = {
url,
methods: {},
......@@ -141,7 +141,8 @@ export async function ingest(): Promise<void> {
console.debug(`\t\t\tWriting ${outFile}`);
await fs.writeFile(outFile, str);
console.debug(`\t\tIngesting text for ${scope}`);
await ingestText(str, jsobjs[scope].url);
const id = `${URL}${jsobjs[scope].url}`;
console.debug(`\t\tIngesting text for ${scope}, ID: ${id}`);
await ingestText(str, id);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment