mirror of
https://github.com/kennethreitz/rhymepad.org.git
synced 2026-06-11 17:08:33 +00:00
Add per-line meter detection
CMU stress markers -> stress string per line, scored against the classical feet (iamb, trochee, anapest, dactyl, amphibrach) with flexible monosyllables. Syllable count + best-fit meter shown in the toolbar readout for the caret line. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+6
-2
@@ -414,9 +414,13 @@ function buildReadout(){
|
||||
schemeReadout.innerHTML = '<span class="offline">backend offline — run: uv run uvicorn app:app</span>';
|
||||
return;
|
||||
}
|
||||
const parts = [];
|
||||
const ln = caretLine();
|
||||
const m = analysis && analysis.meter ? analysis.meter.find(x=>x.l===ln) : null;
|
||||
if(m) parts.push(`${m.syl} syl` + (m.label ? ` · ${m.label}` : ''));
|
||||
const st = caretStanza();
|
||||
if(!st || !st.scheme){ schemeReadout.innerHTML = ''; return; }
|
||||
schemeReadout.innerHTML = `stanza scheme <b>${st.scheme.toUpperCase().split('').join(' ')}</b>`;
|
||||
if(st && st.scheme) parts.push(`scheme <b>${st.scheme.toUpperCase().split('').join(' ')}</b>`);
|
||||
schemeReadout.innerHTML = parts.join(' ');
|
||||
}
|
||||
|
||||
function buildLegend(){
|
||||
|
||||
Reference in New Issue
Block a user