I am starting Minsky 2.18 on Ubuntu 18.04.4 from the terminal. Does the "minsky" command have any options? I tried
$ minsky -v
$ minsky -h
but the poor thing thought I was trying to force-feed it a file named "-v", etc.
I am developing a .desktop file to enable a Minsky icon to appear on the desktop, in the Applications panel, or in the Favorites panel where it can be double-clicked to launch Minsky. I hope to add some context-menu commands to require Minsky to create a new project as it launches, to quit, to display its version, and perhaps other actions available from the command line.
On versions of Linux where icons can be clustered into categories such as Games, Text Editors, etc., the .desktop file also allow the icon to appear under Education, Simulation, Math, Economy, etc.
It is true that the cli interface is not documented. Minsky has a TCL
interpreter. When the application starts up, it executes a script
minsky.tcl. That script in turn checks if there are any arguments. If
the first argument ends in .tcl, then it assumes it is a script, and
runs that script prior to initialising the GUI. Command line arguments
are stored in the TCL array variable $argv, so that script may in turn
implement assorted command line arguments. This allows various
utilities to be written using Minsky, mostly for testing or
development purposes. But it also allows Minsky to be used for batch
processing, such as parameter space exploration. But I don't know
anyone who has done that.
Two further nuances, if you need to run something after the GUI is
started, then implement a TCL proc called afterMinskyStarted. And if
you don't want the GUI to be initialised at all, then place a single
tcl_exit at the end of the script. Note that "exit" has been redefined
to check whether the model has changed, and display a prompt asking
the user to save it, so not so useful for batch scripts.
If the first argument is not a TCL script, then Minsky assumes it is
an XML file encoding a Minsky model.
In the absence of a script, Minsky has no further need of command line
arguments or options.
Cheers
On Mon, Jun 22, 2020 at 11:56:38AM -0000, Hedley Finger wrote:
I am starting Minsky 2.18 on Ubuntu 18.04.4 from the terminal. Does the
"minsky" command have any options? I tried
$ minsky -v
$ minsky -h
but the poor thing thought I was trying to force-feed it a file named "-v",
etc.
I am developing a .desktop file to enable a Minsky icon to appear on the
desktop, in the Applications panel, or in the Favorites panel where it can be
double-clicked to launch Minsky. I hope to add some context-menu commands to
require Minsky to create a new project as it launches, to quit, to display its
version, and perhaps other actions available from the command line.
On versions of Linux where icons can be clustered into categories such as
Games, Text Editors, etc., the .desktop file also allow the icon to appear
under Education, Simulation, Math, Economy, etc.
I am starting Minsky 2.18 on Ubuntu 18.04.4 from the terminal. Does the "minsky" command have any options? I tried
but the poor thing thought I was trying to force-feed it a file named "-v", etc.
I am developing a .desktop file to enable a Minsky icon to appear on the desktop, in the Applications panel, or in the Favorites panel where it can be double-clicked to launch Minsky. I hope to add some context-menu commands to require Minsky to create a new project as it launches, to quit, to display its version, and perhaps other actions available from the command line.
On versions of Linux where icons can be clustered into categories such as Games, Text Editors, etc., the .desktop file also allow the icon to appear under Education, Simulation, Math, Economy, etc.
A very crude draft file is attached.
Last edit: Hedley Finger 2020-06-22
Hi Hedley,
It is true that the cli interface is not documented. Minsky has a TCL
interpreter. When the application starts up, it executes a script
minsky.tcl. That script in turn checks if there are any arguments. If
the first argument ends in .tcl, then it assumes it is a script, and
runs that script prior to initialising the GUI. Command line arguments
are stored in the TCL array variable $argv, so that script may in turn
implement assorted command line arguments. This allows various
utilities to be written using Minsky, mostly for testing or
development purposes. But it also allows Minsky to be used for batch
processing, such as parameter space exploration. But I don't know
anyone who has done that.
Two further nuances, if you need to run something after the GUI is
started, then implement a TCL proc called afterMinskyStarted. And if
you don't want the GUI to be initialised at all, then place a single
tcl_exit at the end of the script. Note that "exit" has been redefined
to check whether the model has changed, and display a prompt asking
the user to save it, so not so useful for batch scripts.
If the first argument is not a TCL script, then Minsky assumes it is
an XML file encoding a Minsky model.
In the absence of a script, Minsky has no further need of command line
arguments or options.
Cheers
On Mon, Jun 22, 2020 at 11:56:38AM -0000, Hedley Finger wrote:
--
Dr Russell Standish Phone 0425 253119 (mobile)
Principal, High Performance Coders hpcoder@hpcoders.com.au
http://www.hpcoders.com.au