# Changelog ## [ToDo] `reek lib/markdown_exec.rb --config .reek` - user settings - hidden w , w/o () in names - fix regexp in pathnames - [ ] read file once to allow for tempdoc stream - tree display - [ ] mde options, user prompt, in md file or included file - [ ] include blocks from local md file - execute? yes/no/save/clipboard + record/edit/history - [ ] list, view saved output - completion - [ ] include blocks in md file - [ ] ruby gem data model - [ ] extract yaml block into stdout - [ ] extract json block into stdout - [ ] import yaml, json data into environment - [ ] yq filter with imported or named yaml, json data - [ ] yaml dump of options w/ detail - [ ] re-exec last script v re-run named block in last script - [ ] repeat to reload last doc and block - [ ] option to log blended, timeline; stdin, stdout, stderr; labels: prefix and blocks - [ ] ren logged_stdout_filename_prefix to saved_stdout_filename_prefix - [ ] ignore '#' in fenced code blocks - [ ] write named block, can be included - [ ] file type per block type - [ ] file name per block name or specified in quotes ("") - [ ] overwrite-rules for writing blocks - [ ] erase-rules for written blocks - [ ] files to create named at top of script to execute; written prior to start of script - [ ] tab completion example ascii demo - [ ] reorder help list - [ ] parameters or (env vars) in menu - [ ] config menu or read env vars - [ ] enable/disable script, output saving per file - [ ] keep values between runs so same env vars are not prompted - [ ] move menu data to required file - [ ] tab complation for short option names - [ ] option to list full menu - [ ] task confirmation block option or bash template, env names - [ ] decoration for menu heading items, template? - [ ] configuration block `mde_config` anywhere in file - [ ] configuration block `mde_config` anywhere in folder config file ```yaml :(mde_config)``` - [x] fix execution stdin, stdout to allow for ask function - [ ] fix execution stdin, stdout to allow for tty-prompt ## [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_match | MDE_FENCED_START_AND_END_MATCH | ``^`{3,}`` | | fenced_start_ex_match | MDE_FENCED_START_EX_MATCH | ``^`{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