Wiki

Clone wiki

tradedangerous / Setup Guide

Home | Setup Guide | User Guide | CookBook | Technical Documentation | Price Data



Windows Users

Install Python 3.4.2

You can obtain the Python installer here: https://www.python.org/downloads/ TD should also work with versions of Python higher than 3.4.2, but it will not work with earlier versions.

  • The 64-bit version is recommended,
  • Select the option to "Install for All Users" if possible,

pyins1.jpg

  • Use the default install path (C:\Python##) for minimal headaches,
  • At the "Customize Python" screen, click the "Python" entry in the tree view and select "Entire Feature"; this will add Python to the "path", a system-wide way of finding programs which primarily affects command-line tools like TradeDangerous.

pyins2.jpg

Checking that it installed

Open a Command Prompt window (If you've never done this before, either press the Windows key and type 'cmd'), at the prompt, type python --version and verify that it reports a version number matching what you just installed (i.e. 3.4.2 or higher).

pyins4.jpg (Screenshot taken with Windows 10 TP, so it may look a little different)

Get TradeDangerous

Option 1: Download a snapshot

There is no installer or auto-updated for TD because there's no ".exe" file; instead it's all Python code. If you've installed Python correctly, your system will recognize this and you'll be able to use TD without special incantations.

You can download the latest snapshot from here: https://bitbucket.org/kfsone/tradedangerous/downloads, click the "Download Repository" link.

This will download a .zip file, extract the contents to somewhere on your system. I recommend C:\trade. When you're done, if you browse to the folder, you should see a file called "trade.py" in it.

The downside to this approach is that you will have to periodically refresh your copy of TD by hand

Option 2: Use GIT to pull the repository

Don't know git? Don't want to? But would like regular updates? Check out Atlassian Sourcetree. It's free and it makes it a breeze to use Git for basic stuff.

Git users wanting to pull TD from source can clone the repository: https://bitbucket.org/kfsone/tradedangerous/ or http://kfs.org/td/source for short.

Check that it works

Open a Command Prompt window (Windows XP: Start -> Run -> "cmd", Windows 7 and above: Start -> Cmd). You should see a prompt like:

C:\Users\UserName>

Change directory to the directory you put TradeDangerous in (the one with the trade.py file)

C:\Users\UserName> cd \trade
C:\trade\> dir trade.py

Once you are in the right directory and can see "trade.py" you should be able to run the program just by typing it's name:

C:\trade\> trade.py
trade.py: TradeDangerous provides a set of trade database facilities for Elite:Dangerous.

Usage: trade.py <command>
...

If you run into problems:

. Check your directory, . Check your python installation

Proceed to the "Getting Started" section below.

Mac Users

OSX and Python 3.4.2

As of 10.9, OS X ships with Python 2.7.6. DO NOT "upgrade" your system to 3.4.2. I used "homebrew" to install Python 3.4.2, brew install python3, this installed python 3.4 into /usr/local/bin as python3 which unfortunately means having to prefix all the TradeDangerous commands with python3 trade.py ....

There are many ways to work around this, but perhaps the most elegant and cleanest is virtualenv.

  1. Install virtualenv with python's pip installer:
    $ pip3 install virtualenv
    
  2. Create a python 'virtualenv' inside the tradedangerous directory:
    $ cd /where/i/put/trade
    $ virtualenv venv
    
    (you don't have to call it venv, but that's where mine is so you know it'll never suddenly become a module name)
  3. Activate the virtual environment when using TradeDangerous:
    $ cd /where/i/put/trade
    $ source venv/bin/activate
    $ trade.py help
    
  4. The virtual env goes away when you close the shell session or give the deactivate command:
    $ deactivate
    

If you're as lazy as I am, you'll want to make it easier to do this by adding the following to ~/.profile:

#!bash

# Function to enable the TradeDangerous python environment
gotd() {
  cd /where/i/put/trade
  source venv/bin/activate
  echo "Go, go, gadget trade!"
}

close and re-open the terminal window and make ready for trading with

$ gotd
$ trade.py help

Installing TradeDangerous

There is no installer, it's all command line. You can download and unzip the repository here: https://bitbucket.org/kfsone/tradedangerous/downloads, click the "Download Repository" link.

Or you can use a git client to fetch the latest code. To avoid your experience of Elite Dangerous being "I plied the galaxy and learned to use the git command line", I recommend Atlassian Sourcetree as an awesome front-end for GIT. The repository is here: https://bitbucket.org/kfsone/tradedangerous/ or http://kfs.org/td/source for short.

Checking it works

Open a shell and cd to the directory that contains the "trade.py" file from the source. Once you've found it, verify that it works by typing:

$ ./trade.py help
or
$ python3 trade.py help

It should respond with basic usage instructions.

Proceed to the "Getting Started" section below

Linux Users

No. You figure it out yourself. http://kfs.org/td/source/

Getting Started

You can explore what TD can do just by invoking the command using the help system.

$ trade.py --help
# outputs general trade.py help

$ trade.py buy --help
# outputs help on the "buy" command

But before you can do anything useful with TradeDangerous, you'll need price data.

You can obtain price data by:

  1. Entering it yourself as you fly,
  2. Obtaining a ".prices" file from a friend,
  3. Downloading a crowd-sourced ".prices" file

Entering your own price data

To use the built-in (and frankly, a bit crap) UI:

$ trade.py update -G star/station
e.g.
$ trade.py update -G mokosh/bethestation

If you want TD to appear in-front of the game UI all the time, you can add '-F':

$ trade.py update -G -F sol/abraham
or
$ trade.py update -GF sol/abraham

There are also several options that will let you use a text editor instead. See

$ trade.py update --help

Using someone else's price data

There are a number of crowd and small-group sources maintaining their own ".prices" file, one example is Maddavo's site: http://www.davek.com.au/td/.

The "import" sub-command takes a file name or a URL. If you have downloaded .prices from someone and saved them as "shiny-new-data.prices" in your trade directory, or if you have a saved ".prices" fragment from an editor session, or if you have written "shiny-new-data.prices" yourself in notepad by hand, you can import with:

$ trade.py import shiny-new-data.prices

If you have a URL for price data, you can use the URL:

$ trade.py import http://kfs.org/td/prices

Lastly, if you are using a supported crowd-sourced/public .prices site, you can import data using a plugin -- see the plugins directory or obtain a plugin from the crowd-source:

$ trade.py import --plug=maddavo

When importing data from a 3rd party, you may get "Unknown Station" or "Unknown Item" errors, you can ignore these with the "-i" option. The errors will still be reported but processing will continue. Use "-q" to silence them entirely.

The maddavo plugin options to merge his System and Station data into your local database, but this pulls rather a lot of data down:

$ trade.py import --plug=maddavo --opt=systems --opt=stations

This is a merge so any local systems/stations you have added will not be lost; if you have filled in a value that is still blank/unknown in maddavo's data, your value will be kept. However, if there is a conflict, for example if maddavo's says "Abraham Lincoln" is 150 ls-from-star and your db says it is 120, your local value will be overwritten.

Home | Setup Guide | User Guide | CookBook | Technical Documentation | Price Data

Updated