Skip to content

Commit

Permalink
Little tidy up of import.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kfsone committed Aug 14, 2014
1 parent 39fc046 commit c320c29
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion import.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,35 @@
#!/usr/bin/env python
#
# Tool for importing data into the TradeDangerous database from a fairly
# simple text file, 'import.txt'.
#
# The first none white-space character of a line determines the line type:
# '#' = comment,
# '*' = add star and distances,
# '@' = select station,
# '-' = select item category,
# All other lines are treated as specifying an item price:
# <item name> <station paying cr>
# or for an item that can be bought here:
# <item name> <station paying cr> <station asking cr>
# Blank lines are ignored.
#
# Add star line:
# *<star name>/<system name>:<other star>@<lightyears>
# Examples:
# *Aulin/Enterprise:[email protected]
# *Dahan/Gateway:[email protected],[email protected],Hermitage@14ly,[email protected]
#
# Category and Item names use partial matching.
# -che, -CheMiCAlS, -micals
# all match the "chemicals" category
# Don't include whitespaces, so
# dom., dom.a, dom.appl
# would match the "dom. appliances" item (but only if you have selected
# the category at the moment)

import re
from tradedb import *
import pprint

rejectUnknown = False

Expand Down

0 comments on commit c320c29

Please sign in to comment.