Powersong to OpenLP

Edit (MrGamgee, 6 Jul 2012): OpenLP 1.9.10 now includes a PowerSong 1.0 importer.

I am wondering if anyone know how to convert a Powersong database to the OpenLP database? I have tried with OpenLp 2 and had no success.

PastorDannyMac

Try my open source utility, PowerSong Export. You can use it to convert your PowerSong database to OpenLyrics xml files, which you can then import into OpenLP 2.0 (File>Import>Song).

http://samfindlay.wordpress.com/powersong-export/

Any problems or suggestions, let me know.

Sam

Hey there, I am the author of PowerSong.

I really appreciate the fact that there is an effort underway to make PowerSong interoperable with OpenLP (via OpenLyrics).

I am interested in implementing export and import functions from both these systems into the next version of PowerSong, so I am wondering if someone can point me in the right direction (ie: file specs, website links etc)?

Much appreciated!

Nick

PS: If anyone is would like to know any technical information about how PowerSong stores files, then I would be very happy to help. Just email or PM me for assistance.

Hey Nick,

The OpenLyrics site has a bunch of details, you can find out more and join in the conversation there: http://www.openlyrics.info/

Hey Raoul, thanks very much for that!

I've implemented an export facility to export PowerSong 2.0 databases to OpenLyrics xml files and will upload a new alpha release to the PowerSong website in a few days. It will now be feasible to convert PowerSong 1.0 databases to OpenLyrics by converting the PowerSong 1.0 database to a PowerSong 2.0 database first.

Hi Nick

As you would have seen above, a few months ago I hacked together a script to convert PowerSong 1.0 to OpenLyrics.

Since it's a better experience for our users to be able to import directly into OpenLP, I've just the last few days been writing an OpenLP import class for PowerSong songs. You can see my code here:

http://bazaar.launchpad.net/~sfindlay/openlp/songs-import-powersong/view/head:/openlp/plugins/songs/lib/powersongimport.py

At the moment, this import class only deals with PowerSong 1.0. If you're able to give me a link to info on the PowerSong 2.0 db format, I'll investigate implementing that in our importer too.

Cheers
Sam
gmail: samuel.findlay

Hey Sam,

I have looked at the source code you supplied for the PowerSong 1.0 import and can verify that you have understood the main principles of key-value pairs (provided your assumptions about how .net stores strings is correct - even I don't know!). The file format was designed to be extensible, so that extra fields are possible (ie: imagine it incorporating a DEFAULTSTYLE field). I don't think I got around to implementing any extra fields in future versions.

There is currently no document on the PowerSong 2.0 file format, but I have commented the C# classes that work with it. Feel free to browse around at http://powersong.codeplex.com/SourceControl/changeset/view/62fcfcd6f0b2 (current code).

I would be happy to answer any questions about the file format if you can't find the answers directly in the code. The basic principle is that new or edited items get written to the end of the file, much like a "tape", which gets occassionally "compressed" to remove duplicate entries.

Am I correct in assuming that OpenLP natively uses a SQLite database to store songs? I would like to write an import from OpenLP as well.

 

Hi Nick,

Yes the OpenLP song database is SQLite 3. 

The source code which describes the format is: http://bazaar.launchpad.net/~openlp-core/openlp/trunk/view/head:/openlp/plugins/songs/lib/db.py

Or you can just select one of the sample databases when installing OpenLP, and use a sqlite utility to look at: %appdata%\openlp\data\songs\songs.sqlite

Hi Nick

Thanks for having a look, I appreciate it. For that version of the code, I actually reverse-engineered the format manually with help from some others here. Since then I've found the spec for System.IO.BinaryReader.Read7BitEncodedInt on MSDN, and implemented that method in python. 

Thanks for the 2.0 info. I've had a chat with a couple of our devs on IRC, and we've decided that since we're keen to support the adoption of OpenLyrics, and as you've already implemented that for your v2.0, we won't implement a direct import for PowerSong 2.0.

As for PowerSong importing OpenLP directly, of course feel free, but I think OpenLyrics probably fulfills much the same goal. It's probably also more stable, since the OpenLP db format may be subject to change at times...

Sam

 

 

Hey Sam,

Thanks once again.

I took the liberty of describing PowerSong's 2.0 based file format anyway, because it needed to be done at some point.

If you're interested, a PDF is available here: http://www.nick-hill.com/powersong/Developers.php

Nick