Difference between revisions of "TruxtonCLI.exe"

From truxwiki.com
Jump to navigation Jump to search
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
Also known as the Truxton Command Line interface. <code>TruxtonCLI.exe</code> is located in <code>C:\Program Files\Truxton\Tools\TruxtonCli.exe</code>. <code>TruxtonCLI.exe</code> offers many ways of performing tasks related to a Truxton instance from the command line. Each command from <code>TruxtonCLI.exe</code> can provide additional information about itself with the --help option.
+
Also known as the Truxton Command Line interface.
 +
<code>TruxtonCLI.exe</code> is located in <code>C:\Program Files\Truxton\Tools\TruxtonCli.exe</code>.
 +
<code>TruxtonCLI.exe</code> offers many ways of performing tasks related to a Truxton instance from the command line.
 +
Each command from <code>TruxtonCLI.exe</code> can provide additional information about itself with the --help option.
  
 +
=Overview=
 
<pre>
 
<pre>
 
TruxtonCLI:
 
TruxtonCLI:
Line 22: Line 26:
 
   depot            Manage depots
 
   depot            Manage depots
 
</pre>
 
</pre>
 
 
=Commands=
 
=Commands=
  
Line 31: Line 34:
 
</source>
 
</source>
 
which will result in:
 
which will result in:
<source lang="bat">
+
<pre>
 
   View and manage investigations in Truxton
 
   View and manage investigations in Truxton
  
Line 53: Line 56:
 
   associate      Associates an investigation and a media
 
   associate      Associates an investigation and a media
 
   unassociate    Unassociates an investigation and a media
 
   unassociate    Unassociates an investigation and a media
</source>
+
</pre>
  
 
If you would like to see what reports are available at the investigation level, execute:
 
If you would like to see what reports are available at the investigation level, execute:
Line 69: Line 72:
  
 
The following will save the meta data and file contents of an investigation.
 
The following will save the meta data and file contents of an investigation.
This will make a significantly larger TPIF file.
+
This will make a significantly larger [[TPIF]] file.
  
 
<source lang="bat">
 
<source lang="bat">
Line 79: Line 82:
 
"C:\Program Files\Truxton\Tools\TruxtonCLI.exe" investigation import --file "E:\Investigation.tpif"
 
"C:\Program Files\Truxton\Tools\TruxtonCLI.exe" investigation import --file "E:\Investigation.tpif"
 
</source>
 
</source>
 +
 +
When Truxton imports an investigation or media with file content, the actual importing of the file contents takes place in the maintenance ETL.
 +
This is a slow process as maintenance will only import file contents that don't already exist in Truxton.
 +
Once TruxtonCLI has imported the metadata from the [[TPIF]] file, it will send a message to maintenance to perform the file content import.
 +
Once all contents are imported, maintenance will queue videos and images for thumbnailing.
 +
It will also have all documents indexed.
  
 
====Write GeoJSON Report====
 
====Write GeoJSON Report====
Line 162: Line 171:
 
"C:\Program Files\Truxton\Tools\TruxtonCLI.exe" media delete --force --id 20220405-1111-1111-2222-000000000001
 
"C:\Program Files\Truxton\Tools\TruxtonCLI.exe" media delete --force --id 20220405-1111-1111-2222-000000000001
 
</source>
 
</source>
 +
 +
NOTE! When you delete a piece of media, it will only delete the meta data for that media from the database.
 +
