Changeset 158


Ignore:
Timestamp:
Jun 12, 2023, 12:07:42 AM (11 months ago)
Author:
chronos
Message:
  • Added: File menu action Export to export vCard data into CSV, XML, MediaWiki, Excel paste, and HTML.
Location:
trunk
Files:
4 added
29 edited

Legend:

Unmodified
Added
Removed
  • trunk/Core.lfm

    r152 r158  
    300300      Caption = 'Normalize'
    301301      OnExecute = ANormalizeExecute
     302    end
     303    object AFileExport: TAction
     304      Category = 'File'
     305      Caption = 'Export...'
     306      OnExecute = AFileExportExecute
    302307    end
    303308  end
  • trunk/Core.lrj

    r152 r158  
    2020{"hash":78724163,"name":"tcore.aremoveexactduplicates.caption","sourcebytes":[82,101,109,111,118,101,32,101,120,97,99,116,32,100,117,112,108,105,99,97,116,101,115],"value":"Remove exact duplicates"},
    2121{"hash":154699365,"name":"tcore.anormalize.caption","sourcebytes":[78,111,114,109,97,108,105,122,101],"value":"Normalize"},
     22{"hash":124337662,"name":"tcore.afileexport.caption","sourcebytes":[69,120,112,111,114,116,46,46,46],"value":"Export..."},
    2223{"hash":218146437,"name":"tcore.opendialog1.title","sourcebytes":[79,112,101,110,32,101,120,105,115,116,105,110,103,32,102,105,108,101],"value":"Open existing file"},
    2324{"hash":159035875,"name":"tcore.savedialog1.title","sourcebytes":[83,97,118,101,32,102,105,108,101,32,97,115],"value":"Save file as"},
  • trunk/Core.pas

    r155 r158  
    1616    AAbout: TAction;
    1717    AboutDialog1: TAboutDialog;
     18    AFileExport: TAction;
    1819    ANormalize: TAction;
    1920    ARemoveExactDuplicates: TAction;
     
    5051    procedure AFileCombineExecute(Sender: TObject);
    5152    procedure AFileCompareExecute(Sender: TObject);
     53    procedure AFileExportExecute(Sender: TObject);
    5254    procedure AFileNewExecute(Sender: TObject);
    5355    procedure AFileOpenExecute(Sender: TObject);
     
    130132uses
    131133  FormMain, FormSettings, FormFindDuplicity, FormCompare, TestCase, FormNormalize,
    132   FormGenerate, FormError, FormFind, FormTest, FormSource, TestCases;
     134  FormGenerate, FormError, FormFind, FormTest, FormSource, TestCases, FormExport;
    133135
    134136resourcestring
     
    196198  finally
    197199    FreeAndNil(FormCompare);
     200  end;
     201end;
     202
     203procedure TCore.AFileExportExecute(Sender: TObject);
     204var
     205  FormExport: TFormExport;
     206begin
     207  FormExport := TFormExport.Create(nil);
     208  try
     209    FormExport.ShowModal;
     210  finally
     211    FormExport.Free;
    198212  end;
    199213end;
  • trunk/Forms/FormCompare.lfm

    r154 r158  
    1414  LCLVersion = '2.2.6.0'
    1515  object ButtonCancel: TButton
    16     Left = 736
     16    Left = 600
    1717    Height = 38
    1818    Top = 400
     
    2424  end
    2525  object ButtonCompare: TButton
    26     Left = 600
     26    Left = 736
    2727    Height = 38
    2828    Top = 400
  • trunk/Forms/FormError.lfm

    r149 r158  
    1111  OnCreate = FormCreate
    1212  OnShow = FormShow
    13   LCLVersion = '2.0.12.0'
     13  LCLVersion = '2.2.6.0'
    1414  object MemoErrors: TMemo
    1515    Left = 8
  • trunk/Forms/FormFind.lfm

    r149 r158  
    1313  OnDestroy = FormDestroy
    1414  OnShow = FormShow
    15   LCLVersion = '2.2.0.4'
     15  LCLVersion = '2.2.6.0'
    1616  object Panel1: TPanel
    1717    Left = 0
     
    2727    object ComboBoxField: TComboBox
    2828      Left = 184
    29       Height = 41
     29      Height = 42
    3030      Top = 16
    3131      Width = 240
     
    4242      Width = 135
    4343      Caption = 'By contact field:'
     44      ParentColor = False
    4445      ParentFont = False
    4546    end
    4647    object EditValue: TEdit
    4748      Left = 440
    48       Height = 42
     49      Height = 43
    4950      Top = 16
    5051      Width = 208
     
    5556      Left = 664
    5657      Height = 38
    57       Top = 16
     58      Top = 19
    5859      Width = 113
    5960      Caption = 'Find'
  • trunk/Forms/FormMain.lfm

    r153 r158  
    156156        Action = Core.AFileCompare
    157157      end
     158      object MenuItem15: TMenuItem
     159        Action = Core.AFileExport
     160      end
    158161      object MenuItem2: TMenuItem
    159162        Caption = '-'
  • trunk/Forms/FormMain.pas

    r155 r158  
    2020    MenuItem13: TMenuItem;
    2121    MenuItem14: TMenuItem;
     22    MenuItem15: TMenuItem;
    2223    MenuItemColumns: TMenuItem;
    2324    MenuItem3: TMenuItem;
  • trunk/Forms/FormNormalize.lfm

    r155 r158  
    1414  object ScrollBox1: TScrollBox
    1515    Left = 8
    16     Height = 347
     16    Height = 336
    1717    Top = 8
    1818    Width = 743
    1919    HorzScrollBar.Page = 600
    20     VertScrollBar.Page = 209
     20    VertScrollBar.Page = 219
    2121    Anchors = [akTop, akLeft, akRight, akBottom]
    22     ClientHeight = 343
    23     ClientWidth = 739
     22    ClientHeight = 334
     23    ClientWidth = 741
    2424    TabOrder = 0
    2525    object CheckBoxRemovePhoneSpaces: TCheckBox
    2626      Left = 20
    27       Height = 29
     27      Height = 30
    2828      Top = 16
    29       Width = 303
     29      Width = 318
    3030      Caption = 'Remove spaces in phone numbers'
    3131      TabOrder = 0
     
    3333    object CheckBoxAddPhonePrefix: TCheckBox
    3434      Left = 20
    35       Height = 29
     35      Height = 30
    3636      Top = 55
    37       Width = 294
     37      Width = 306
    3838      Caption = 'Add default country phone prefix'
    3939      TabOrder = 1
     
    4141    object CheckBoxRemoveExactDuplicates: TCheckBox
    4242      Left = 20
    43       Height = 29
     43      Height = 30
    4444      Top = 96
    45       Width = 225
     45      Width = 236
    4646      Caption = 'Remove exact duplicates'
    4747      TabOrder = 2
     
    4949    object EditPhoneCountryCode: TEdit
    5050      Left = 480
    51       Height = 33
     51      Height = 43
    5252      Top = 55
    5353      Width = 120
     
    5656    object CheckBoxRemovePhotos: TCheckBox
    5757      Left = 20
    58       Height = 29
     58      Height = 30
    5959      Top = 136
    60       Width = 157
     60      Width = 158
    6161      Caption = 'Remove photos'
    6262      TabOrder = 4
     
    6464    object CheckBoxConvertInternationaCallPrefixToCountryCode: TCheckBox
    6565      Left = 20
    66       Height = 29
     66      Height = 30
    6767      Top = 176
    68       Width = 405
     68      Width = 429
    6969      Caption = 'Convert international call prefix to country code'
    7070      TabOrder = 5
     
    7272    object EditPhoneInternationalCallPrefix: TEdit
    7373      Left = 480
    74       Height = 33
     74      Height = 43
    7575      Top = 176
    7676      Width = 120
     
    7979  end
    8080  object ButtonCancel: TButton
    81     Left = 638
     81    Left = 504
    8282    Height = 38
    83     Top = 363
     83    Top = 360
    8484    Width = 113
    8585    Anchors = [akRight, akBottom]
     
    8989  end
    9090  object ButtonProcess: TButton
    91     Left = 502
     91    Left = 638
    9292    Height = 38
    93     Top = 363
     93    Top = 360
    9494    Width = 113
    9595    Anchors = [akRight, akBottom]
  • trunk/Forms/FormSettings.lfm

    r155 r158  
    2828  end
    2929  object ButtonCancel: TButton
    30     Left = 587
     30    Left = 600
    3131    Height = 37
    3232    Top = 560
     
    4444    Width = 845
    4545    HorzScrollBar.Page = 504
    46     VertScrollBar.Page = 457
     46    VertScrollBar.Page = 467
    4747    Anchors = [akTop, akLeft, akRight, akBottom]
    48     ClientHeight = 536
    49     ClientWidth = 841
     48    ClientHeight = 538
     49    ClientWidth = 843
    5050    TabOrder = 2
    5151    object Label1: TLabel
    5252      Left = 24
    53       Height = 25
     53      Height = 26
    5454      Top = 24
    55       Width = 81
     55      Width = 88
    5656      Caption = 'Language:'
    5757      ParentColor = False
     
    6060    object ComboBoxLanguage: TComboBox
    6161      Left = 240
    62       Height = 33
     62      Height = 42
    6363      Top = 16
    6464      Width = 264
    65       ItemHeight = 25
     65      ItemHeight = 0
    6666      ParentFont = False
    6767      Style = csDropDownList
     
    7070    object CheckBoxAutomaticDPI: TCheckBox
    7171      Left = 24
    72       Height = 29
     72      Height = 30
    7373      Top = 392
    74       Width = 145
     74      Width = 148
    7575      Caption = 'Automatic DPI'
    7676      OnChange = CheckBoxAutomaticDPIChange
     
    8181    object SpinEditDPI: TSpinEdit
    8282      Left = 241
    83       Height = 33
     83      Height = 43
    8484      Top = 424
    8585      Width = 145
     
    9393    object LabelDPI: TLabel
    9494      Left = 56
    95       Height = 25
     95      Height = 26
    9696      Top = 432
    97       Width = 32
     97      Width = 35
    9898      Caption = 'DPI:'
    9999      ParentColor = False
     
    103103    object CheckBoxReopenLastFileOnStart: TCheckBox
    104104      Left = 24
    105       Height = 29
     105      Height = 30
    106106      Top = 352
    107       Width = 217
     107      Width = 226
    108108      Caption = 'Reopen last file on start'
    109109      ParentFont = False
     
    112112    object Label2: TLabel
    113113      Left = 24
    114       Height = 25
     114      Height = 26
    115115      Top = 72
    116       Width = 57
     116      Width = 63
    117117      Caption = 'Theme:'
    118118      ParentColor = False
     
    121121    object ComboBoxTheme: TComboBox
    122122      Left = 240
    123       Height = 33
     123      Height = 42
    124124      Top = 64
    125125      Width = 264
    126       ItemHeight = 25
     126      ItemHeight = 0
    127127      ParentFont = False
    128128      Style = csDropDownList
     
    131131    object Label3: TLabel
    132132      Left = 24
    133       Height = 25
     133      Height = 26
    134134      Top = 120
    135       Width = 174
     135      Width = 186
    136136      Caption = 'Default vCard version:'
    137137      ParentColor = False
     
    139139    object EditDefaultVcardVersion: TEdit
    140140      Left = 240
    141       Height = 33
     141      Height = 43
    142142      Top = 112
    143143      Width = 144
     
    146146    object Label4: TLabel
    147147      Left = 24
    148       Height = 25
     148      Height = 26
    149149      Top = 165
    150       Width = 126
     150      Width = 133
    151151      Caption = 'Map query URL:'
    152152      ParentColor = False
     
    154154    object EditMapUrl: TEdit
    155155      Left = 240
    156       Height = 33
     156      Height = 43
    157157      Top = 160
    158       Width = 586
     158      Width = 588
    159159      Anchors = [akTop, akLeft, akRight]
    160160      TabOrder = 6
     
    162162    object Label5: TLabel
    163163      Left = 24
    164       Height = 25
     164      Height = 26
    165165      Top = 212
    166       Width = 114
     166      Width = 120
    167167      Caption = 'Compare tool:'
    168168      ParentColor = False
     
    170170    object EditCompareTool: TEdit
    171171      Left = 241
    172       Height = 33
     172      Height = 43
    173173      Top = 208
    174       Width = 462
     174      Width = 464
    175175      Anchors = [akTop, akLeft, akRight]
    176176      TabOrder = 7
    177177    end
    178178    object ButtonBrowse: TButton
    179       Left = 713
     179      Left = 715
    180180      Height = 38
    181181      Top = 206
     
    188188    object Label6: TLabel
    189189      Left = 24
    190       Height = 25
     190      Height = 26
    191191      Top = 264
    192       Width = 231
     192      Width = 248
    193193      Caption = 'Default phone country prefix:'
    194194      ParentColor = False
     
    196196    object EditDefaultPhoneCountryPrefix: TEdit
    197197      Left = 328
    198       Height = 33
     198      Height = 43
    199199      Top = 264
    200200      Width = 144
     
    203203    object Label7: TLabel
    204204      Left = 24
    205       Height = 25
     205      Height = 26
    206206      Top = 312
    207       Width = 243
     207      Width = 267
    208208      Caption = 'Default international call prefix:'
    209209      ParentColor = False
     
    211211    object EditDefaultInternationalCallPrefix: TEdit
    212212      Left = 328
    213       Height = 33
     213      Height = 43
    214214      Top = 312
    215215      Width = 144
  • trunk/Languages/vCardStudio.cs.po

    r155 r158  
    187187msgstr "Porovnat..."
    188188
     189#: tcore.afileexport.caption
     190msgid "Export..."
     191msgstr "Exportovat..."
     192
    189193#: tcore.afilenew.caption
    190194msgid "New"
     
    964968msgstr "Chyby načtení"
    965969
     970#: tformexport.buttonbrowse.caption
     971msgctxt "tformexport.buttonbrowse.caption"
     972msgid "Browse"
     973msgstr "Procházet"
     974
     975#: tformexport.buttoncancel.caption
     976msgctxt "tformexport.buttoncancel.caption"
     977msgid "Cancel"
     978msgstr "Zrušit"
     979
     980#: tformexport.buttonexport.caption
     981msgctxt "tformexport.buttonexport.caption"
     982msgid "Export"
     983msgstr "Export"
     984
     985#: tformexport.caption
     986msgctxt "tformexport.caption"
     987msgid "Export"
     988msgstr "Export"
     989
     990#: tformexport.label1.caption
     991msgid "Output format:"
     992msgstr "Výstupní formát:"
     993
     994#: tformexport.label2.caption
     995msgid "Output file:"
     996msgstr "Výstupní soubor:"
     997
    966998#: tformfind.buttonfind.caption
    967999msgctxt "tformfind.buttonfind.caption"
     
    12601292
    12611293#: tformsettings.buttonok.caption
     1294msgctxt "tformsettings.buttonok.caption"
    12621295msgid "Ok"
    12631296msgstr "Ok"
     
    13831416msgid "vCard file"
    13841417msgstr "Soubor vCard"
    1385 
  • trunk/Languages/vCardStudio.pot

    r153 r158  
    177177msgstr ""
    178178
     179#: tcore.afileexport.caption
     180msgid "Export..."
     181msgstr ""
     182
    179183#: tcore.afilenew.caption
    180184msgid "New"
     
    954958msgstr ""
    955959
     960#: tformexport.buttonbrowse.caption
     961msgctxt "tformexport.buttonbrowse.caption"
     962msgid "Browse"
     963msgstr ""
     964
     965#: tformexport.buttoncancel.caption
     966msgctxt "tformexport.buttoncancel.caption"
     967msgid "Cancel"
     968msgstr ""
     969
     970#: tformexport.buttonexport.caption
     971msgctxt "tformexport.buttonexport.caption"
     972msgid "Export"
     973msgstr ""
     974
     975#: tformexport.caption
     976msgctxt "tformexport.caption"
     977msgid "Export"
     978msgstr ""
     979
     980#: tformexport.label1.caption
     981msgid "Output format:"
     982msgstr ""
     983
     984#: tformexport.label2.caption
     985msgid "Output file:"
     986msgstr ""
     987
    956988#: tformfind.buttonfind.caption
    957989msgctxt "tformfind.buttonfind.caption"
     
    12501282
    12511283#: tformsettings.buttonok.caption
     1284msgctxt "tformsettings.buttonok.caption"
    12521285msgid "Ok"
    12531286msgstr ""
  • trunk/Languages/vCardStudio.sv.po

    r157 r158  
    188188msgstr ""
    189189
     190#: tcore.afileexport.caption
     191msgid "Export..."
     192msgstr ""
     193
    190194#: tcore.afilenew.caption
    191195msgid "New"
     
    971975msgstr ""
    972976
     977#: tformexport.buttonbrowse.caption
     978msgctxt "tformexport.buttonbrowse.caption"
     979msgid "Browse"
     980msgstr ""
     981
     982#: tformexport.buttoncancel.caption
     983#, fuzzy
     984msgctxt "tformexport.buttoncancel.caption"
     985msgid "Cancel"
     986msgstr "Avbryt"
     987
     988#: tformexport.buttonexport.caption
     989msgctxt "tformexport.buttonexport.caption"
     990msgid "Export"
     991msgstr ""
     992
     993#: tformexport.caption
     994msgctxt "tformexport.caption"
     995msgid "Export"
     996msgstr ""
     997
     998#: tformexport.label1.caption
     999msgid "Output format:"
     1000msgstr ""
     1001
     1002#: tformexport.label2.caption
     1003msgid "Output file:"
     1004msgstr ""
     1005
    9731006#: tformfind.buttonfind.caption
    9741007msgctxt "tformfind.buttonfind.caption"
     
    12691302
    12701303#: tformsettings.buttonok.caption
     1304msgctxt "tformsettings.buttonok.caption"
    12711305msgid "Ok"
    12721306msgstr "Ok"
     
    13921426msgid "vCard file"
    13931427msgstr ""
     1428
  • trunk/Packages/Common/Common.lpk

    r148 r158  
    4242    <License Value="Copy left."/>
    4343    <Version Minor="11"/>
    44     <Files Count="33">
     44    <Files Count="34">
    4545      <Item1>
    4646        <Filename Value="StopWatch.pas"/>
     
    188188        <UnitName Value="CommonPackage"/>
    189189      </Item33>
     190      <Item34>
     191        <Filename Value="Table.pas"/>
     192        <UnitName Value="Table"/>
     193      </Item34>
    190194    </Files>
    191195    <CompatibilityMode Value="True"/>
  • trunk/Packages/Common/Common.pas

    r148 r158  
    6666function IntToBin(Data: Int64; Count: Byte): string;
    6767function Implode(Separator: Char; List: TList<string>): string;
     68function Implode(Separator: Char; List: TStringList; Around: string = ''): string;
    6869function LastPos(const SubStr: String; const S: String): Integer;
    6970function LoadFileToStr(const FileName: TFileName): AnsiString;
     
    206207end;*)
    207208
     209function Implode(Separator: Char; List: TStringList; Around: string = ''): string;
     210var
     211  I: Integer;
     212begin
     213  Result := '';
     214  for I := 0 to List.Count - 1 do begin
     215    Result := Result + Around + List[I] + Around;
     216    if I < List.Count - 1 then Result := Result + Separator;
     217  end;
     218end;
     219
    208220function LastPos(const SubStr: String; const S: String): Integer;
    209221begin
  • trunk/Packages/Common/CommonPackage.pas

    r148 r158  
    99
    1010uses
    11   StopWatch, Common, DebugLog, Common.Delay, PrefixMultiplier, URI, Threading,
     11  StopWatch, Common, DebugLog, Common.Delay, PrefixMultiplier, URI, Threading, 
    1212  Memory, ResetableThread, Pool, LastOpenedList, RegistryEx, JobProgressView,
    1313  XML, ApplicationInfo, SyncCounter, ListViewSort, PersistentForm, FindFile,
    1414  ScaleDPI, Theme, StringTable, MetaCanvas, Geometric, Translator, Languages,
    15   FormAbout, AboutDialog, PixelPointer, DataFile, TestCase, Generics,
     15  FormAbout, AboutDialog, PixelPointer, DataFile, TestCase, Generics, Table,
    1616  LazarusPackageIntf;
    1717
  • trunk/Packages/Common/Languages/DataFile.cs.po

    r156 r158  
    2121msgid "Data file"
    2222msgstr "Datový soubor"
     23
  • trunk/Packages/Common/Languages/DebugLog.cs.po

    r156 r158  
    1616msgid "Filename not defined"
    1717msgstr "Neurčen soubor"
     18
  • trunk/Packages/Common/Languages/FindFile.cs.po

    r156 r158  
    1616msgid "Directory not found"
    1717msgstr "Adresář nenalezen"
     18
  • trunk/Packages/Common/Languages/FormAbout.cs.po

    r156 r158  
    2626msgid "Version"
    2727msgstr "Verze"
     28
  • trunk/Packages/Common/Languages/JobProgressView.cs.po

    r156 r158  
    4343msgid "Total estimated time: %s"
    4444msgstr "Celkový odhadovaný čas: %s"
     45
  • trunk/Packages/Common/Languages/Languages.cs.po

    r156 r158  
    981981msgid "Zulu"
    982982msgstr "Zuluština"
     983
  • trunk/Packages/Common/Languages/Pool.cs.po

    r156 r158  
    2121msgid "Unknown object for release from pool"
    2222msgstr "Neznýmý objekt pro uvolnění ze zásobníku"
     23
  • trunk/Packages/Common/Languages/ResetableThread.cs.po

    r156 r158  
    1616msgid "WaitFor error"
    1717msgstr "Chyba WaitFor"
     18
  • trunk/Packages/Common/Languages/ScaleDPI.cs.po

    r156 r158  
    1717msgid "Wrong DPI [%d,%d]"
    1818msgstr "Chybné DPI [%d,%d]"
     19
  • trunk/Packages/Common/Languages/TestCase.cs.po

    r156 r158  
    2626msgid "Passed"
    2727msgstr "Prošlo"
     28
  • trunk/Packages/Common/Languages/Threading.cs.po

    r156 r158  
    1717msgid "Current thread ID %d not found in virtual thread list."
    1818msgstr "Aktuální vlákno ID %d nenalezeno v seznamu virtuálních vláken."
     19
  • trunk/vCardStudio.lpi

    r152 r158  
    123123      </Item7>
    124124    </RequiredPackages>
    125     <Units Count="26">
     125    <Units Count="27">
    126126      <Unit0>
    127127        <Filename Value="vCardStudio.lpr"/>
     
    288288        <ResourceBaseClass Value="Form"/>
    289289      </Unit25>
     290      <Unit26>
     291        <Filename Value="Forms\FormExport.pas"/>
     292        <IsPartOfProject Value="True"/>
     293        <ComponentName Value="FormExport"/>
     294        <HasResources Value="True"/>
     295        <ResourceBaseClass Value="Form"/>
     296      </Unit26>
    290297    </Units>
    291298  </ProjectOptions>
  • trunk/vCardStudio.lpr

    r155 r158  
    77  Interfaces, // this includes the LCL widgetset
    88  Forms, FormMain, Core, Diff, SysUtils, FormCompareSideBySide, TestCases,
    9   VCardFile, FormColumns, FormCompare, FormNormalize;
     9  VCardFile, FormColumns, FormCompare, FormNormalize, FormExport;
    1010
    1111{$R *.res}
Note: See TracChangeset for help on using the changeset viewer.