-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from __future__ import absolute_import, with_statement, print_function, division, unicode_literals | ||
from commands.parsing import MutuallyExclusiveGroup, ParseArgument | ||
from commands.exceptions import * | ||
import math | ||
|
||
import cache | ||
from pathlib import Path | ||
|
||
###################################################################### | ||
# Parser config | ||
|
||
help=( | ||
"Imports price data from a '.prices' format file " | ||
"without affecting data for stations not included " | ||
"in the import file." | ||
) | ||
name='import' | ||
epilog=None | ||
wantsTradeDB=True | ||
arguments = [ | ||
ParseArgument('filename', help='Name of the file to read.', type=str), | ||
] | ||
switches = [ | ||
] | ||
|
||
###################################################################### | ||
# Perform query and populate result set | ||
|
||
def run(results, cmdenv, tdb): | ||
filePath = Path(cmdenv.filename) | ||
cache.importDataFromFile(tdb, cmdenv, filePath) | ||
return None | ||
|