Clk Flow
FleetingWhen a command as a “natural” predecessor, this can be informed in the flow of the command.
Then, you can simply issue the command while triggering its whole flow.
For instance, when 3D printing, I have the following commands that may well be run independently.
- clk 3d slicer: run a slicer to transform a 3D model into printer gcode commands,
- clk 3d feed: run the printer commands to insert filament,
- clk 3d calib: put the nozzle at the 4 locations needed to calibrate the printer,
- clk 3d upload: upload the gcode file to the machine connected to the printer,
- clk 3d print: actually run the print
I may want to run any of those commands for itself, so I really need 4 commands. But quite often I just want to run a print doing the full sequence.
So I can just run:
clk flowdep set 3d.print 3d.slicer 3d.feed 3d.calib 3d.upload
And then, the command clk 3d print
has the new option --flow
to run the
whole stuff.
clk 3d print --flow # the whole stuff
clk 3d print --flow-from 3d.upload # only upload and print
clk 3d print --flow-after 3d.slicer # already did the slicing and ask for the next steps
Notes linking here
- clk 101
- clk encourage de scripter par abstraction
- clk flowdep
- clk flows don’t need to have conditions
- clk maybe list