Skip to content

Latest commit

 

History

History
54 lines (31 loc) · 1.23 KB

File metadata and controls

54 lines (31 loc) · 1.23 KB

audio-scanner

This repo contains a small typescript app using Deno to scan for audio files below a given bitrate.

Getting started

  1. Install deno.
  2. Execute the script by specifying the path, bitratelimit and loglevel.
# this is an example:
deno run --allow-read --allow-env main.ts --path /music/ --bitratelimit 128 --loglevel INFO

Compile to binary

Deno allows to compile projects to binaries. Use deno compile in order to do so.

mkdir -p bin/
deno compile --allow-read --allow-env --output bin/audio-scanner main.ts

Configuration

All flags have defaults and are optional.

--bitratelimit

Bitratelimit must be of type number. The scanner will detect files that are below the given bitrate.

Alias: -b

Default: 320

--help

Help is of type boolean. The scanner will print usage info to the console.

--path

Path must be of type string pointing to an existing directory.

Alias: -p

Default: '.'

--loglevel

Log level must be of type string. Available log levels are ERROR, INFO and DEBUG. Log levels are case-sensitive.

Alias: -l

Default: 'INFO'