rew icon indicating copy to clipboard operation
rew copied to clipboard

New architecture

Open jpikl opened this issue 4 years ago • 0 comments

Instead of a single executable rew with all of the filtering functionality, let's split the project into more smaller cli tools, where every tool does one separate thing.

  • Previous filters will be implemented as separate rew subcommands. For example:
    • t filter becomes rew trim [-s|--start] [-e|--end] subcommand.
    • r filter becomes rew replace <what> [replacement] subcommand.
    • c filter becomes rew seq subcommand.
    • C filter becomes rew parent | rew count where parent subcommand prints parent directory and count subcommand print number of occurrences of input lines.
  • Pipeline composition will be done using rew x subcommand:
    • Former usage: rew 'img_{C}.{e|l|r:e}'
    • New usage: rew 'img_{seq}.{ext | lower | replace e}'
  • rew will run {a | b | ...c} pipelines in separate threads
  • Every pipeline will consume/produce lines.
  • Every subcommand will support -0, --null flag to process NUL separated lines.
  • There will be REW_NULL environment variable to enable -0, --null behavior globally.
  • Former cli options for custom input/output line separator will be implemented as a separate subcommands split and join.
  • Alternative output modes (diff/json lines) will not be supported anymore.
  • Auxiliary mvb/cpb tools will be dropped in favor of generation of executable shell code.

jpikl avatar Feb 09 '22 23:02 jpikl