Global

Methods

(static) make-readme()

Description:
  • Command line builder of the README.md file from the package.json file for aidebuild

        Usage: ./src/make-readme.js
    
Description:
  • Generates a simple graphical user interface menu for the commands.

        Usage: .../aidebuild/src/menu.js  [menu.json] &
    
    • It requires a menu.json file defining the shell commands to be run, e.g. :
    {
      " rebuild": "@term make rebuild what=ongoing",
      " clean":   "@term make clean",
      "console":  "mate-terminal",
      "suspend":  "sudo systemctl suspend"
    }
    
    • Usage notes:

      • Commands stdout and stderr are appended to the local menu.log file.
      • With the @term prefix the command is run in a xterm terminal.
      • By default, (i) the local ./menu.json or (ii) the menu.js directory menu.json file is considered.
      • The menu title is built from the menu.json base-name (without the .json extension).
    • Implementation notes:

      • It uses the cligui2 middle-ware.
        • It thus requires a manual call of sudo npm install -g cligui2 on install.
        • It then may requires export NODE_PATH=$(npm root --quiet -g) before calling ./menu.js
        • If the xterm software is present it is used to show the menu in a popup window.
        • This may be introduced in a makefile of the form:
     menu:
     	export NODE_PATH=$(shell npm root --quiet -g) ; ./menu.js
    
    install:
    	sudo apt install nodejs npm xterm
    	sudo npm install -g menu
    	../..
    
    • The menu is in a terminal yielding a menu of the form: menu
    • It does not require any specific GUI and it is usable on any platform.