I've created a new version of the mmj2 CLI interface as hinted earlier.
I've tried to take other comments into consideration,
in the hopes of making mmj2 "easier to use" by making it work more
like all other programs. For many people it'll just "work out of the box", and 
if not,
in most cases you'll only have to tell it once where to find the database.

It's implemented as *script*; it doesn't change the
.jar file interface, so any script you have that calls the .jar file will work 
unchanged.

Here's the latest version of the script, which works on everything *except* 
Windows:

Usage:

mmj2 [ -f RUNCOMMANDS ] [ -d METAMATH_DATABASE_FILE ] [ FILE ]

- If FILE is a .mmp file, open that .mmp file when starting out.
- If FiLE is a .mm file, open that database and use a "default" .mmp file.
  If METAMATH_DATABASE_FILE isn't provided, it will use the last one used.
  If there's no last one, it makes an effort to find it by searching for 
"set.mm"
  in the following directories (in order) stored in METAMATH_DB_PATH, by default
  
.:$HOME/metamath:$HOME/set.mm:/usr/local/share/metamath:/usr/local/share/set.mm:/usr/share/metamath:/usr/share/set.mm
  Once if finds a metamath database, it records its location as the default
  in ~/.config/mmj2/default_database for next time you don't specify a database.
  (I do this because we need to know where the database is stored
  *and* where .mmp files are stored, which need not be the same thing;
  since this is really for editing .mmp files, the current directory is all 
about .mmp files.)

Note that if you want to provide a RunCommand script, just use "-f" and you
can make mmj2 do whatever you want.

Discussion here:
  https://github.com/digama0/mmj2/pull/42
Link to code here:
  https://github.com/david-a-wheeler/mmj2/tree/fixup

We'll need a Windows version. Current plan is to write this again in either
.bat or PowerShell (.ps1). .bat exists in all Windows, and PowerShell
exists on all Windows 7+ (presuming that they install updates).
That way same CLI will work everywhere.

--- David A. Wheeler

-- 
You received this message because you are subscribed to the Google Groups 
"Metamath" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/metamath/E1jf8gY-0003v4-BY%40rmmprod06.runbox.

Reply via email to