-
Notifications
You must be signed in to change notification settings - Fork 161
Running from source
You will currently need at least Python 3.7.x to run stable
code. In order to run
develop
you will need Python 3.8.x or higher (3.9.x has had some testing).
-
On MacOS you will likely need a Python install from the official Python website, rather than using HomeBrew. See #670 Update requirements.txt for MacOS for discussion about this.
-
You have two choices:
-
Using a zip of the latest stable source. Download and extract the latest stable source code.
-
OR Clone and checkout the source using git:
cd <directory you want ot be the parent of the source>
git clone https://github.com/EDCD/EDMarketConnector.git
cd EDMarketConnector
git checkout stable
As per Contributing.md
stable
will contain the latest released code, or possibly some extra commits leading up to the next release. If you're feeling slightly braver you could use the main branch source code (orgit checkout main
) instead which might contain newer code that we consider stable enough for the next release.NB: Do not use the
master
branch, it's almost empty! The name is deprecated and we usemain
instead. -
-
Ensure you have 'pip' or 'pip3' installed, see Installing pip.
-
Ensure additional necessary Python modules are installed with
pip install -r requirements.txt
.- Note that on Debian (at least up to and including 10.x aka 'Buster') you'll
pip3 install -r requirements.txt
. - If you get 'command not found' or similar for the 'pip' command then
first try:
python -m pip --user install pip
.
- Note that on Debian (at least up to and including 10.x aka 'Buster') you'll
-
Ensure you have tkinter installed if required (such as on Linux)
- On Debian / Ubuntu / other Debian derivatives the package you want is
python3-tk
.
- On Debian / Ubuntu / other Debian derivatives the package you want is
-
Run this application:
- Linux:
./EDMarketConnector.py
. - Mac:
python ./EDMarketConnector.py
. - Windows:
EDMarketConnector.py
.
- Linux:
The command-line program EDMC.py
writes the current system and station (if docked) to stdout and optionally writes player status, ship locations, ship loadout and/or station data to file.
This program requires that the user has performed setup and verification through the app.
Arguments:
-h, --help show this help message and exit
-v, --version print program version and exit
-a FILE write ship loadout to FILE in Companion API json format
-e FILE write ship loadout to FILE in E:D Shipyard plain text format
-l FILE write ship locations to FILE in CSV format
-m FILE write station commodity market data to FILE in CSV format
-o FILE write station outfitting data to FILE in CSV format
-s FILE write station shipyard data to FILE in CSV format
-t FILE write player status to FILE in CSV format
-d FILE write raw JSON data to FILE
-n send data to EDDN
-p CMDR Returns data from the specified player account
The program returns one of the following exit codes. Further information may be written to stderr.
- Success. Note that this doesn't necessarily mean that any requested output files have been produced - for example if the current station doesn't support the facilities for which data was requested.
- Server is down.
- Invalid Credentials.
- Verification Required.
- Server is lagging.
- I/O or other OS error.