From a5dbd81cad5df69cff530a3a80c30a3aa45e80f3 Mon Sep 17 00:00:00 2001 From: Adithya Chari Date: Wed, 27 Nov 2019 14:16:03 -0600 Subject: [PATCH 1/3] Update main.go --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 4d696e7..2c28774 100644 --- a/main.go +++ b/main.go @@ -31,7 +31,7 @@ func main() { } func GetPriceString(ticker string) string { - resp, err := http.Get("https://api.worldtradingdata.com/api/v1/stock?symbol=" + ticker + "&api_token=zkyqseprRGFE2qN0sck4QiFcmyw0kJirCeXKYcXpGM80FEBmitI03aLT31RJ") + resp, err := http.Get("https://api.worldtradingdata.com/api/v1/stock?symbol=" + ticker + "&api_token=demo") if err != nil { log.Fatalf("Price request of ticker %s failed with %s\n", ticker, err) } From 02473d80a741756481d517d12d443f362efb000a Mon Sep 17 00:00:00 2001 From: Adithya Chari Date: Wed, 27 Nov 2019 14:22:05 -0600 Subject: [PATCH 2/3] Create README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..f26aab8 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# LedgerStockUpdate + +This application locates any stocks you have in your [ledger-cli](ledger-cli.org) file, then generates a price database of those stocks compatible with the application. From 6f289b75a9cb27b27222ea0547ad49e143165743 Mon Sep 17 00:00:00 2001 From: Adithya Chari Date: Wed, 27 Nov 2019 14:30:02 -0600 Subject: [PATCH 3/3] Update README.md --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index f26aab8..bc5410d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,17 @@ # LedgerStockUpdate This application locates any stocks you have in your [ledger-cli](ledger-cli.org) file, then generates a price database of those stocks compatible with the application. + +### Usage + +Build the go file, and run as follows: + +```bash +./[name of executable] -f=[ledger file] -p=[price database file (to create or update)] +``` + +This should spit out a price database file, which can then be used to calculate the market value in ledger as follows: + +```bash +ledger -f [ledger file] --price-db [price database file] -V bal +```