In order to remove file contents from the depot files, please use the tray application and choose [[Truxton Status#Tray Menu|"Clean Data"]]
  
 
==messagebus==
 
==messagebus==
Line 220: Line 232:
  
 
Commands:
 
Commands:
   migrate   Migrates Depots from the current datadir to another. The current datadir is typically located in the
+
  consolidate    Sends a message to the Maintenance ETL to perform depot consolidation
            TruxtonSettings.xml configuration file. If Truxton services are running it will turn off those services
+
   migrate       Migrates Depots from the current datadir to another. The current datadir is typically located in the
            and turn them back on when completed.
+
                TruxtonSettings.xml configuration file. If Truxton services are running it will turn off those services
 +
                and turn them back on when completed.
 
</pre>
 
</pre>
 +
===Sample===
 +
====Move Depots to New Folder====
 +
As of October, 2022, moving depots to a new folder is a two step process.
 +
You must migrate the depot files to the new folder then fixup the database.
 +
To move the files and update <code>TruxtonSettings.xml</code> to use <code>TruxtonCLI</code>.
 +
This will move the existing depot files from the current location (<code>C:\Truxton Data</code> by default) to <code>e:\Depot</code>
 +
<source lang="bat">
 +
"c:\Program Files\Truxton\Tools\TruxtonCLI.exe" depot migrate -d e:\Depot
 +
</source>
 +
To fix the entries in the <code>[Depot]</code> table, use [[Useful_SQL_Queries#Python_Script_to_Change_Depot_Path|this]] Python script:
 +
<source lang="bat>
 +
python ChangeDepotPaths.py "C:\Truxton Data" "E:\Depot"
 +
</source>

Latest revision as of 06:18, 12 January 2026

Also known as the Truxton Command Line interface. TruxtonCLI.exe is located in C:\Program Files\Truxton\Tools\TruxtonCli.exe. TruxtonCLI.exe offers many ways of performing tasks related to a Truxton instance from the command line. Each command from TruxtonCLI.exe can provide additional information about itself with the --help option.

Overview

TruxtonCLI:
  Manage all things Truxton

Usage:
  TruxtonCLI [options] [command]

Options:
  --version         Show version information
  -?, -h, --help    Show help and usage information

Commands:
  investigation    View and manage investigations in Truxton
  license          View and manage the license for Truxton
  loadconfig       View and manage load configs
  media            View and manage media in Truxton
  messagebus       View message bus for Truxton
  route            View and manage routes
  stage            View and manage stages
  depot            Manage depots

Commands

investigation

You can get help for the investigation options by executing:

TruxtonCLI.exe --help investigation

which will result in:

  View and manage investigations in Truxton

Usage:
  TruxtonCLI investigation [options] [command]

Options:
  -?, -h, --help    Show help and usage information

Commands:
  report         Generates a named report
  list           Lists all investigation
  get            Gets a specific investigation by id
  export         Exports an investigation to tpif (truxton portable investigation format)
  publish        Publishes an investigation to another instance of Truxton. This operation will not proceed if there
                 are any media in the investigation which have not completed loading, unless the --force switch is
                 specified.
  import         Imports a tpif (truxton portable investigation format)
  create         Create an investigation
  delete         Delete an investigation
  associate      Associates an investigation and a media
  unassociate    Unassociates an investigation and a media

If you would like to see what reports are available at the investigation level, execute:

TruxtonCLI.exe --help investigation report

Sample

Export an Investigation

The following will save only the meta data from an investigation.

"C:\Program Files\Truxton\Tools\TruxtonCLI.exe" investigation export --id 01d7c1d3-22e3-dcb7-0000-015e3c18aa65 --file "E:\Investigation.tpif"

The following will save the meta data and file contents of an investigation. This will make a significantly larger TPIF file.

"C:\Program Files\Truxton\Tools\TruxtonCLI.exe" investigation export --id 01d7c1d3-22e3-dcb7-0000-015e3c18aa65 --file "E:\Investigation.tpif" --content true

Import an Investigation

"C:\Program Files\Truxton\Tools\TruxtonCLI.exe" investigation import --file "E:\Investigation.tpif"

When Truxton imports an investigation or media with file content, the actual importing of the file contents takes place in the maintenance ETL. This is a slow process as maintenance will only import file contents that don't already exist in Truxton. Once TruxtonCLI has imported the metadata from the TPIF file, it will send a message to maintenance to perform the file content import. Once all contents are imported, maintenance will queue videos and images for thumbnailing. It will also have all documents indexed.

Write GeoJSON Report

This will generate a GeoJSON report containing all of the locations in an investigation. This report can be imported into geo-spatial analysis tools such as 4DV.

"C:\Program Files\Truxton\Tools\TruxtonCLI.exe" investigation report --id 9e47c882-2a01-4030-9d2e-32cf566efbf4 --file "C:\temp\i.geojson" --name geojson

You can also output a media level report.

"C:\Program Files\Truxton\Tools\TruxtonCLI.exe" media report --id c7e8b463-10e8-7a20-a818-f16eb8677f1e --file "C:\temp\media.geojson" --name geojson

Delete an Investigation

This will delete the investigation but none of the media in the investigation.

"C:\Program Files\Truxton\Tools\TruxtonCLI.exe" investigation delete --force --id 20220405-1111-1111-2222-000000000001

license

  View and manage the license for Truxton

Usage:
  TruxtonCLI license [options] [command]

Options:
  -?, -h, --help    Show help and usage information

Commands:
  register      Register a new license
  deregister    Removes the existing license
  view          View the current license information

loadconfig

  View and manage load configs

Usage:
  TruxtonCLI loadconfig [options] [command]

Options:
  -?, -h, --help    Show help and usage information

Commands:
  list      Lists all load configurations
  add       Add a new load config
  remove    Removes an existing load config

media

  View and manage media in Truxton

Usage:
  TruxtonCLI media [options] [command]

Options:
  -?, -h, --help    Show help and usage information

Commands:
  list       Lists all media
  get        Gets a specific media by id
  export     Exports a media to tpmf (truxton portable media format)
  publish    Publishes a media to another instance of Truxton. This operation will not proceed if the media has not
             completed loading, unless the --force switch is specified.
  import     Imports a tpmf (truxton portable media format)
  delete     Delete a media
  purge      Purges expired media

Sample

Delete a Piece of Media

This will delete a piece of media from Truxton. It does this by sending a message to the maintenance queue which will do the actual deletion.

"C:\Program Files\Truxton\Tools\TruxtonCLI.exe" media delete --force --id 20220405-1111-1111-2222-000000000001

NOTE! When you delete a piece of media, it will only delete the meta data for that media from the database. In order to remove file contents from the depot files, please use the tray application and choose "Clean Data"

messagebus

  View message bus for Truxton

Usage:
  TruxtonCLI messagebus [options] [command]

Options:
  -?, -h, --help    Show help and usage information

Commands:
  status    Lists the status of the message bus

route

  View and manage routes

Usage:
  TruxtonCLI route [options] [command]

Options:
  -?, -h, --help    Show help and usage information

Commands:
  list      Lists routes by load configuration id
  add       Add a new route
  remove    Removes an existing route

stage

  View and manage stages

Usage:
  TruxtonCLI stage [options] [command]

Options:
  -?, -h, --help    Show help and usage information

Commands:
  list      Lists all stages
  add       Add a new stage
  remove    Removes an existing stage

depot

  Manage depots

Usage:
  TruxtonCLI depot [options] [command]

Options:
  -?, -h, --help    Show help and usage information

Commands:
  consolidate    Sends a message to the Maintenance ETL to perform depot consolidation
  migrate        Migrates Depots from the current datadir to another. The current datadir is typically located in the
                 TruxtonSettings.xml configuration file. If Truxton services are running it will turn off those services
                 and turn them back on when completed.

Sample

Move Depots to New Folder

As of October, 2022, moving depots to a new folder is a two step process. You must migrate the depot files to the new folder then fixup the database. To move the files and update TruxtonSettings.xml to use TruxtonCLI. This will move the existing depot files from the current location (C:\Truxton Data by default) to e:\Depot

"c:\Program Files\Truxton\Tools\TruxtonCLI.exe" depot migrate -d e:\Depot

To fix the entries in the [Depot] table, use this Python script:

python ChangeDepotPaths.py "C:\Truxton Data" "E:\Depot"