Enhancement #1710

Change CLI to provide SVN/git-like subcommands for different tasks

Added by J. Moringen over 7 years ago. Updated over 6 years ago.

Status:ResolvedStart date:12/23/2013
Priority:NormalDue date:
Assignee:J. Moringen% Done:

100%

Category:Commandline Tools
Target version:Robotics Service Bus - rsb-0.12

Description

Tasks identified so far:
  • info
  • record
  • play
  • cat
  • transform (formerly merge)
Potential future tasks:
  • server
  • shell/repl

Associated revisions

Revision 3cc98c02
Added by J. Moringen over 6 years ago

Initial import of sub-commands stuff in src/commands/*.lisp

refs #1710, refs #1482

  • src/commands/protocol.lisp: new file; contains protocol for using and
    creating command instances
  • src/commands/mixins.lisp: new file; contains mixin classes for command
    classes
  • src/commands/redump.lisp: new file; register rsb-tools' `redump'
    command
  • src/commands/info.lisp: new file; contains the info command
  • src/commands/cat.lisp: new file; contains the cat command
  • src/commands/play.lisp: new file; contains the play command
  • src/commands/record.lisp: new file; contains the record command
  • src/commands/transform.lisp: new file; contains the transform command
  • src/commands/package.lisp: new file; package definition for the
    commands module
  • rsbag-tools-commands.asd: new file; system definition for the
    rsbag-tools-commands system

Revision 9ea1d488
Added by J. Moringen over 6 years ago

Unit tests for commands in test/commands/*.lisp

refs #1710

  • test/commands/info.lisp: new file; tests for info command
  • test/commands/cat.lisp: new file; tests for cat command
  • test/commands/play.lisp: new file; tests for play command
  • test/commands/record.lisp: new file; tests for record command
  • test/commands/transform.lisp: new file; tests for transform command
  • test/commands/package.lisp: new file; package definition for command
    tests
  • rsbag-tools-commands.asd (system rsbag-tools-commands): :in-order-to
    test-op run test-op on :rsbag-tools-commands-test
    (system rsbag-tools-commands-test): new system; tests for the commands
    (perform test-op eql :rsbag-tools-commands-test): new method; run
    command tests
  • lift-rsbag-tools-commands.config: new file; test configuration for
    rsbag-tools-commands system
  • CMakeLists.txt: run tests for rsbag-tools-commands system

Revision 94bc74bf
Added by J. Moringen over 6 years ago

Use commands in bag-*/main.lisp programs

