Commit Graph

2 Commits

Author SHA1 Message Date
Christopher Haster 007ac97bec scripts: Adopted double-indent on multiline expressions
This matches the style used in C, which is good for consistency:

  a_really_long_function_name(
          double_indent_after_first_newline(
              single_indent_nested_newlines))

We were already doing this for multiline control-flow statements, simply
because I'm not sure how else you could indent this without making
things really confusing:

  if a_really_long_function_name(
          double_indent_after_first_newline(
              single_indent_nested_newlines)):
      do_the_thing()

This was the only real difference style-wise between the Python code and
C code, so now both should be following roughly the same style (80 cols,
double-indent multiline exprs, prefix multiline binary ops, etc).
2024-11-06 15:31:17 -06:00
Christopher Haster fe772e08cd Added dbgcat.py for extracted raw data from block devices
dbgcat.py is basically the same as dbgblock.py except:

- dbgcat.py pipes the block's contents directly to stdout.

  The intention is to enable external tools with Unix pipes while
  letting dbgcat.py take care of block address decoding:

    $ ./scripts/dbgcat.py disk -b4096 0x1.8 -n8 | grep littlefs
    littlefs

- Unlike dbgblock.py, dbgcat.py accepts multiple block addresses,
  concatenating the data that resides at those blocks.

  This is dbgCAT.py after all.
2024-04-01 16:28:51 -05:00