summaryrefslogtreecommitdiff
path: root/main.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2003-10-01 05:04:37 +0000
committerJohn Wiegley <johnw@newartisans.com>2003-10-01 05:04:37 +0000
commit9d5172792af05321a05e63b186f477c2af93b2ea (patch)
tree62d939d05ae08413f19b70f5e34d11c97e663931 /main.cc
parentf93341edfccba98c7c709dfd172467b37017cc3f (diff)
downloadfork-ledger-9d5172792af05321a05e63b186f477c2af93b2ea.tar.gz
fork-ledger-9d5172792af05321a05e63b186f477c2af93b2ea.tar.bz2
fork-ledger-9d5172792af05321a05e63b186f477c2af93b2ea.zip
Added support for dynamic downloading of stock quote information.
Diffstat (limited to 'main.cc')
-rw-r--r--main.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/main.cc b/main.cc
index 1b2884ec..b2c2fd6a 100644
--- a/main.cc
+++ b/main.cc
@@ -11,7 +11,8 @@ namespace ledger {
extern void print_ledger(int argc, char *argv[], std::ostream& out);
extern void equity_ledger(int argc, char **argv, std::ostream& out);
- bool show_cleared;
+ bool show_cleared;
+ bool get_quotes;
std::time_t begin_date;
bool have_beginning;
@@ -57,7 +58,7 @@ int main(int argc, char *argv[])
show_cleared = false;
int c;
- while (-1 != (c = getopt(argc, argv, "+b:e:cChHwf:i:p:"))) {
+ while (-1 != (c = getopt(argc, argv, "+b:e:cChHwf:i:p:P"))) {
switch (char(c)) {
case 'b': {
struct tm * when = getdate(optarg);
@@ -116,6 +117,10 @@ int main(int argc, char *argv[])
main_ledger.record_price(optarg);
}
break;
+
+ case 'P':
+ get_quotes = true;
+ break;
}
}
@@ -135,6 +140,9 @@ int main(int argc, char *argv[])
#endif
<< " -i FILE read the list of inclusion regexps from FILE" << std::endl
<< " -p FILE read the list of prices from FILE" << std::endl
+ << " -P download price quotes from the Internet" << std::endl
+ << " (this works by running the command \"getquote SYMBOL\")"
+ << std::endl
<< " -w print out warnings where applicable" << std::endl
<< std::endl
<< "commands:" << std::endl