Executable Commands
Picard can accept commands for processing by specifying them on the command line using
the -e
option or loading them from a text file. Commands are case-insensitive, and
are processed sequentially in the order that they are received. The executable commands
that Picard recognizes are:
CLEAR_LOGS
Clear all entries from Picard’s log. This is the equivalent of clicking the Clear Log button from the log viewing screen opened using the command.
CLUSTER
Cluster all files in the cluster pane. This is the equivalent of using the
command.FINGERPRINT
Calculate acoustic fingerprints for all (matched) files in the album pane. This is the equivalent of using the
command.FROM_FILE
Load commands from a file. The file path can be either an absolute or relative
path to a text file containing the commands to be executed. Each command to be
processed must be on a separate line along with its arguments (if applicable). Blank
lines and lines beginning with an octothorpe (#) are ignored. Command files can
include other command files by specifying them with another FROM_FILE
command.
Circular references (by including a command file that is currently being processed)
are ignored and will be logged as a warning.
For example, you may have a file named commands.txt
containing the standard
commands that you want to use when processing each directory, such as:
# Try clustering and lookup the clusters first
CLUSTER
LOOKUP_CLUSTERED
# Save matched clusters
SAVE_MATCHED
# Calculate and submit fingerprints for the matched files
FINGERPRINT
SUBMIT_FINGERPRINTS
# Clean up and remove the saved files
REMOVE_SAVED
REMOVE_EMPTY
# Try scanning the remaining files to find matches
SCAN
# Save matched files from the scans
SAVE_MATCHED
# Clean up and remove the saved files
REMOVE_SAVED
REMOVE_EMPTY
# Any files remaining in the cluster pane could not be
# matched automatically
You could then process a directory by starting Picard with the command:
picard -e LOAD path/to/directory/of/unprocessed/files -e FROM_FILE commands.txt
LOAD
Load one or more files/directories/MBIDs/URLs to Picard. This is similar to including the file, directory path, URL or MBID on the command line.
Files and directories are specified including the path (either absolute or relative)
to the file or directory, and may include drive specifiers. They can also be specified
using the file://
prefix. URLs are specified by using either the http://
or
https://
prefix. MBIDs are specified in the format mbid://<entity_type>/<mbid>
where <entity_type>
is one of “release”, “artist” or “track” and <mbid>
is the
MusicBrainz Identifier of the entity.
If a specified item contains a space, it must be enclosed in quotes such as
"/home/user/music/my song.mp3"
.
LOOKUP
Lookup files in the clustering pane. Options are clustered files, unclustered files or all files. If not specified, the command defaults to all files.
This is the equivalent of using the
command.LOOKUP_CD
Read CD from the selected drive or ripper log file, and looks it up on MusicBrainz. If no argument is specified, it defaults to the first (alphabetically) available disc drive.
This is the equivalent of using the
command.PAUSE
Pause executable command processing for the specified number of seconds.
QUIT
The QUIT
command waits until all queued executable commands have completed, and then
initiates a shutdown request the same as if the user closed Picard from the user interface.
This allows Picard to perform the same checks for unsaved files and such. When ‘force’ is
entered as an argument to the command, Picard will bypass the unsaved files check.
Once a QUIT
command has been queued, Picard will not queue any further executable commands.
If the user cancels the QUIT
from the unsaved files check dialog, the system will allow
more commands to be queued.
REMOVE
Removes the specified file(s) from Picard. Does nothing if no arguments provided.
REMOVE_SAVED
Removes all saved files from the album pane.
REMOVE_UNCLUSTERED
Removes all unclustered files from the cluster pane.
SAVE_MATCHED
Saves all matched files from the album pane.
SAVE_MODIFIED
Saves all modified files from the album pane.
SCAN
Scans all files in the cluster pane. This is the equivalent of using the
command.SHOW
Make the running instance of Picard the currently active window.
SUBMIT_FINGERPRINTS
Submits outstanding acoustic fingerprints for all (matched) files in the album pane. This is the equivalent of using the
command.WRITE_LOGS
Writes the Picard logs to the specified output file. This is the equivalent of using the Save As… button from the log viewing screen opened using the command.