Song Collection - AttiliaTheHun/Songbook-Manager GitHub Wiki

Song Collection

The songbook is defined as a collection of songs. Each song is stored in a separate HTML file and on the top of that each song has a record in the database.

Song Record

A song record consists of the following fields:

name

name is a string of text. It is not required but blank names can lead to a lot of confusion.

id

id is an integer. It is required but in the Standard Collection the Collection Manager deals with song ids internally and the user can affect them only by manually changing the record in collection.json and renaming the corresponding .html file. This action is not recommended for it can easily break the songbook.

url

url is a string of text representing a web address. It is intended for a youtube video of performance of the given song. This url can then be opened from the Main Window by utilising the keyboard shortcut CTLR + O. This property is not required and defaults to an empty string.

active

active is a boolean (true/false). When a song is marked as not active (active is on false), it will not be displayed in the WebView or included into the export file. It is a required property which defaults to true;

It is recommended to deactivate songs instead of deleting them, because you may later reactivate them by clicking a single button, compared to the effort of creating the song all over again.

System songs

There are some special songs that are not actually part of the songbook. They do not have conventional ids, but they can still be navigated to. For the Frontpage song (it is regarded as a song by the program) the id is frontpage. For a page of the songlist the id is songlist followed by its number, for example songlist0 is the id of the first songlist part.

Collection Editor

Collection Editor is a window you can open through the Edit button in the menu of the Main Window. It is located under the label Collection.

From the Collection Editor you can manage your songs. You can edit their records or delete them and of course you can add new songs. image

Here you can manage the collection using the toolbar on the bottom. In the listview, you can scroll through the songs and select a song by clicking on it.

The n is simply the index in the collection when sorted alphabetically. The name is the name in the song database, it may differ from the title of the song HTML file. The id is the songs's unique identifier in the collection. It corresponds to the filename of the song. The url holds the associated link. The active checkbox shows whether the song is currently being displayed in the collection or it has been deactivated.

The Edit Song Record button lets you change the information about the song that is in the song database.

The Edit Song HTML button will open a code editor window for you where you can format the song.

The Navigate to Song button will show you the page with the song in the main window. It works only if the song collection is the same as the active collection.

The Preview PDF button will create and open a PDF file of the song. It will be oriented as portrait A4 page.

The Delete Song button deletes the song from the collection and also deletes the song's source file. Use Shift + Delete to skip the confirmation dialog.

The Add New Song button will add a new song to the collection.