/tigershark3

Houdini asset version tracking with Sqlite3, Python3 front-end, Rust back-end

Primary LanguageRust

Tigershark3

Tigershark3 is a cli based 3d asset versions tracking tool with simple CRUD functions
using Rust+Sqlite3 backend and Python3 for the Houdini frontend.
Since it's cli based and using JSON, it can be used with any software, not just Houdini.

Dependencies

  • Rust https://www.rust-lang.org/tools/install
  • build-essential
    • Ubuntu/Debian: sudo apt install build-essential
    • Fedora: sudo dnf group install "C Development Tools and Libraries"
  • SQLite3
  • Python3
  • Houdini19 (optional)

Build+Setup (Linux) build rust executable

$cargo build --release

setup executable and Sqlite3 DB (Tigershark exec path,DB path/name)

adds two environment variables to .bashrc:

  • $PYTHONPATH for Houdini, the tigershark python module
  • $TS_DATABASE the Sqlite3 database path
$bash setup.sh

CLI Syntax

tigershark3 -c {command} -a {asset}

available commands:

  • insert : create new version (create if asset if )
  • latest : returns the latest version of the asset
  • source : returns the source file that created the current version
  • delete (mark version for deletion)
  • approve (approve asset version and dependencies)
  • purge : write text file listing all versions to delete
  • source_from_file : returns the source file that created the current version

asset format

  • Json
    {"name":"my_asset","location":"myasset_location"}

Examples

  • insert new asset
    ./tigershark3 -c insert -a '{"name":"my_asset","location":"myasset_location"}'

  • update asset
    ./tigershark3 -c insert -a '{"name":"my_asset","location":"myasset_location","datapath":"/data/myasset","source":"/sources/myasset_source"}'

  • find latest version of an asset
    ./tigershark3 -c latest -a '{"name":"my_asset","location":"myasset_location"}'

  • find source file from file path
    ./tigershark3 -c source_from_file -f /data/projects/show/seq/shot/my_file.1234.bgeo.sc

commands that require Json fields (asset)

  • insert
    name && location || asset_id && datapath && source

  • source
    name && location && version || asset_id && version || version_id

  • delete
    name && location || asset_id && version || version_id

  • latest
    name && location || asset_id

  • approve
    name && location || asset_id && version || version_id

commands that require different arguments

  • purge
    // no args required

  • source_from_file
    file

DB Storage Scheme (SQlite3)

2 tables (assets/versions)

Assets

asset_id : i64 *
name : String
location : String

Versions

version_id : i64
version : i64
source : String
datapath : String
depend : String
approved : i64
status : i64
asset_id : i64 *
ctime : String
atime : String