Discussion:
Command Line Interface
Ben Lewis
2016-08-19 06:12:30 UTC
Permalink
Hi Kst,

I'm using the command line to batch process Kst data files. The aim is to produce a set of png
files, one for each data file.

The batch file I'm using looks like this:

@echo off
for %%f in (*.csv) do (
echo "%%f"
"C:\Program Files (x86)\Kst-2.0.8\bin\kst2.exe" -F "%%f" --png "%%~nf.png" "kstFile.kst"
)

This works, but I would like to make a few improvements.

Is it possible to control the size of exported png file? The default is 1280 x 960. I would like to
create high resolution images, something like 3840 x 2160.

Is it possible to control the *time offset* pragmatically? For *Time/Date Interpretation* I'm using
*Index with frequency* and a manual offset. I would like to read the *start time* from the header
info in the data file and apply this as an offset.

I'm using Kst 2.0.8 32 bit on Windows 10.

Regards, Ben
Barth Netterfield
2016-08-19 16:38:34 UTC
Permalink
Post by Ben Lewis
Hi Kst,
I'm using the command line to batch process Kst data files. The aim is to
produce a set of png files, one for each data file.
@echo off
for %%f in (*.csv) do (
echo "%%f"
"C:\Program Files (x86)\Kst-2.0.8\bin\kst2.exe" -F "%%f" --png
"%%~nf.png" "kstFile.kst" )
This works, but I would like to make a few improvements.
Is it possible to control the size of exported png file? The default is 1280
x 960. I would like to create high resolution images, something like 3840 x
2160.
It would be easy to add --pngWidth and --pngHeight to the command line. OK?
Post by Ben Lewis
Is it possible to control the *time offset* pragmatically? For *Time/Date
Interpretation* I'm using *Index with frequency* and a manual offset. I
would like to read the *start time* from the header info in the data file
and apply this as an offset.
Yeah.... a bit harder.

An easy-ish approach would be to add a TimeOffset scalar to the ascii reader
(like the units and quantity strings now) and optionally use it.

Sound OK?
Post by Ben Lewis
I'm using Kst 2.0.8 32 bit on Windows 10.
Regards, Ben
Ben Lewis
2016-08-21 05:05:36 UTC
Permalink
Hi Barth,

Adding a TimeOffset scalar to the ascii reader would be perfect.

I'm just not sure how you will handle all the different possible formats. The format that I use,
which I can change if required, is:

yyyy-mm-ddThh:mm:ss.sss

Regards, Ben
Post by Barth Netterfield
Post by Ben Lewis
Hi Kst,
I'm using the command line to batch process Kst data files. The aim is to
produce a set of png files, one for each data file.
@echo off
for %%f in (*.csv) do (
echo "%%f"
"C:\Program Files (x86)\Kst-2.0.8\bin\kst2.exe" -F "%%f" --png
"%%~nf.png" "kstFile.kst" )
This works, but I would like to make a few improvements.
Is it possible to control the size of exported png file? The default is 1280
x 960. I would like to create high resolution images, something like 3840 x
2160.
It would be easy to add --pngWidth and --pngHeight to the command line. OK?
Post by Ben Lewis
Is it possible to control the *time offset* pragmatically? For *Time/Date
Interpretation* I'm using *Index with frequency* and a manual offset. I
would like to read the *start time* from the header info in the data file
and apply this as an offset.
Yeah.... a bit harder.
An easy-ish approach would be to add a TimeOffset scalar to the ascii reader
(like the units and quantity strings now) and optionally use it.
Sound OK?
Post by Ben Lewis
I'm using Kst 2.0.8 32 bit on Windows 10.
Regards, Ben
Loading...