From 9bd657f139779e2bb37d0bda66cd1cfeb33670db Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Thu, 5 Dec 2024 22:40:21 -0600 Subject: [PATCH] songs are nearly working entirely Still needs audio and text_alignment, but it's nearly finished, then we can find a way to load an entire presentation at once and then track the changes to the presentation, and load songs from the files --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- src/core/songs.rs | 3 ++- test_song.lisp | 24 ++++++++++++++++-------- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index db0ed9c..0c06f46 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1250,8 +1250,8 @@ dependencies = [ [[package]] name = "crisp" -version = "0.1.1" -source = "git+https://git.tfcconnection.org/chris/crisp#fa078e8d3fa9c0916f5da950eee896d4fa67a4eb" +version = "0.1.3" +source = "git+https://git.tfcconnection.org/chris/crisp#4e7e050bf6cb72f1112f18e4f2f55f1394688d4b" dependencies = [ "lazy_static", "miette", diff --git a/Cargo.toml b/Cargo.toml index a64b5f9..38e8a01 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,5 +23,5 @@ ron = "0.8.1" sqlx = { version = "0.8.2", features = ["sqlite"] } dirs = "5.0.1" tokio = "1.41.1" -crisp = { git = "https://git.tfcconnection.org/chris/crisp", version = "0.1.1" } +crisp = { git = "https://git.tfcconnection.org/chris/crisp", version = "0.1.3" } diff --git a/src/core/songs.rs b/src/core/songs.rs index 4c62f79..773d41a 100644 --- a/src/core/songs.rs +++ b/src/core/songs.rs @@ -591,6 +591,7 @@ You saved my soul" pub fn test_lisp_conversion() { let value = test_lisp_song(); let song = Song::from(value); - assert!(false, "{:?}", song); + let test_song = test_song(); + assert_eq!(test_song, song); } } diff --git a/test_song.lisp b/test_song.lisp index d99e1ba..ab2c051 100644 --- a/test_song.lisp +++ b/test_song.lisp @@ -1,8 +1,16 @@ -(song :author "Jordan Feliz" :ccli 97987 - :font "Quicksand" :font-size 80 - :title "The River" - :background (image :source "~/pics/wallpapers/nixorange.jpeg" :fit cover) - :verse-order (v1 c1 v2 c1) - (v1 "I'm going down to the river") - (c1 "Down to the river") - (v2 "Down to the river to pray ay ay!")) +(song :id 7 :author "North Point Worship" + :font "Quicksand Bold" :font-size 60 + :title "Death Was Arrested" + :background (image :source "file:///home/chris/nc/tfc/openlp/CMG - Bright Mountains 01.jpg" :fit cover) + :text-alignment center + :audio "file:///home/chris/music/North Point InsideOut/Nothing Ordinary, Pt. 1 (Live)/05 Death Was Arrested (feat. Seth Condrey).mp3" + :verse-order (i1 v1 v2 c1 v3 c1 v4 c1 b1 b1 e1 e2) + (i1 "Death Was Arrested\nNorth Point Worship") + (c1 "Oh, Your grace so free,\nWashes over me\n\nYou have made me new,\nNow life begins with You\n\nIt's Your endless love,\nPouring down on us\n\nYou have made us new,\nNow life begins with You") + (b1 "Oh, we're free, free,\nForever we're free\n\nCome join the song\nOf all the redeemed\n\nYes, we're free, free,\nForever amen\n\nWhen death was arrested\nAnd my life began\n\nOh, we're free, free,\nForever we're free\n\nCome join the song\nOf all the redeemed\n\nYes, we're free, free,\nForever amen\n\nWhen death was arrested\nAnd my life began") + (e1 "When death was arrested\nAnd my life began\n\nThat's when death was arrested\nAnd my life began") + (e2 "") + (v1 "Alone in my sorrow\nAnd dead in my sin\n\nLost without hope\nWith no place to begin\n\nYour love made a way\nTo let mercy come in\n\nWhen death was arrested\nAnd my life began") + (v2 "Ash was redeemed\nOnly beauty remains\n\nMy orphan heart\nWas given a name\n\nMy mourning grew quiet,\nMy feet rose to dance\n\nWhen death was arrested\nAnd my life began") + (v3 "Released from my chains,\nI'm a prisoner no more\n\nMy shame was a ransom\nHe faithfully bore\n\nHe cancelled my debt and\nHe called me His friend\n\nWhen death was arrested\nAnd my life began") + (v4 "Our Savior displayed\nOn a criminal's cross\n\nDarkness rejoiced as though\nHeaven had lost\n\nBut then Jesus arose\nWith our freedom in hand\n\nThat's when death was arrested\nAnd my life began\n\nThat's when death was arrested\nAnd my life began"))