zionworx¶
The zionworx
module provides the functionality for importing ZionWorx songs into the OpenLP database.
-
class
openlp.plugins.songs.lib.importers.zionworx.
ZionWorxImport
(manager, **kwargs)[source]¶ Bases:
openlp.plugins.songs.lib.importers.songimport.SongImport
The
ZionWorxImport
class provides the ability to import songs from ZionWorx, via a dump of the ZionWorx database to a CSV file.ZionWorx song database fields:
SongNum
Song ID. (Discarded by importer)Title1
Main Title.Title2
Alternate Title.Lyrics
Song verses, separated by blank lines.Writer
Song author(s).Copyright
Copyright informationKeywords
(Discarded by importer)DefaultStyle
(Discarded by importer)
ZionWorx has no native export function; it uses the proprietary TurboDB database engine. The TurboDB vendor, dataWeb, provides tools which can export TurboDB tables to other formats, such as freeware console tool TurboDB Data Exchange which is available for Windows and Linux. This command exports the ZionWorx songs table to a CSV file:
tdbdatax MainTable.dat songstable.csv -fsdf -s, -qd
-f Table format:
sdf
denotes text file.-s Separator character between fields.
-q Quote character surrounding fields.
d
denotes double-quote.
CSV format expected by importer:
- Field separator character is comma
,
- Fields surrounded by double-quotes
"
. This enables fields (such as Lyrics) to include new-lines and commas. Double-quotes within a field are denoted by two double-quotes""
- Note: This is the default format of the Python
csv
module.