forked from openlp/openlp
Formatting
This commit is contained in:
parent
cc90096534
commit
c219665e1c
@ -163,11 +163,11 @@ class SongImportForm(OpenLPWizard):
|
||||
self.sourcePage.setSubTitle(WizardStrings.ImportSelectLong)
|
||||
self.formatLabel.setText(WizardStrings.FormatLabel)
|
||||
for format in SongFormat.get_format_list():
|
||||
format_name, custom_combo_text, description_text, select_mode = SongFormat.get(
|
||||
format, SongFormat.Name, SongFormat.ComboBoxText, SongFormat.DescriptionText,
|
||||
SongFormat.SelectMode)
|
||||
combo_box_text = custom_combo_text if custom_combo_text \
|
||||
else format_name
|
||||
format_name, custom_combo_text, description_text, select_mode = \
|
||||
SongFormat.get(format, SongFormat.Name, SongFormat.ComboBoxText,
|
||||
SongFormat.DescriptionText, SongFormat.SelectMode)
|
||||
combo_box_text = (custom_combo_text if custom_combo_text else
|
||||
format_name)
|
||||
self.formatComboBox.setItemText(format, combo_box_text)
|
||||
if description_text is not None:
|
||||
self.formatWidgets[format][u'descriptionLabel'].setText(
|
||||
@ -249,8 +249,8 @@ class SongImportForm(OpenLPWizard):
|
||||
else:
|
||||
import_source = \
|
||||
self.formatWidgets[format][u'filepathEdit'].text()
|
||||
error_title = UiStrings().IFSs if select_mode == \
|
||||
SongFormatSelect.SingleFile else UiStrings().IFdSs
|
||||
error_title = (UiStrings().IFSs if select_mode ==
|
||||
SongFormatSelect.SingleFile else UiStrings().IFdSs)
|
||||
focus_button = self.formatWidgets[format][u'browseButton']
|
||||
if not class_.isValidSource(import_source):
|
||||
critical_error_message_box(error_title, error_msg)
|
||||
|
@ -299,8 +299,8 @@ class SongFormat(object):
|
||||
ComboBoxText: translate('SongsPlugin.ImportWizardForm',
|
||||
'ZionWorx (CSV)'),
|
||||
DescriptionText: translate('SongsPlugin.ImportWizardForm',
|
||||
'First dump your ZionWorx database to a CSV file, using '
|
||||
'freeware tool "TurboDB Data Exchange" (TdbDataX) from dataWeb '
|
||||
'First dump your ZionWorx database to a CSV text file, using '
|
||||
'freeware tool TdbDataX "TurboDB Data Exchange" from dataWeb '
|
||||
'(see the User Manual).')
|
||||
# },
|
||||
# CSV: {
|
||||
|
@ -43,14 +43,14 @@ class ZionWorxImport(SongImport):
|
||||
|
||||
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 information
|
||||
* ``Keywords`` Discarded by importer.
|
||||
* ``DefaultStyle`` Discarded by importer.
|
||||
* ``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 information
|
||||
* ``Keywords`` (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
|
||||
@ -60,17 +60,17 @@ class ZionWorxImport(SongImport):
|
||||
|
||||
``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.
|
||||
* -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:
|
||||
|
||||
* Fields separated by 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.
|
||||
* 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.
|
||||
|
||||
"""
|
||||
def doImport(self):
|
||||
|
Loading…
Reference in New Issue
Block a user