diff options
-rw-r--r-- | README.md | 48 | ||||
-rw-r--r-- | todo.txt | 5 |
2 files changed, 23 insertions, 30 deletions
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 <some_port> - -# 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 -- <server_ip> > 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`.) diff --git a/todo.txt b/todo.txt index a95fd88..9239493 100644 --- a/todo.txt +++ b/todo.txt @@ -250,3 +250,8 @@ TODO: Support smart playlists right inside of play - and ideally any other usage, e.g. download-playlist. For now the user can just run smart-playlist, save the result, and load that in whatever command they're using. + +TODO: Markdown documentation? Man pages are nice, but aren't really all that + user-friendly (citation needed); for example you can't easily read them + online. (Whereas Markdown documents are easily viewed online, and aren't + hard to read by hand, e.g. with `less doc/foo.md`.) |