Skip to content
/ reftool Public

Command line tool for accessing reference archives

License

Notifications You must be signed in to change notification settings

usdAG/reftool

Repository files navigation

reftool


reftool is a command line interface for accessing reference archives. It allows to display references, copy single reference items into the clipboard and optionally to apply encodings to a copied reference. An example implementation for a reference archive is the usd-reference-archive.

Installation


reftool can be installed via pip, either by installing from PyPi:

[user@host ~]$ pip3 install --user reftool

or by building and installing it manually:

[user@host ~]$ git clone https://github.com/usdAG/reftool
[user@host ~]$ cd reftool
[user@host ~]$ pip3 install -r requirements.txt
[user@host ~]$ python3 setup.py sdist
[user@host ~]$ pip3 install --user dist/reftool-*

reftool supports autocompletion for bash. To take advantage of autocompletion, you need to have the completion-helpers project installed. If setup correctly, just copying the completion script to your ~/.bash_completion.d folder enables autocompletion.

Configuration


During the installation, reftool creates a configuration file ~/.config/reftool.ini. Inside this file, the path for the reference archive and some other display related options are set. You can adjust these options to your own preferences.

In order to be useful, at least one reference archive should be available within reftools reference path. The usd-reference-archive is one example for a reftool compatible archive. You can have several different archives within your reference path.

For a default installation, the following commands can be used to setup a reference archive:

[user@host ~]$ mkdir -p ~/.local/share/reftool-archives
[user@host ~]$ cd ~/.local/share/reftool-archives
[user@host ~]$ git clone https://github.com/usdAG/usd-reference-archive