From 70462b74635da8eb92c10d51d1a8a1fe06ceb9f1 Mon Sep 17 00:00:00 2001 From: liam4 Date: Wed, 2 Aug 2017 14:41:03 -0300 Subject: Clean up and up-to-date-ify (update?) readme --- README.md | 48 ++++++++++++++++++------------------------------ 1 file changed, 18 insertions(+), 30 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 5956d43..c95ce6e 100644 --- a/README.md +++ b/README.md @@ -3,43 +3,31 @@ A command line program that lets you download music from places and play it. It's also decently powerful. -## Using the thing +## Installation ```bash -# On the server; that is, the device that holds the media: -$ cd my_music_folder -$ python3 -m http.server - -# On the client; that is, the device with http-music: +$ git clone https://github.com/liam4/http-music $ cd http-music -$ yarn # to install Node.js dependencies; you'll also need `avconv` and `mpv`. -$ npm run crawl-http -- > playlist.json -$ node . play # Go! +$ npm install + +# Installs http-music GLOBALLY, i.e., so you can use from in any directory. +$ npm link # (You might need sudo here.) ``` -**Zomg command line arguments documentation????** — Yes; read the docs! There's -a man page for a reason: `man man/http-music.1` (or `man http-music`). +## Usage -There's actually three proper ways to run `http-music`: +``` +# Generate a playlist file, using one of these shell commands.. +$ http-music crawl-http http://some.directory.listing.server/ > playlist.json +$ http-music crawl-local ~/Music/ > playlist.json -* **Run `$ npm link` and then use `$ http-music`.** This gives you the - advantage of having a proper command you can use anywhere; however it does - mean installing to /usr/bin (or wherever your `npm-link` command puts - things). +# Then play it: +$ http-music play -* **Run `$ node .` while `cd`'d into `http-music`.** This is essentially the - same as using `npm-link`, but it requires you to be in the repository folder. - That's alright if you're developing, or just directly downloaded the entire - repository, but probably isn't otherwise useful. +# (You can use `python3 -m http.server` or `python2 -m SimpleHTTPServer` to +# run a quick and easy directory listing, to pass into crawl-http!) +``` -* **Run `$ npm run play`.** (You might need to do `$ npm run http-music play`.) - This way *works*, but it's not suggested; command line arguments need to be - passed after `--`, e.g. `npm run play -- -c -k CoolArtist123` instead of - `node . -c -k CoolArtist123` or `http-music -c -k CoolArtist123`. Use - whatever you prefer, I guess. +## Documentation -**If you're running with `npm run`,** you need to use `--` before any of your -own options, e.g. `npm run play -- -c -k CoolArtist123`. I know, it looks -stupid; but it's really just the way `npm run` works. You're probably better -off with `node .` while `cd`'d into the `http-music` directory, or maybe you'd -rather `npm link` it so you can use it anywhere. +Check out [the man pages](man/). (Or view them with `man http-music`.) -- cgit 1.3.0-6-gf8a5