Wave:CLI: Difference between revisions

From BlueM
Jump to navigation Jump to search
(→‎Convert: added option -of DFS0 (since Wave v1.12))
 
(2 intermediate revisions by the same user not shown)
Line 20: Line 20:
</pre>
</pre>
Imports the time series contained in the two files <code>file1.zrx</code> and <code>file2.zrx</code>.
Imports the time series contained in the two files <code>file1.zrx</code> and <code>file2.zrx</code>.
 
<hr>
<pre class="dos">
<pre class="dos">
Wave.exe -import path\to\file1.csv
Wave.exe -import path\to\file1.csv
Line 35: Line 35:
The option <code>-i</code> (interactive) will show the Import File Dialog for files containing multiple time series. Without the option <code>-i</code> (non-interactive), no dialog will be shown and all series from all files will be imported.
The option <code>-i</code> (interactive) will show the Import File Dialog for files containing multiple time series. Without the option <code>-i</code> (non-interactive), no dialog will be shown and all series from all files will be imported.


The option <code>-of <format></code> allows you to specify the output format (currently supports <code>[[BIN-Format|BIN]]</code> and <code>[[CSV-Format|CSV]]</code>). Without the option <code>-of</code>, the output format is by default CSV.
The option <code>-of <format></code> allows you to specify the output format (currently supports <code>[[BIN-Format|BIN]]</code>, <code>[[CSV-Format|CSV]]</code> and <code>[[DFS0-Format|DFS0]]</code>). Without the option <code>-of</code>, the output format is by default CSV.


If the output format supports multiple timeseries in one file (e.g. CSV), <code>path_out</code> represents the path to the desired output ''filename''.
If the output format supports multiple timeseries in one file (e.g. CSV), <code>path_out</code> represents the path to the desired output ''filename''.
Line 43: Line 43:
<div class="info">'''Notes:'''  
<div class="info">'''Notes:'''  
* Output files will be overwritten.
* Output files will be overwritten.
* To specify which series to import from which files without interaction or to specify more import settings, use a [[Wave project file|WVP file]] as input.</div>
* To specify which series to import from which files without interaction or to specify more import settings, use a [[Wave project file|WVP file]] as input.
* When converting to DFS0, a dialog will be shown for setting EUM items and units</div>


===Examples===
===Examples===
Line 50: Line 51:
</pre>
</pre>
Imports all the time series contained in the files <code>file1.wel</code> and <code>file2.zrx</code> and exports them as CSV to <code>file_out.csv</code>.
Imports all the time series contained in the files <code>file1.wel</code> and <code>file2.zrx</code> and exports them as CSV to <code>file_out.csv</code>.
 
<hr>
<pre class="dos">
<pre class="dos">
Wave.exe -convert -i path\to\file1.wel path\to\file_out.csv
Wave.exe -convert -i path\to\file1.wel path\to\file_out.csv
</pre>
</pre>
Opens the Import File Dialog for selecting the series to import from the file <code>file1.wel</code> and exports them as CSV to <code>file_out.csv</code>.
Opens the Import File Dialog for selecting the series to import from the file <code>file1.wel</code> and exports them as CSV to <code>file_out.csv</code>.
 
<hr>
<pre class="dos">
<pre class="dos">
Wave.exe -convert path\to\projectfile.wvp path\to\file_out.csv
Wave.exe -convert path\to\projectfile.wvp path\to\file_out.csv
</pre>
</pre>
Imports series from files as specified in the [[Wave project file]] <code>projectfile.wvp</code> and exports them as CSV to <code>file_out.csv</code>.
Imports series from files as specified in the [[Wave project file]] <code>projectfile.wvp</code> and exports them as CSV to <code>file_out.csv</code>.
 
<hr>
<pre class="dos">
<pre class="dos">
Wave.exe -convert -of BIN path\to\projectfile.wvp path\to\output\directory
Wave.exe -convert -of BIN path\to\projectfile.wvp path\to\output\directory
Line 67: Line 68:
Contents of <code>projectfile.wvp</code>:
Contents of <code>projectfile.wvp</code>:
<pre>
<pre>
# project file for converting to BIN with custom filenames usable for Talsim
# project file for converting DFS0 to BIN with custom filenames
file=path\to\input\example.dfs0
file=path\to\input\example.dfs0
     series="series 1":00000001
     series="series 1":00000001

Latest revision as of 11:40, 13 January 2022

Wave.png Wave | Download | Development

Wave has a command-line interface (CLI) that offers the commands described below.

Type Wave.exe -help to get help in the console.

Import

Wave.exe -import file1[, file2[, ...]]

Import one or multiple files and then show Wave.

Notes:
  • Depending on the file format, the file import dialog may be shown when importing files using the CLI. To avoid this, use a WVP file as input in which the series to import or the import settings are already specified.

Examples

Wave.exe -import path\to\file1.zrx path\to\file2.zrx

Imports the time series contained in the two files file1.zrx and file2.zrx.


Wave.exe -import path\to\file1.csv

Opens the File Import Dialog for file1.csv and then imports series as specified by the user.

Convert

Wave.exe -convert [-i] [-of <format>] file1[, file2[, ...]] path_out

Import one or multiple files and export them to path_out, without showing Wave.

The option -i (interactive) will show the Import File Dialog for files containing multiple time series. Without the option -i (non-interactive), no dialog will be shown and all series from all files will be imported.

The option -of <format> allows you to specify the output format (currently supports BIN, CSV and DFS0). Without the option -of, the output format is by default CSV.

If the output format supports multiple timeseries in one file (e.g. CSV), path_out represents the path to the desired output filename.

If the output format only supports a single timeseries per file (e.g. BIN), path_out represents the path to the desired output directory. Output filenames are automatically generated from the time series titles. Use a WVP-file with user-defined titles as input in order to define output file names (see example below).

Notes:
  • Output files will be overwritten.
  • To specify which series to import from which files without interaction or to specify more import settings, use a WVP file as input.
  • When converting to DFS0, a dialog will be shown for setting EUM items and units

Examples

Wave.exe -convert path\to\file1.wel path\to\file2.zrx path\to\file_out.csv

Imports all the time series contained in the files file1.wel and file2.zrx and exports them as CSV to file_out.csv.


Wave.exe -convert -i path\to\file1.wel path\to\file_out.csv

Opens the Import File Dialog for selecting the series to import from the file file1.wel and exports them as CSV to file_out.csv.


Wave.exe -convert path\to\projectfile.wvp path\to\file_out.csv

Imports series from files as specified in the Wave project file projectfile.wvp and exports them as CSV to file_out.csv.


Wave.exe -convert -of BIN path\to\projectfile.wvp path\to\output\directory

Contents of projectfile.wvp:

# project file for converting DFS0 to BIN with custom filenames
file=path\to\input\example.dfs0
    series="series 1":00000001
    series="series 2":00000002
    series="series 3":00000003

Imports series from files as specified in the Wave project file projectfile.wvp and exports them in BIN format to path\to\output\directory, using the titles specified in the projectfile.wvp as filenames (in this case 00000001.bin, 00000002.bin etc.).

Notes

  • Filenames and paths containing spaces or special characters must be enclosed in quotes
  • Option -of was added in Wave v1.10.5
  • The CLI was added in Wave v1.10.3