init, clean & pack
The commands included in this section are used to handle the installation/cleanup of pyssianutils.
init
Should be run after a fresh installation. Creates the local directories where the user's app data and defaults will be stored
usage: pyssianutils init [-h] [--unpack PACKAGE] [--force]
[--xdg-default-appdir]
Named Arguments
- --unpack
package containing the configuration of a previous pyssianutils setup. Obtained through 'pyssianutils pack myfile.pack'
- --force
overwrite any previous pyssianutils application data if it already existed
Default:
False
- --xdg-default-appdir
If enabled it will store pyssianutils data at $HOME/.local/share/pyssianutils instead of at $HOME/.pyssianutils
Default:
True
clean
Removes the app data files and local directory where the pyssianutils data was stored. This is recommended before uninstalling the software
usage: pyssianutils clean [-h]
pack
Packages the user app data into a tar file that can be used by pyssianutils init to simplify exporting the user defaults and templates to a new machine.
usage: pyssianutils pack [-h] [--outputdir OUTPUTDIR] [name]
Positional Arguments
- name
name of the file that will contain the user's configuration
Default:
'pyssianutils_appdata'
Named Arguments
- --outputdir, -O
Directory where the file will be created. Defaults to the CWD
Copying a user's data into a different PC
Setting up a specific pyssianutils' user configuration and templates is as
simple as copying the defaults.ini and templates/ folders. However, in order to
allow the user more control through the CLI we included the
pyssianutils pack
and the pyssianutils init --unpack
options.
First on a computer/user with an existing installation of pyssianutils we will run:
$ pyssianutils pack
Creating pyssianutils_appdata.tar
finished
Which will create a tar file in the current directory. Next we need to copy that tar file to either the new user or the computer where we want to transfer our pyssianutils setup. After, installing pyssianutils in the destination computer we now proceed to unpack our pyssianutils data:
$ pyssianutils init --unpack pyssianutils_appdata.tar
With this we have finished transfering our setup from one computer to another, or to a new user.