Import Flights from another Database

The import mode allows to import flights from a csv file into the database. This may be helpful, if e.g. flights have been conducted at a different airfield. The csv file should be of the same format, which is created by Startkladde when exporting to csv.

Synopsis

usage: sk.py [-h] [-a ALIAS_FILE] [-c CLUB] [-m {interactive,replace,ignore}]
             [-s SEPARATOR] [-D DATE_FORMAT] [-T TIME_FORMAT]
             [inputFiles [inputFiles ...]]

Import flights into database from csv file(s)

positional arguments:
  inputFiles

optional arguments:
  -h, --help
  -a ALIAS_FILE, --alias-file ALIAS_FILE
                        File containing aliases for planes, pilots and launch
                        methods
  -c CLUB, --club CLUB  Restrict records to pilots/ planes, which belong to
                        the given club
  -m {interactive,replace,ignore}, --mode {interactive,replace,ignore}
                        Conflict handling. Specifies how tohandle existing
                        records
  -s SEPARATOR, --separator SEPARATOR
                        Field separator for csv records
  -D DATE_FORMAT, --date-format DATE_FORMAT
                        Date format (in strftime notation)
  -T TIME_FORMAT, --time-format TIME_FORMAT
                        Time format (in strftime notation)

global arguments:
  -h, --help
  -u USER, --user USER  Specify database username and hostname. Format
                        <user>[@<host>]
  -p [PASSWORD], --password [PASSWORD]
                        Specify password. If no argument is provided, user is
                        prompted.
  -d DATABASE, --database DATABASE
                        Specify name of startkladde database
  -v VERBOSE, --verbose VERBOSE
                        verbose mode setting

Allowed commands are:
  import-flights: Import flights into database from csv file(s)
  stats: Calculate statistics for a given plane
  help: Describe the usage of this program or its subcommands
  set-pilot-email: Set email of pilots
Reads the email address of pilots from a html filein RESI format and adds them to the database
  create-users: Creates a user account for each pilot in databaseOne input file containing the message to be sent to each user shallbe provided. To personalise the message, the fields ${first_name}, ${last_name}, ${email}, ${username} and ${password} can be used.


Program terminated successfully!