1.0.0 • Published 12 months ago
@trytocreate/lmlrc v1.0.0
LMLRC
A lyric parser for LMusic.
How to use?
Browser
Copy all files from the dist branch into your web application directory.
Or use CDN to obtain files.
jsDelivr: https://cdn.jsdelivr.net/npm/@trytocreate/lmlrc@latest/dist/index.min.js
Skypack: https://cdn.skypack.dev/@trytocreate/lmlrc@latest?min
Statically: https://cdn.statically.io/gh/Try-To-Create/lmlrc/dist/index.js
JSDMirror: https://cdn.jsdmirror.com/npm/@trytocreate/lmlrc@latest/dist/index.min.js
Include index.js with a script module tag.
<script type="module" src="https://unpkg.com/@trytocreate/lmlrc@latest"></script>
And Obtain it from the window.
const { LMLRC } = window
Or import it into your module.
import LMLRC from 'https://unpkg.com/@trytocreate/lmlrc@latest'
Read LMLRC format (Other formats are similar) lyric text to obtain lyric info.
const { LMLRCParser } = LMLRC
const text = await fetch('磨瀬_初音未来 (初音ミク) - icicles.lmlrc').then((response) => response.text())
const parser = new LMLRCParser({ text })
console.log('Lyric info:\n', parser.read())
See example for browser for more.
1.0.0
12 months ago