OcLaunch Launch automagically


OcLaunch 0.3.0-pre1 is out!

OClaunch blog

Today (02/19), version 0.3.0-pre1 went out.
It's the preversion promised in the post of the new year.

Cautions:

  • This is pre-version, not ready for production.
  • The documentation is not yet completely updated, for the same reason.
  • Note: In CHANGELOG, XXX Means that the functionality needs test and TODO means that its implementation is partial. This points items needing more tests.

Some screenshot

Main new functionalities are shown below.

Overview of list command and new command-line parsing

Overview of list command and new command-line parsing

Clean command in action

Clean command in action

Edit command, with detection of unmodification

Edit command, with detection of unmodification

Major changes

New command-line parsing

Command line parsing was rewritten, you can now enter

oclaunch list

instead of

oclaunch --list

Thanks to this implementation, you can use shorter commands.
For instance:

oclaunch cleanup

is equivalent to

oclaunch c

You can shorten as far as you want, provided it remains unambiguous.

New tmp file format

The tmp file format changed (#6). From this (obtained using bdump -w command,number,daemon,rc,commands):


{ "command": [], "number": 3 }

to this:


{
  "rc": [
    ("/home/lwzukw/.oclaunch_rc.json",
     ([
        { "commands": ("profanity", 1) },
        {
          "commands":
            ("syncthing-linux-amd64-v0.11.26/syncthing",
             1)
        },
        { "commands": ("killall workrave", 1) },
        { "commands": ("sysctl vm.swappiness", 1) },
        {
          "commands":
            ("curl --silent https://btc-e.com/api/3/ticker/btc_usd  -o - | grep -o '\"avg\":[0-9]\\+.[0-9]\\+'",
             1)
        }
      ]))
  ],
  "daemon": 0
}
Why use such a complicated format?

This address several issue we got with the preceding.

  • Problem with multiple configuration file. When switching from one to the other, we had to reset each time.
  • When a command is launched out of order (for instance calling oclaunch 10), then when we come to 10, the 10th entry was relaunched.

With the new format, we track rc file, number of launch per command. Then, we guess what is the next one from this, if any.
This way, we fix the issues listed above. This should be more robust in the future too.

Other changes

  • Beautified rc file:
    • Remove doubled entries before each write of the rc file. Trailing spaces are remove too. Empty entries are dropped.
    • As a result, new clean command has been added, to clean up a manually edited or old rc file.
  • Improve list subcommand, now using Textutils library, displaying in an array.
  • Improve edit subcommand, now offer to reedit when nothing was done.

Community

With this pre-release, release scripts were improved, to enhance contributing experience (making easier to release source-code, binaries, signing…). Add indentation script too, to correct contributor's patches.

README.md file was improved too, using special code in _oasis Description field. We add HTML code to display shields and longer description.

One step further

This post is based on the changelog, feel free to read it directly to know in details what append.

Installation

With 0install

As usual, you just need to select the right binary in the list. See Installation section. 0install may also update OcLaunch automatically, depending on your settings.

With opam

If your architecture is not supported by prebuilt version, you may use opam.

Warning: The archives are not usable with opam directly, since some dependencies where forget (corrected in this commit). That's say, provided that dependencies are correctly installed, you can use the following command:

opam pin add oclaunch http://download.tuxfamily.org/oclaunch/v03/oclaunch_v0.3.0-pre1_src.tar.gz

Feedback

As usual, feedback (bug, ideas and so on) is welcomed at feedback@oclaunch.eu.org or on GitLab, whatever you want.