1mod abc;
6mod music_xml;
7
8pub use crate::{abc::tunebook_to_open_lyrics, music_xml::music_xml_to_open_lyrics};
9use openlyrics::types::{Lines, VerseContent};
10
11fn lines_to_open_lyrics(verse_lyrics: Vec<String>) -> Lines {
12 let mut contents = Vec::new();
13 for line in verse_lyrics {
14 if line.is_empty() {
15 continue;
16 }
17 if !contents.is_empty() {
18 contents.push(VerseContent::Br);
19 }
20 contents.push(VerseContent::Text(line));
21 }
22 Lines {
23 contents,
24 ..Default::default()
25 }
26}