ChurchApps / FreeShow

FreeShow is a free and open-source, user-friendly presenter software.
https://freeshow.app
GNU General Public License v3.0
572 stars 87 forks source link

[Feature Request] Improve the Import of songs from OpenSong #885

Closed yurividal closed 1 month ago

yurividal commented 1 month ago

This is an example of a song in OpenSong database format:

<?xml version="1.0" encoding="utf-8"?>
<song xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <title>All glory and praise</title>
  <author>William P. Mackay, 1839-85</author>
  <copyright>Public Domain</copyright>
  <ccli>3254271</ccli>
  <presentation>T V1 C V2 C V3 C 0</presentation>
  <key />
  <key_line />
  <hymn_number>CH53</hymn_number>
  <lyrics>[T]
 Christian Hymns
 53
 |
 All glory and praise
[V1]
 All glory and praise
  To the Lamb that was slain,
 Who has borne all our sins
  And has cleansed every stain.
[C]
 Hallelujah! Thine the glory,
  Hallelujah! we sing;
 Hallelujah! Thine the glory,
  Our praise now we bring.
[V2]
 We praise Thee, O God,
  For Thy Spirit of light,
 Who has shown us our Saviour
  And scattered our night.
[V3]
 All glory and praise
  To the God of all grace,
 Who has bought us, and sought us,
  And shown us His face.
[0]
 “All glory and praise” 
 William P. Mackay, 1839-85
 </lyrics>
  <capo print="false" />
  <aka>Hallelujah Thine The Glory; Psalm 85:6; We Praise Thee; We Praise Thee O God</aka>
  <user1>Psalm 85:6</user1>
  <user2>Irregular</user2>
  <user3 />
  <theme></theme>
  <tempo />
  <time_sig />
  <linked_songs />
  <backgrounds resize="screen" keep_aspect="false" link="false" background_as_text="false" />
</song>

In order to improve the import from OpenSong, the following changes are needed:

Also, please note that OpenSong is quite flexible with the slide group names. You may have songs where you have V1 and V1b, and as long as its in the order, it will be pulled in the right place.

yurividal commented 1 month ago

@vassbo This is almost 100% complete. The only missing tag seems to be ||

While | means skip a line, || means start a new slide (split the verse into 2 slides).

Currenty, this seems to be the only thing not importing correctly on my test songs.

image

<?xml version="1.0" encoding="utf-8"?>
<song xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <title>A debtor to mercy alone</title>
  <author>Augustus Montague Toplady, 1740-78</author>
  <copyright>Public Domain</copyright>
  <ccli>3291117</ccli>
  <presentation>T V1 V2 V3 O</presentation>
  <key />
  <key_line />
  <hymn_number>CH566</hymn_number>
  <lyrics>[T]
 Christian Hymns
 566
 |
 A debtor to mercy alone
[V1]
 A debtor to mercy alone,
  Of covenant mercy I sing;
 Nor fear, with Thy righteousness on,
  My person and offering to bring;
 ||
 The terrors of law and of God
  With me can have nothing to do;
 My Saviour’s obedience and blood
  Hide all my transgressions from view.
[V2]
 The work which His goodness began,
  The arm of His strength will complete;
 His promise is Yea and Amen,
  And never was forfeited yet.
 ||
 Things future, nor things that are now,
  Not all things below nor above,
 Can make Him His purpose forgo,
  Or sever my soul from His love.
[V3]
 My name from the palms of His hands
  Eternity will not erase;
 Impressed on His heart it remains,
  In marks of indelible grace;
 ||
 Yes, I to the end shall endure,
  As sure as the earnest is given;
 More happy, but not more secure,
  The glorified spirits in heaven.
[O]
 “A debtor to mercy alone” 
 Augustus Montague Toplady, 1740-78
 CCLI License No. XXXXXX</lyrics>
  <capo print="false" />
  <aka />
  <user1 />
  <user2>8 8. 8 8. D</user2>
  <user3 />
  <theme>Christian: Assurance/Hope; </theme>
  <tempo />
  <time_sig />
  <linked_songs />
  <backgrounds resize="screen" keep_aspect="false" link="false" background_as_text="false" />
</song>

Opensong's documentation can be found here

yurividal commented 1 month ago

I suspect implementing this might be just a bit more tricky, since it will split a single "Verse" into 2 slides, which will probably break the automatic ordering of elements based on the presentation tag. Perhaps the "Groups" logic will have to be slightly altered

vassbo commented 1 month ago

Just implemented it. It was quite easy as a group in FreeShow already can have many child slides!

yurividal commented 1 month ago

image

@vassbo Some metadata, for example "key" is still not being imported. Any ideas why?

vassbo commented 1 month ago

I never added that, but will do. Currently it's only adding title, author, copyright & ccli (+ hymn_number & aka)

yurividal commented 1 month ago

Got it, thanks. Also, where are you storing the < aka ?

vassbo commented 1 month ago

In the notes (at the right side)! (Will show up in the bottom as well)