Sure, a typical usage would be:
tablesync -i -c test.csv -t incident_data ~/db/sqlite.db
tablesync -i -c test.csv -t incident_data ~/db/sqlite.db
To copy to clipboard, switch view to plain text mode
Here's also the "tablesync -h" output that is automatically built:
mbp02:~/develop/tablesync[develop]$ tablesync -h
Usage: tablesync [options] db
Options:
-h, --help Displays this help.
-v, --version Displays version information.
-c, --csvfile <csvfile> The CSV file with desired fields.
-i, --import Import the CSV file into tablename
-s, --sync Sync tablename with the CSV file fields.
-t, --table <tablename> The target table name.
Arguments:
db The database file to process.
mbp02:~/develop/tablesync[develop]$ tablesync -h
Usage: tablesync [options] db
Options:
-h, --help Displays this help.
-v, --version Displays version information.
-c, --csvfile <csvfile> The CSV file with desired fields.
-i, --import Import the CSV file into tablename
-s, --sync Sync tablename with the CSV file fields.
-t, --table <tablename> The target table name.
Arguments:
db The database file to process.
To copy to clipboard, switch view to plain text mode
As shown above, the only positional argument is the last, so that requires that all cmd line options that start with a "-" must precede any positional arguments. The Qt behavior with QCommandLineParser seems pretty sane/normal to me, so I'm quite happy to use it rather than have to deal with the differences between getopt(s) on different OS platforms, etc.
Bookmarks