Commit graph

101 commits

Author SHA1 Message Date
Chris Berkhout
d26c9e5d59 Show INFO messages by default and have one option for more: --verbose. 2021-06-01 19:17:42 +02:00
Chris Berkhout
e05cc1656c Fix logger to follow "No % formatting operation is performed on msg when no args are supplied.". 2021-06-01 19:09:39 +02:00
Chris Berkhout
10982b72d4 Add support for Yahoo! Finance. 2021-06-01 19:04:27 +02:00
Chris Berkhout
925ed42b86 Don't print a blank line for ledger or beancount when there are no prices. 2021-05-31 18:59:38 +02:00
Chris Berkhout
5fdbb480e7 Generate valid GnuCash SQL by not inserting values if there are none. 2021-05-31 18:50:48 +02:00
Chris Berkhout
82c4f45ce0 Check that price numbers aren't too big for GnuCash. 2021-05-31 18:49:42 +02:00
Chris Berkhout
303f5d379a Don't use string manipulation to produce rational numbers. 2021-05-31 17:00:02 +02:00
Chris Berkhout
9996354108 Tidy logging. 2021-05-31 15:10:15 +02:00
Chris Berkhout
229ea109ef Do proper SQL escaping and warn about bad values. 2021-05-31 12:19:57 +02:00
Chris Berkhout
71ed878c2a Tidy. 2021-05-30 15:50:48 +02:00
Chris Berkhout
758d02db8e Tidy comment. 2021-05-30 14:36:08 +02:00
Chris Berkhout
a5346c7796 Extract helper method. 2021-05-30 14:27:13 +02:00
Chris Berkhout
384817ba6e Warn if the requested date range isn't covered. 2021-05-30 14:22:08 +02:00
Chris Berkhout
249d426f9f Generate CSV with the correct escaping. 2021-05-29 22:12:36 +02:00
Chris Berkhout
2c3805e4b0 More tidy. 2021-05-28 22:27:17 +02:00
Chris Berkhout
569935a5e6 Tidy date handling. 2021-05-28 22:11:45 +02:00
Chris Berkhout
0eac8abea3 Improve pair parsing and validation. 2021-05-28 21:50:11 +02:00
Chris Berkhout
46d77e4192 Validate price type. 2021-05-28 21:25:42 +02:00
Chris Berkhout
5d18218588 Misc. 2021-05-28 18:30:41 +02:00
Chris Berkhout
52bfe6928f Rename to Format.fromargs(). 2021-05-28 18:15:56 +02:00
Chris Berkhout
c1c2ab39c2 Extract sources and source from cli. 2021-05-28 18:13:07 +02:00
Chris Berkhout
e27e78d47a Extract fetch from cli, etc. 2021-05-28 17:39:39 +02:00
Chris Berkhout
96970f736c sources and symbols listing has a formatting helper. 2021-05-27 22:41:09 +02:00
Chris Berkhout
a609a2b8c3 Actually, output help to stderr, as argparse itself does. 2021-05-27 20:15:01 +02:00
Chris Berkhout
9c64767ed1 Don't print directly to stdout. 2021-05-27 20:00:29 +02:00
Chris Berkhout
59a17a9896 Extract Format#format_date from outputs. 2021-05-27 19:11:46 +02:00
Chris Berkhout
b26b3494d0 Extract Format#format_quote_amount. 2021-05-27 19:07:56 +02:00
Chris Berkhout
8060c92092 Extract amount formatting to Format. 2021-05-27 18:59:38 +02:00
Chris Berkhout
eca33a3bf6 Handle BrokenPipeError gracefully. 2021-05-27 18:47:42 +02:00
Chris Berkhout
81a723b285 Quantize after invert, not in outputs or formatter. 2021-05-27 18:36:26 +02:00
Chris Berkhout
83e3ebc599 Formatting defaults in help messages come from Format(). 2021-05-27 17:29:58 +02:00
Chris Berkhout
c4df91d066 Log requests as curls. 2021-05-27 16:31:05 +02:00
Chris Berkhout
93ca00f5a5 Sources: extract http reqs from fetch method. 2021-05-27 15:17:55 +02:00
Chris Berkhout
a91309678c Add abstract base classes for sources and outputs. 2021-05-27 13:32:48 +02:00
Chris Berkhout
660b7d709c Move invert and rename base/quote logic to Series. 2021-05-27 13:06:58 +02:00
Chris Berkhout
2c657307a8 Introduce series. 2021-05-27 12:47:12 +02:00
Chris Berkhout
06e0a32514 Switch from namedtuple to dataclass. 2021-05-25 17:42:42 +02:00
Chris Berkhout
03582cf52a Don't use static methods. Use name by_code instead of bycode. 2021-05-25 15:26:24 +02:00
Chris Berkhout
231be6e62c More README tweaks. 2021-05-25 12:57:44 +02:00
Chris Berkhout
024f16f9d5 Update README. 2021-05-25 12:52:25 +02:00
Chris Berkhout
9e5e0ef980 Set default price type names for coindesk and ecb. 2021-05-25 12:51:53 +02:00
Chris Berkhout
e714c37e1f Source object and price type are available during output generation and used. 2021-05-25 12:09:19 +02:00
Chris Berkhout
03ea7664c5 Source start dates are soft limits. 2021-05-25 11:40:12 +02:00
Chris Berkhout
a703b83b00 Add logging. 2021-05-25 11:13:34 +02:00
Chris Berkhout
66ff045f42 Start date is optional. 2021-05-24 21:34:51 +02:00
Chris Berkhout
f69ecf8adb Sources define a start date and price types. 2021-05-24 21:26:39 +02:00
Chris Berkhout
d0cad8d650 Format imports. 2021-05-24 20:52:22 +02:00
Chris Berkhout
f6dceece07 Fix ECB source to get data from before 90 days ago. 2021-05-24 20:52:10 +02:00
Chris Berkhout
80edd6fa02 Use ISO currency names in ECB --symbols output. 2021-05-24 20:51:32 +02:00
Chris Berkhout
d26ba68f2c Don't bother memoizing ISO data yet. 2021-05-24 20:49:50 +02:00