refs #1710

  • bag-info/main.lisp (header): updated copyright
    (update-synopsis): accept program-name keyword parameter
    (main): accept program-pathname and args parameters; pass to
    `process-commandline-options'; make and execute `info' command
  • bag-cat/main.lisp (header): updated copyright
    (make-examples-string): accept program-name keyword parameter
    (update-synopsis): likewise
    (main): accept program-pathname and args parameters; pass to
    `process-commandline-options'; make and execute `cat' command
  • bag-play/help.lisp (header): updated copyright
    (make-help-string): adapted program name
    (make-examples-string): likewise
  • bag-play/main.lisp (header): updated copyright
    (update-synopsis): accept program-name keyword parameter
    (print-progress): removed; now handled by the command class
    (main): accept program-pathname and args parameters; pass to
    `process-commandline-options'; make and execute `play' command
  • bag-record/help.lisp (header): updated copyright
    (make-examples-string): adapted program-name keyword parameter
  • bag-record/main.lisp (header): updated copyright
    (invoke-with-control-service): removed; now handled by the command
    class
    (update-synopsis): accept program-name keyword parameter
    (main): accept program-pathname and args parameters; pass to
    `process-commandline-options'; make and execute `record' command
  • bag-merge/protocol.lisp: removed; now provided by
    src/commands/transform.lisp
  • bag-merge/transcoding.lisp: likewise
  • bag-merge/main.lisp (header): updated copyright
    (make-example-string): accept program-name keyword parameter
    (update-synopsis): likewise
    (print-progress): remove; now handled by the command class
    (main): accept program-pathname and args parameters; pass to
    `process-commandline-options'; make and execute `transform' command
  • main/main.lisp (header): updated copyright
    (name->entry-point): renamed >entry-point
    (program-pathname>name): new function; extract program name from
    pathname
    (main/program-name): new function; entry point when called via
    symbolic link
    (main/command): new function; entry point when called with sub-command
    (main): depending on invocation, call `main/program-name' and
    `main/command'
    (make-static): removed; now taken care off by `redump' command
    (make-dynamic): likewise
    (%maybe-create-links): adapted to changes
  • main/package.lisp (header): updated copyright
    (package rsbag.tools.main): added used package let-plus
  • cl-rsbag-tools-cat.asd (header): updated copyright
    (system cl-rsbag-tools-cat): added system dependency on
    rsbag-tools-commands
  • cl-rsbag-tools-info.asd (header): updated copyright
    (system cl-rsbag-tools-info): added system dependency on
    rsbag-tools-commands
  • cl-rsbag-tools-main.asd (header): updated copyright
    (system cl-rsbag-tools-main): added system dependency on
    rsbag-tools-commands
  • cl-rsbag-tools-merge.asd (header): updated copyright
    (system cl-rsbag-tools-merge): added system dependency on
    rsbag-tools-commands
  • cl-rsbag-tools-play.asd (header): updated copyright
    (system cl-rsbag-tools-play): added system dependency on
    rsbag-tools-commands
  • cl-rsbag-tools-record.asd (header): updated copyright
    (system cl-rsbag-tools-record): added system dependency on
    rsbag-tools-commands

Revision 6ca5f404
Added by J. Moringen over 6 years ago

Adapted CMake stuff to sub-command changes

refs #1710

  • main/dump.lisp (toplevel): dump into rsbag[.exe] instead of bag[.exe]
  • MakeLists.txt: tweaked binary name, link creation and installation
  • cpack/DebianUbuntu.cmake: install an alternative for the program name
    "rsbag"

Revision 6cf62d06
Added by J. Moringen over 6 years ago

Mention sub-command syntax in tools-*.rst, news.rst

refs #1710

  • tool-cat.rst: use sub-command syntax
  • tool-info.rst: likewise
  • tool-merge.rst: likewise
  • tool-play.rst: likewise
  • tool-record.rst: likewise
  • tools.rst: likewise
  • tutorial.rst: likewise
  • troubleshooting.rst: likewise
  • news.rst (RSBag 0.12): mention sub-command syntax

Revision 699753c8
Added by J. Moringen over 6 years ago

Improved help texts in bag-info/main.lisp

refs #1710

  • bag-info/main.lisp (make-help-string): do not accept program-name
    keyword parameter; do not generate example string
    (make-example-string): new function; generate example string
    (update-synopsis): use `make-example-string' to generate an
    "Examples" group

Revision 0243a6e5
Added by J. Moringen over 6 years ago

Mention sub-command syntax in tools-*.rst, news.rst

refs #1710

  • tool-cat.rst: use sub-command syntax
  • tool-info.rst: likewise
  • tool-merge.rst: likewise
  • tool-play.rst: likewise
  • tool-record.rst: likewise
  • tools.rst: likewise
  • tutorial.rst: likewise
  • troubleshooting.rst: likewise
  • news.rst (RSBag 0.12): mention sub-command syntax

Revision 10b35d23
Added by J. Moringen over 6 years ago

Adapted to rsbag sub-commands in rsbag/__init__.py

refs #1710

  • rsbag/__init__.py (header): adjusted module documentation string
    (Connection._cleanup): bag-play -> rsbag play in logged warning
    (Bag.__init__): keyword parameter bagPlay -> rsbag; changed call
    bag-play -> rsbag play
    (openBag): keyword parameter bagPlay -> rsbag; adapted documentation
    string and body accordingly

Revision 54fb3066
Added by J. Moringen over 6 years ago

Removed symlink stuff in main/main.lisp, CMakeLists.txt, cpack/DebianUbuntu.cmake

refs #1710, refs #1482

  • main/main.lisp (main/program-name): removed; no longer needed
    (main/command): likewise
    (main): removed link-related cases
    (%maybe-create-link)
    (%maybe-create-links):
  • CMakeLists.txt: do not create symbolic links for individual commands;
    adapted tests
  • cpack/DebianUbuntu.cmake: do not create symbolic links and install and
    remove alternatives for individual commands

Revision 05875a82
Added by J. Moringen almost 6 years ago

Mention removal of symlink-based invocation in news.rst

refs #1710

  • news.rst (RSBag 0.13): mention removal of symlink-based invocation of
    CL tools

History

#1 Updated by J. Moringen over 7 years ago

  • Target version changed from rsb-0.11 to rsb-0.12

#2 Updated by J. Moringen over 7 years ago

  • Target version changed from rsb-0.12 to rsb-1.0

#3 Updated by J. Moringen over 6 years ago

  • Target version changed from rsb-1.0 to rsb-0.12
  • % Done changed from 20 to 90

#4 Updated by J. Moringen over 6 years ago

  • Description updated (diff)
  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100

Should be done. For backwards compatibility, symbolic link machinery remains for one more release.

Also available in: Atom PDF