Skip to main content

CLI tool to deal with ZoomR16 project

Project description

pipeline status coverage report

zrtool

zrtool is a little cli tool that let you do some actions on a ZoomR16 project. For now, you can backup a project in a compressed format, and extract any data you need from it. You can also get the original uncompressed project if you want to restore a backuped project into you ZoomR16 device.

Installation

zrtool need a proper installation of flac (https://www.xiph.org/flac/) to work. The flac encoder and decoder is available on most platform, e.g. apt install flac for debian based OS.

zrtool will try to use the flac command line. If the flac binary is not accessible from your PATH, it can be specified with the ZRTOOL_FLAC_BIN environnement.

The recommended way to install zrtool is by using pipx:

pipx install zrtool

If you don't want to install pipx to manage python cli tools installation, zrtool can also be installed with pip:

pip install zrtool

Usage example

All this options are not yet available. They will be included in version 1.0.0. To see what's already implemented refer to the CHANGES document.

Backup a project under the zrpa format.

$ zrtool archive [--compress|--no-compress] PRJ000/ project-000.zrpa

Convert back to the original format.

$ zrtool export [--number N] project-000.zrpa [foo/]

It will create a directory PROJ000 in the foo directory. If foo is not specified, create PROJ000 in the current directory. Number is optional, if not given the number of the project is determined by the project that can be found in the target directory. If specified this number is used to define the name of the project directory.

Search

Search based on metadata.

$ zrtool filter \
    [--not] \
    --zprop "name" "Test" \
    --zprop-track "fader" 80 1 \
    --tag "title" ".*song" \
    --tag-file "title" ".*song" "MONO-000" \
    [--recursive] \
    [directory/...]
path/to/archive.zrpa
path/to/other-archive.zrpa

Return the path of zrpa archive that match at least one of the given tag or zprop. It get archive from directory if given, else it reads path from stdin. Filter can be piped to each other to perform "and" filter and more complex search.

Metadata

Show metadata of a zrpa archive.

$ zrtool tags project-000.zrpa
Title: Song title
Author: Band name
Date: 2020-02-29
  MONO-000:
    Author: Someone
    Instrument: Guitar
    Comment: Recorded with simple microphone
  MASTR000:
    Comment: First mix done. Needs to be improved
$ zrtool tags --project project-000.zrpa
Title: Song title
Author: Band name
Date: 2020-02-29
$ zrtool tags --file MONO-000 project-000.zrpa
Author: Someone
Instrument: Guitar
Comment: Recorded with simple microphone
$ zrtool project-000.zrpa metadata show Title
Song title
$ zrtool tags --file MONO-000 --key Instrument project-000.zrpa
guitar

Add a new key and value to a project.

$ zrtool tag [--update] --key-value Take 0 project-000.zrpa
$ zrtool tag [--update] --key-value Author Someone --file MONO-000 project-000.zrpa

Edit an existing metadata of a project.

$ zrtool tag --key Title project-000.zrpa
$ zrtool tag --key Instrument --file MONO-000 project-000.zrpa
$ zrtool project-000.zrpa metadata rename-key Author Artist

Rename an existing key.

$ zrtool tag --rename-key Author Artist project-000.zrpa
$ zrtool tag --rename-key Author Artist --file MONO-000 project-000.zrpa

Delete an existing tag.

$ zrtool rmtag --key Title project-000.zrpa
$ zrtool rmtag --key Title --file MONO-000 project-000.zrpa

Files

List archive content.

$ zrtool files project-000.zrpa
audio/
audio/MASTR000.WAV
audio/MONO-000.WAV
audio/MONO-001.WAV
audio/MONO-002.WAV
audio/MONO-003.WAV
audio/MONO-004.WAV
audio/MONO-005.WAV
EFXDATA.ZDT
metadata.json
PRJDATA.ZDT
$ zrtool files project-000.zrpa audio
audio/
audio/MASTR000.WAV
audio/MONO-000.WAV
audio/MONO-001.WAV
audio/MONO-002.WAV
audio/MONO-003.WAV
audio/MONO-004.WAV
audio/MONO-005.WAV
$ zrtool files project-000.zrpa audio/*
audio/MASTR000.WAV
audio/MONO-000.WAV
audio/MONO-001.WAV
audio/MONO-002.WAV
audio/MONO-003.WAV
audio/MONO-004.WAV
audio/MONO-005.WAV
$ zrtool files project-000.zrpa audio/* *.ZDT
audio/MASTR000.WAV
audio/MONO-000.WAV
audio/MONO-001.WAV
audio/MONO-002.WAV
audio/MONO-003.WAV
audio/MONO-004.WAV
audio/MONO-005.WAV
EFXDATA.ZDT
PRJDATA.ZDT

Extract a file from an archive.

$ zrtool extract [--directory foo/] project-000.zrpa audio/* *.ZDT

Extract audio files from an archive.

$ zrtool get \
    --format {flac|vorbis|mp3|wav} \
    [--directory foo/]
    [--name '{{ title }} - {{ author }}.ogg'] \
    project-000.zrpa MASTR000...

Add audio file to an archive. Relative path are from audio directory. Path starting from the root begins with a /. It prevent from overwriting metadata file with a non-conform metadata file.

$ zrtool file [--update] project-000.zrpa music.wav
$ zrtool file [--update] project-000.zrpa note.txt /

Remove a file from an archive. Some integrity checks needs to be done.

$ zrtool rmfile project-000.zrpa MONO-000.WAV...

Project data

Read project data in the PRJDATA.ZDT file.

$ zrtool zprops project-000.zrpa
name: PROJ000
...
$ zrtool zprops --track 1 project-000.zrpa
file: MONO-000.WAV
fader: 80
...
$ zrtool zprops --key name project-000.zrpa
PROJ000

Edit project data.

$ zrtool zprop --key-value name "MYPROJ" project-000.zrpa
$ zrtool zprop --key-value file MASTR000.WAV --track 1 project-000.zrpa
$ zrtool zprop --key File --track 1 project-000.zrpa

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zrtool-0.1.0.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

zrtool-0.1.0-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file zrtool-0.1.0.tar.gz.

File metadata

  • Download URL: zrtool-0.1.0.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.7.3 Linux/4.19.0-12-amd64

File hashes

Hashes for zrtool-0.1.0.tar.gz
Algorithm Hash digest
SHA256 94fbc10ba5a85122c7458f9514916d118bc9bb2e78422cd993950541d3f0d555
MD5 35d94ccae35a8020f4846dba2e9d67e9
BLAKE2b-256 e3a9824c4dfb95b4ad2e958230e76204d028e1f4d2e4f01a65a19d2628942e1a

See more details on using hashes here.

Provenance

File details

Details for the file zrtool-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: zrtool-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.7.3 Linux/4.19.0-12-amd64

File hashes

Hashes for zrtool-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 256b429f902f05a385e98e17d2f91aee1f8773ae78b990b16fc47fd782c4cc63
MD5 d3cbc3fbc940ce855af80700a29675c9
BLAKE2b-256 a43607dba4765ccc5baf1aa686beec520a18ecf38ad066dbe82a9c1ad4ca8dcb

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page