/whatcd-cli

A command line interface for browsing, searching, and downloading from what.cd.

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

whatcd-cli https://travis-ci.org/CodyReichert/whatcd-cli.svg?branch=master http://img.shields.io/badge/license-GNU%20GPLv3-red.svg

whatcd-cli is a command line interface for browsing, searching, and downloading from what.cd.

Install

NPM install

The quickest way to install is to get the latest version from npm:

$ npm install -g whatcd-cli

Latest from Github

or get the latest changes from github

$ npm install -g CodyReichert/whatcd-cli

Read the alternative installation section below for more help with installing.

Running

You can start whatcd-cli by running:

$ whatcd

You can enter your username and password when prompted, or you can create a configuration file. Read more below.

Configuration

You can store your what.cd credentials in a .whatcd config file. Store the file in either `~/.whatcd` or `/home/<username>/.whatcd`. Use the following format:

Config file

module.exports =  {
  username: "Your what.cd username",
  password: "Your what.cd password",
  torrentDirectory: "/path/to/save/torrents/"
}

The torrentDirectory is where whatcd-cli will save all torrent files. My recommendation is to have your torrent client automatically start files added to this directory.

Running without a config file

whatcd-cli does not require you to keep a plain text configuration. If you start whatcd-cli without a config file, it will simply prompt you for your username and password. If you download a file in this mode, it will always download to the current working directory.

Usage

This command line interface allows you to browse what.cd torrents, arists, and albums (and a couple other things) directly from the command line. Currently, most of the searches you can make on what.cd are supported.

To search, you can enter a query from the main menu (which will match all albums, artists, singles, etc), or you can choose one of the advanced search options:

  • Download file - D or d
    • Enter this from the main menu to download a torrent file. You will be prompted for the ID of the torrent. It will save to your torrentsDirectory set in your settings.js file.
  • Top 10 torrents of the day - Top or top
    • Enter this from the main menu to view the top 10 most active torrents of the day.
  • Similar Artists - S or s
    • Enter this from the main menu to find similar artists. You will be prompted for an artist name. It will show the top 10 (or less) matches.
  • Artist search - A or a
    • Not yet implemented.
  • Torrent search - T or t
    • Not yet implemented.

Roadmap and Future Development

Below is a list of features and changes that I would personally like to see happen. Feel free to create an issue with a feature request to get it added to the roadmap. Or even better, create a pull request implementing the feature you want.

Command line API (non-interactive mode)

One of the first things I want to do is have single command interactions, so the interactive mode is optional. So you could just do something like this to download a file:

$ whatcd -d "torrent-id"

or this to get album an album in a certain format

$ whatcd -a "Brand New" -b "Daisy" -f "FLAC"

Alternative installations

Installing without NPM

If you don’t have or want to use npm, you can clone the repo and run directly with node:

git clone git@github.com:CodyReichert/whatcd-cli
cd whatcd-cli/
npm install
node src/whatcd.js

Follow the config files steps above

Latest stable release from github

The npm install command above will install the latest changes. If you have problems install the lastest stable release instead.

npm install -g CodyReichert/whatcd-cli/0.2.0

Licensing and Disclaimer

GNU General Public License v3.0

This software is licensed under the GNU General Publice License Version 3.0

WhatCD-cli is a command-line interface for browsing and downloading what.cd torrents.

Copyright (C) 2014 Cody Reichert

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/

For any additional information or questions, you can contact me at: codyreichert@gmail.com