Skip to content

Commit

Permalink
proper command line tool deployment
Browse files Browse the repository at this point in the history
- add bin to package.json
- add interpreter header to script
- update readme

we salute you, previous commit hash that started with b00b.

resolves #4.
  • Loading branch information
JC3 committed Sep 27, 2022
1 parent b00bceb commit 2eb6bb9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ convert [dayton audio mic calibration files](http://support.daytonaudio.com/Micr

# installation

you'll need node.js of course; then `npm install dayton2audacity` or download the source and run as usual. i haven't
made any fancy executable scripts or anything so just run it through node.
you can download source and run `node dayton2audacity.js` as usual, or do `npm install -g dayton2audacity` to get a `dayton2audacity` command.

uninstall for the latter option is `npm uninstall -g dayton2audacity`.

# usage

```
node dayton2audacity.js [ infile [ outfile ] ] [ -r <dbV> ]
dayton2audacity [ infile [ outfile ] ] [ -r <dbV> ]
infile name of dayton audio calibration file (stdin if missing)
outfile name of audacity filter curve preset (stdout if missing)
Expand All @@ -26,7 +27,7 @@ node dayton2audacity.js [ infile [ outfile ] ] [ -r <dbV> ]

2. run this program to create an audacity filter curve eq preset text file

3. in audacity: *effect → filter curve → manage → import*, then load the file
3. in audacity: *effect → filter curve → manage → import*, then load the file (newer versions of audacity label the button "presets & settings" instead of "manage").

![filter curve eq](screenshot.png?raw=true "filter curve eq")

Expand All @@ -51,7 +52,7 @@ audacity silently places a limit on the number of points in the filter curve but

## windows + bash + pipes

if you happen to be running this in bash on windows and piping the output to something else, and you get an error `stdout is not a tty`, run it with "node.exe" instead of just "node".
if you happen to be running this as `node dayton2audacity.js` (i.e. not installed) in bash on windows and piping the output to something else, and you get an error `stdout is not a tty`, run it with "node.exe" instead of just "node".

this is weirdness that i can't explain, but it applies to all applications run from bash on windows ([see this](https://stackoverflow.com/a/62532536)).

Expand Down
1 change: 1 addition & 0 deletions dayton2audacity.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env node
import fs from 'fs';
import path from 'path';
import rl from 'readline';
Expand Down
7 changes: 5 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"name": "dayton2audacity",
"version": "1.1.1",
"version": "1.2.0",
"description": "convert dayton audio mic calibration files to audacity filter curve presets",
"main": "dayton2audacity.js",
"bin": {
"dayton2audacity": "./dayton2audacity.js"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down

0 comments on commit 2eb6bb9

Please sign in to comment.