Formatting

This commit is contained in:
Samuel Findlay 2012-06-07 22:30:41 +10:00
parent cc90096534
commit c219665e1c
3 changed files with 25 additions and 25 deletions

View File

@ -163,11 +163,11 @@ class SongImportForm(OpenLPWizard):
self.sourcePage.setSubTitle(WizardStrings.ImportSelectLong) self.sourcePage.setSubTitle(WizardStrings.ImportSelectLong)
self.formatLabel.setText(WizardStrings.FormatLabel) self.formatLabel.setText(WizardStrings.FormatLabel)
for format in SongFormat.get_format_list(): for format in SongFormat.get_format_list():
format_name, custom_combo_text, description_text, select_mode = SongFormat.get( format_name, custom_combo_text, description_text, select_mode = \
format, SongFormat.Name, SongFormat.ComboBoxText, SongFormat.DescriptionText, SongFormat.get(format, SongFormat.Name, SongFormat.ComboBoxText,
SongFormat.SelectMode) SongFormat.DescriptionText, SongFormat.SelectMode)
combo_box_text = custom_combo_text if custom_combo_text \ combo_box_text = (custom_combo_text if custom_combo_text else
else format_name format_name)
self.formatComboBox.setItemText(format, combo_box_text) self.formatComboBox.setItemText(format, combo_box_text)
if description_text is not None: if description_text is not None:
self.formatWidgets[format][u'descriptionLabel'].setText( self.formatWidgets[format][u'descriptionLabel'].setText(
@ -249,8 +249,8 @@ class SongImportForm(OpenLPWizard):
else: else:
import_source = \ import_source = \
self.formatWidgets[format][u'filepathEdit'].text() self.formatWidgets[format][u'filepathEdit'].text()
error_title = UiStrings().IFSs if select_mode == \ error_title = (UiStrings().IFSs if select_mode ==
SongFormatSelect.SingleFile else UiStrings().IFdSs SongFormatSelect.SingleFile else UiStrings().IFdSs)
focus_button = self.formatWidgets[format][u'browseButton'] focus_button = self.formatWidgets[format][u'browseButton']
if not class_.isValidSource(import_source): if not class_.isValidSource(import_source):
critical_error_message_box(error_title, error_msg) critical_error_message_box(error_title, error_msg)

View File

@ -299,8 +299,8 @@ class SongFormat(object):
ComboBoxText: translate('SongsPlugin.ImportWizardForm', ComboBoxText: translate('SongsPlugin.ImportWizardForm',
'ZionWorx (CSV)'), 'ZionWorx (CSV)'),
DescriptionText: translate('SongsPlugin.ImportWizardForm', DescriptionText: translate('SongsPlugin.ImportWizardForm',
'First dump your ZionWorx database to a CSV file, using ' 'First dump your ZionWorx database to a CSV text file, using '
'freeware tool "TurboDB Data Exchange" (TdbDataX) from dataWeb ' 'freeware tool TdbDataX "TurboDB Data Exchange" from dataWeb '
'(see the User Manual).') '(see the User Manual).')
# }, # },
# CSV: { # CSV: {

View File

@ -43,14 +43,14 @@ class ZionWorxImport(SongImport):
ZionWorx song database fields: ZionWorx song database fields:
* ``SongNum`` Song ID. Discarded by importer. * ``SongNum`` Song ID. (Discarded by importer)
* ``Title1`` Main Title. * ``Title1`` Main Title.
* ``Title2`` Alternate Title. * ``Title2`` Alternate Title.
* ``Lyrics`` Song verses, separated by blank lines. * ``Lyrics`` Song verses, separated by blank lines.
* ``Writer`` Song author(s). * ``Writer`` Song author(s).
* ``Copyright`` Copyright information * ``Copyright`` Copyright information
* ``Keywords`` Discarded by importer. * ``Keywords`` (Discarded by importer)
* ``DefaultStyle`` Discarded by importer. * ``DefaultStyle`` (Discarded by importer)
ZionWorx has no native export function; it uses the proprietary TurboDB ZionWorx has no native export function; it uses the proprietary TurboDB
database engine. The TurboDB vendor, dataWeb, provides tools which can database engine. The TurboDB vendor, dataWeb, provides tools which can
@ -60,13 +60,13 @@ class ZionWorxImport(SongImport):
``tdbdatax MainTable.dat songstable.csv -fsdf -s, -qd`` ``tdbdatax MainTable.dat songstable.csv -fsdf -s, -qd``
* ``-f`` Table format: ``sdf`` denotes text file. * -f Table format: ``sdf`` denotes text file.
* ``-s`` Separator character between fields. * -s Separator character between fields.
* ``-q`` Quote character surrounding fields. ``d`` denotes double-quote. * -q Quote character surrounding fields. ``d`` denotes double-quote.
CSV format expected by importer: CSV format expected by importer:
* Fields separated by comma ``,`` * Field separator character is comma ``,``
* Fields surrounded by double-quotes ``"``. This enables fields (such as * Fields surrounded by double-quotes ``"``. This enables fields (such as
Lyrics) to include new-lines and commas. Double-quotes within a field Lyrics) to include new-lines and commas. Double-quotes within a field
are denoted by two double-quotes ``""`` are denoted by two double-quotes ``""``