/liquidfiles.py

Command-line interface for LiquidFiles server

Primary LanguagePythonMIT LicenseMIT

liquidfiles.py

liquidfiles.py is a command-line utility to work with LiquidFiles servers for sending files, listing messages, creating filelinks, etc.

It is a Python implementation of liquidfiles_unix.

Requirements

  • Python >= 3

Installation

Simply download the liquidfiles.py script to your desired location. Alternatively, you can build a .whl and install it with pip.

python3 -m build
pip install dist/*.whl

Usage

liquidfiles.py uses sub-commands to interact with your LiquidFiles server.

liquidfiles.py -s https://liquidfiles.example.com -k ${API_KEY} <sub-command> <options>

The current supported sub-commands are:

  • attach: upload given files and returns the ids
  • attachments: list available attachments
  • config: manage configuration
  • delete-attachments: deletes the given attachments
  • delete-filelink: deletes the given filelink
  • filelink: creates filelink for the given files
  • filelinks: list available filelinks
  • file-request: send file(s) to specified user
  • info: show client information
  • messages: list available messages
  • send: send file(s) to specified user
  • version: show version information

To get a sub-command's detailed description, options and usage, use the -h or --help option.

liquidfiles.py <sub-command> --help

Config File

To avoid having to use the -s and -k options on every command, you can use a config file to set your server and API key.

liquidfiles.py checks the following files for your server and API key:

  1. $HOME/.liquidfiles.conf
  2. /usr/local/etc/liquidfiles.conf
  3. /etc/liquidfiles.conf

The config file uses standard INI format with a [config] section.

[config]
api_key = ${API_KEY}
server = https://liquidfiles.example.com

The config sub-command can be used to configure ~/.liquidfiles.conf for the current user.

liquidfiles.py config --set-server https://liquidfiles.example.com --set-api-key ${API_KEY}