Skip to content

Commit

Permalink
Analyze script: More helpful messages
Browse files Browse the repository at this point in the history
  • Loading branch information
th-we authored and rettinghaus committed Jun 8, 2020
1 parent da8318b commit ddef818
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/analyze.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function reportIssue(filePath, lineIndex, line, message) {


function analyzeUsage(methods, attributes) {
console.log('Analyze libmei and attribute usage...');
for (const fileName of fs.readdirSync(directories.src)) {
const filePath = path.join(directories.src, fileName);
const lines = fs.readFileSync(filePath, {encoding: 'utf8'}).split("\n");
Expand Down Expand Up @@ -68,6 +69,7 @@ function analyzeUsage(methods, attributes) {
}
}
}
console.log('Done');
}


Expand All @@ -93,6 +95,8 @@ while (match = globalVarRegex.exec(libmeiCode)) {

https.get(schemaUrl, (res) => {
let data = '';
console.log('Downloading MEI schema...')

res.on('data', (chunk) => {
data += chunk;
});
Expand All @@ -107,6 +111,7 @@ https.get(schemaUrl, (res) => {
throw e;
}

console.log('Extracting attribute definitions...');
// TODO: Use saxes right away instead of creating a DOM first and running
// XPath on it. This is really slow.
const attributeNames = xpath.evaluateXPath(`
Expand Down

0 comments on commit ddef818

Please sign in to comment.