Wiki

Clone wiki

hleofxquotes / Build_20181011_227

Build_20181011_227

Changes

Add support to save the quote results to CSV file. If ${topDir}/plugin directory, hleofxquotes will save the current result to CSV file in ${topDir}/plugin directory after 'Update prices' has completed.

  • prices.csv: has the values as-is from the quote source
  • convertedPrices.csv: has symbol and rate conversion

For example: My topDir is /home/xxx/.hleofxquotes/plugin/runScript. To find your topDir, in hleofxquotes, select menu "Help -> Top dir"

This build has support to run a script after quote request has completed. This tool will check to see if there is file name runScript under the tool ${topDir}/plugin directory. If runScript exists, tool will run this script after the CSV files are saved.

  • On Unix, Mac: make sure your runScript file is executable. Namely
    chmod +x runScript
    

Enable plugin feature

To enable this feature

  • Go to your topDir
  • Create directory name plugin
  • Re-start hleofxquotes, perform a 'Update prices'
  • Check directory plugin for newly created CSV files

Use cases

  • To save quote result to database, create a runScript to parse the CSV file and save data to database of your choices
  • To use the quote result and import it to another program. Create runSript to parse the CSV file and convert the data into the format appropriate for your import tool. Then run the import tool.

runScript

Could be any script, program that your OS can run. Common types: shell, python, Window bat file, OS-specific binary.

Sample CSV file

Date,Symbol,Name,Price,Currency,Volume
"2018-10-11T13:00:01-0700","CSCO","Cisco Systems, Inc.","44.1200","USD","35592228"
"2018-10-11T13:01:29-0700","CVX","Chevron Corporation","118.4300","USD","8589875"
"2018-10-11T13:00:19-0700","GE","General Electric Company","12.7200","USD","116126321"
"2018-10-11T13:01:58-0700","IBM","International Business Machines","139.0200","USD","8709277"
"2018-10-11T13:00:55-0700","KO","Coca-Cola Company (The)","44.6400","USD","17675767"
"2018-10-11T13:00:33-0700","MRK","Merck & Company, Inc.  (new)","68.3700","USD","12873339"
"2018-10-11T13:02:24-0700","PFE","Pfizer, Inc.","42.8100","USD","42028322"
"2018-10-11T13:01:39-0700","PG","Procter & Gamble Company (The)","78.8700","USD","12556517"
"2018-10-11T13:00:15-0700","VZ","Verizon Communications Inc.","53.3300","USD","26334806"
"2018-10-11T13:03:13-0700","XOM","Exxon Mobil Corporation","81.6000","USD","20319350"

Date format

The Date column is in ISO 8601 Datetime with timezone format. See also: https://www.w3.org/TR/NOTE-datetime

Updated