Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-2526

Allow starting processing actions from the command line

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.9.0a1
    • None
    • User Interface
    • None

      In combination with running a single instance covered in PICARD-2471 consider allowing starting processing actions from the command line.  Actions could include:

      • SCAN - Scan all files in the cluster pane.
      • CLUSTER - Cluster all files in the cluster pane.
      • LOOKUP - Lookup all clusters in the cluster pane.
      • SAVECOMPLETE - Save all completely matched releases in the album pane.
      • REMOVESAVED - Remove all saved releases from the album pane.
      • FINGERPRINT - Calculate acoustic fingerprints for all (matched) files in the album pane.
      • SUBMITFINGERPRINTS - Submit outstanding acoustic fingerprints for all (matched) files in the album pane.
      • SHOW - Make the running instance the currently active program.
      • QUIT - Exit the running instance of Picard.

       

          [PICARD-2526] Allow starting processing actions from the command line

          GitHub Bot added a comment -

          See code changes in pull request #2137 submitted by skelly37.

          GitHub Bot added a comment - See code changes in pull request #2137 submitted by skelly37 .

          Execution order can be important, so commands should be queued and executed in the order that they appear on the command line.

           

          I was thinking about passing a ;-separated string, to make it as simple as possible, e.g.:

           

          `picard -e "SHOW; CLUSTER; QUIT"`

           

          Passing a single command would look exactly the same (`picard -e QUIT`), while passing a sequence of them would require to just add some quotes ".

          skelly37@protonmail.com added a comment - Execution order can be important, so commands should be queued and executed in the order that they appear on the command line.   I was thinking about passing a ;-separated string, to make it as simple as possible, e.g.:   `picard -e "SHOW; CLUSTER; QUIT"`   Passing a single command would look exactly the same (`picard -e QUIT`), while passing a sequence of them would require to just add some quotes ".

          Bob Swift added a comment -

          I agree that case-insensitive is the way it should be.  As for the actual commands entered, I have no real concerns with changing from what I originally listed.  That was a quick list to capture ideas, and not intended as a definitive list of actual commands.

          One more thing to consider...  Execution order can be important, so commands should be queued and executed in the order that they appear on the command line.

          Bob Swift added a comment - I agree that case-insensitive is the way it should be.  As for the actual commands entered, I have no real concerns with changing from what I originally listed.  That was a quick list to capture ideas, and not intended as a definitive list of actual commands. One more thing to consider...  Execution order can be important, so commands should be queued and executed in the order that they appear on the command line.

          skelly37@protonmail.com added a comment - - edited

          Great suggestions, thanks. Just a few notes from my side:

           

          • The commands should be case-insensitive (i.e. SCAN == scan == sCAN). Uppercase names look better in the code/docs, while lowercase ones are more convenient for the shell user. We would invoke either `upper` or `lower` on them.
          • `command://<command>` strings would be sent to the picard instance through the pipe (or ignored if no instance listens to the pipe).
          • The command should be used in one of the following formats: `picard -e <command>` or `picard --exec <command>`

           

          And when it comes to the commands, I'm not sure if your suggestions for more complex names would be the best ones. Basically, the three of them should be considered by all of us:

           

          • SAVECOMPLETE
          • SAVE-COMPLETE
          • SAVE_COMPLETE

          skelly37@protonmail.com added a comment - - edited Great suggestions, thanks. Just a few notes from my side:   The commands should be case-insensitive (i.e. SCAN == scan == sCAN). Uppercase names look better in the code/docs, while lowercase ones are more convenient for the shell user. We would invoke either `upper` or `lower` on them. `command://<command>` strings would be sent to the picard instance through the pipe (or ignored if no instance listens to the pipe). The command should be used in one of the following formats: `picard -e <command>` or `picard --exec <command>`   And when it comes to the commands, I'm not sure if your suggestions for more complex names would be the best ones. Basically, the three of them should be considered by all of us:   SAVECOMPLETE SAVE-COMPLETE SAVE_COMPLETE

            skelly37@protonmail.com skelly37@protonmail.com
            rdswift Bob Swift
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Version Package
                2.9.0a1