# Changelog ## [2.0.0] - 2024-02-07 ### Added - Process format and glob to load, save script code. - Provide ENV and batch variables to formatting function. - Find files matching glob and present for user selection. - Allow for entry of new file name when saving. ## [1.8.9] - 2024-01-20 ### Added - Variables set in inherited lines for use in scripts. - Link key `save` to write inherited lines to disk. ## [1.8.8] - 2024-01-15 ### Added - Debounce/Control repeated launching of the same block via the menu. - Option to match block nicknames. Nicknames are used for scripting and are not displayed in the menu -- the block body is shown the menu. - Option to execute script to launch Terminal window. Provide batch variables to use in the execute_command_format script. Limit iTerm window position to visible area. Store output of executed script. Menu to replay, review, and exit. - Report line in document importing a missing file. - Option to search for import files within each of the specified paths (recursion optional). - Eval block loads (appends) local file to inherited lines. - Eval block executes script and appends filtered output to inherited lines. Select output using begin and end matching lines. Transform selected output with per-line match and print specifications. ### Changed - Sanitize block names in formatted lines above and below inherited code. ## [1.8.7] - 2023-12-31 ### Added - Option for block name that presents the menu. - Options for decorating inherited lines in the menu. - Options for parse and display of heading levels 1, 2, and 3. ### Changed - Bypass chrome blocks when collecting dependencies. ## [1.8.6] - 2023-12-25 ### Added - Default path for find command. ### Changed - Refactor command-line processing. ## [1.8.5] - 2023-12-22 ### Added - "eval" boolean value for Link blocks to compute lines to append to the inherited state. - "return" boolean value for Link blocks to return to the original page. - Options for dumping data associated with the menu or state. - Debug and irb gems. ## [1.8.4] - 2023-12-15 ### Added - Options to dump blocks when processed. ### Changed - Refactor code generation for and after Link blocks ## [1.8.2] - 2023-12-12 ### Changed - Set default colors. ## [1.8.1] - 2023-12-11 ### Changed - Name used in script saved file. ## [1.8] - 2023-12-11 ### Changed - Default colors. ### Added - Run-time exception for unmet dependencies. - Command to find text in directory name, file name, or file contents. - Options to detect and display block dependency graph and exceptions. - Options to dump parsed blocks structures. - Options to add labels to shell code blocks. ## [1.7] - 2023-12-01 ### Added - Options to format menu and output blocks. - Control display of imported content. - Example documents. ## [1.6] - 2023-11-13 ### Added - Options to remember a block's indentation in the source document and to display with same indentation in the menu. ### Changed - Note option matches the remaining lines in the document and they are displayed in the menu. ## [1.5] - 2023-11-08 ### Added - Confirmation between execution of block and display of next menu. - Option for block loaded automatically per document. - Options for note lines copied from source into menu. - Options to format menu chrome. - Options to generate title for a block without a name. - Remove consecutive blank lines from menu. - Restore options between menu choices. Add options for "notes" in menu. ## [1.4.1] - 2023-11-02 ### Added - Support for nested links. A Link block name can be followed by the block name to execute in the linked document. Nested links result in scripts with nested required blocks. ## [1.4] - 2023-10-31 ### Added - Add required code blocks to link block types. Allows for nested required code as links are navigated. - Add fg_rgbh_* methods to process hex RGB specifications. ## [1.3.9] - 2023-10-29 Add block types for linking and variable control Rename options to match use. ### Added - Pass-through arguments after "--" to the executed script. See document `examples/pass-through.md`. - Add RGB color specification to basic ANSI color names. Foreground R, G, and B values are encoded in the name "fg_rgb_R_G_B" with their decimal values. e.g. red = "fg_rgb_255_0_0" e.g. green = "fg_rgb_0_255_0" e.g. blue = "fg_rgb_0_0_255" - Add a "link" fenced code block type as a menu choice to load a different document. The `link` block can specify: - environment variables and values to set prior to loading the document, - a block name to execute in the loaded document. In the resulting menu, an automatic option (Back) allows the user to return to the original document. See documents `examples/linked1.md`, `examples/linked2.md`. - Add an "opts" fenced code block type as a menu choice to set current MDE options. See document `examples/opts.md`. - Add a "vars" fenced code block type as a menu choice to set current environment variables. See document `examples/vars.md`. These blocks can be hidden blocks and required in a script. - Add a "wrap" fenced code block type to facilitate script generation. See document `examples/wrap.md`. These blocks are hidden and can be required by one or more blocks. ### Changed - Rename RegExp options to match use. ## [1.3.8] - 2023-10-20 ### Added - Options for hidden, included, and wrapped blocks ## [1.3.7] - 2023-10-16 ### Changed - Fix invocation of SavedAsset class ## [1.3.6] - 2023-10-15 ### Added - Option to inhibit display of menu decorations/chrome - Options for tasks ## [1.3.5] - 2023-10-05 ### Changed - Fix display of menu dividers ## [1.3.3] - 2023-10-03 ### Added - Nest scripts by using an `import` directive ### Changed - Convert constants for block selection into options ## [1.3.2] - 2022-11-12 ### Added - Add RSpec tests for internal classes ## [1.3.1] - 2022-10-29 ### Added - Delay to allow all command output to be received - Display an error message when the specified document file is missing - Options to display, format and colorize menu dividers and demarcations - Tab completion for short option names ### Changed - Fix handling of document supplied by process substitution ## [1.3.0] - 2022-07-16 ### Added - Short name `-p` for `--user-must-approve` option Enable/disable pause for user to review and approve script - Automatic wrapping for data in blocks of yaml data eg ` ```yaml ` Data is written to the file named in the fenced block heading - Data transformations are embedded in the script at every invocation with arguments to the transformation as stdin and stdout for the `yq` process eg `export fruit_summary=$(yq e '[.fruit.name,.fruit.price]' fruit.yml)` for invocation `%(summarize_fruits fruit_summary)` and transformation `[.fruit.name,.fruit.price]` - Option to extract document text and display it as disabled items in-line with the blocks in the selection menu Add options for constants used in parsing - [x] yaml processing - ```yaml :(make_fruit_file) >fruit.yml``` write to: fruit.yml - ```yq [summarize_fruits] +(make_fruit_file) \S+)( \|$)` | | block_required_scan | MDE_BLOCK_REQUIRED_SCAN | `\+\S+` | | fenced_start_and_end_regex | MDE_FENCED_START_AND_END_REGEX | ``^`{3,}`` | | fenced_start_extended_regex | MDE_FENCED_START_EXTENDED_REGEX | ``^`{3,}(?[^`\s]*) *(?.*)$`` | | heading1_match | MDE_HEADING1_MATCH | `^# *(?[^#]*?) *$` | | heading2_match | MDE_HEADING2_MATCH | `^## *(?[^#]*?) *$` | | heading3_match | MDE_HEADING3_MATCH | `^### *(?.+?) *$` | | md_filename_glob | MDE_MD_FILENAME_GLOB | `*.[Mm][Dd]` | | md_filename_match | MDE_MD_FILENAME_MATCH | `.+\\.md` | Most options can be configured in multiple ways. In order of use (earliest superceded by last): 1. environment variables 2. the configuration file `.mde.yml` in the current folder 3. command line arguments #### Representing boolean values Boolean values for options are specified as strings and interpreted as: | Value | Boolean | | :---: | :---: | | *empty string* | False | | `0` | False | | `1` | True | | *anything else* | True | E.g. `opt1=1` will set option `opt1` to True. Boolean options configured with environment variables: - Set to `1` or non-empty value to save executed scripts; empty or `0` to disable saving. e.g. `export MDE_SAVE_EXECUTED_SCRIPT=1` e.g. `export MDE_SAVE_EXECUTED_SCRIPT=` - Specify variable on command line. e.g. `MDE_SAVE_EXECUTED_SCRIPT=1 mde` ## [0.2.2] - 2022-03-17 - Update documentation. ## [0.2.1] - 2022-03-12 - Accept file or folder as first optional positional argument. - Hide blocks with parentheses in the name, like "(name)". This is useful for blocks that are to be required and not selected to execute alone. ## [0.2.0] - 2022-03-12 - Improve processing of file and path sepcs. ## [0.1.0] - 2022-03-06 - Initial release