Brett Smith
8ab2373ba1
config: Assume abbreviated dates are in the past.
2017-06-22 15:54:24 -04:00
Martin Michlmayr
419f52abe3
Fix typo in variable name
2017-06-13 09:24:18 -04:00
Brett Smith
97222c2f75
setup: New version for recent changes.
2017-06-09 13:22:37 -04:00
Brett Smith
936237eceb
config: Nicer determination of default currency for converting/signing.
...
base defaults to USD more as an API restriction than anything else, so avoid
using it as a default setting. Instead, use the user's books denomination
or locale setting.
2017-06-09 13:22:12 -04:00
Brett Smith
dfac0cf853
config: Improve wording consistency of date format help.
2017-06-09 13:14:06 -04:00
Brett Smith
baa2e883cd
config: historical command accepts just two currency arguments.
...
This shows the rates between two currencies without converting a specific
amount.
2017-06-09 13:11:16 -04:00
Brett Smith
55f5833aa0
historical: Add a setting to denominate Ledger conversions.
...
This makes conversion output easier to add to ledgers directly.
2017-06-09 11:06:51 -04:00
Brett Smith
992c91fc90
config: Nicer implementation of date parsing.
...
Keeps less local state through the function, to reduce the risk of that
state getting inconsistent.
2017-06-08 12:12:49 -04:00
Brett Smith
385a492ae7
config: More flexible date parsing.
...
* Accept partial dates, filling in the current year and month as needed.
* Accept more separators.
2017-06-08 09:52:47 -04:00
Brett Smith
17ff9a8b71
setup.py: Add oxrlib.commands package.
2017-06-01 14:01:11 -04:00
Brett Smith
0b6edde60c
README: Markup fixes throughout.
2017-05-22 11:24:43 -04:00
Brett Smith
c8000a8a74
config: Print usage if no subcommand is given.
2017-05-19 10:21:33 -04:00
Brett Smith
b1fda6a647
config: Touch up historical --help output throughout.
2017-05-19 10:05:53 -04:00
Brett Smith
9be9b07a8d
historical: Add Ledger output formatting.
2017-05-18 13:49:05 -04:00
Brett Smith
5b7f2b92a1
rate: Make sure to parse ints as Decimal objects too.
2017-05-18 13:33:32 -04:00
Brett Smith
ec3b9e83f8
historical: Format amounts according to currency convention.
2017-05-17 17:38:45 -04:00
Brett Smith
84bc0c7e84
tests: Rename TestCacheFile to avoid pytest warnings.
2017-05-17 17:33:15 -04:00
Brett Smith
348b82e087
.gitignore: setup.py: Integrate pytest to run tests.
2017-05-17 17:22:39 -04:00
Brett Smith
a6e46b0cca
Documentation: Add README and example config.
2017-05-17 16:23:56 -04:00
Brett Smith
63b0ad3c76
Configuration: Improve --help output throughout.
2017-05-17 15:34:51 -04:00
Brett Smith
5fb01151d1
.gitignore: Ignore egg-info.
2017-05-17 15:31:24 -04:00
Brett Smith
8e5cb0642f
CacheWriter: Update tests for previous open file change.
2017-05-17 15:29:21 -04:00
Brett Smith
08840e6757
setup.py: Start script.
2017-05-17 14:42:22 -04:00
Brett Smith
cff18d9d96
LICENSE: Add license.
2017-05-17 14:40:50 -04:00
Brett Smith
b49356bcb6
__main__: Start module to run the tool.
2017-05-17 14:40:43 -04:00
Brett Smith
3b5a563ef6
historical: Write results to cache when appropriate.
2017-05-17 12:56:19 -04:00
Brett Smith
7ae8c359e0
CacheFile opens the file immediately.
...
This is necessary to work correctly with the error-catching logic of LoaderChain.
2017-05-17 12:52:37 -04:00
Brett Smith
cdc748c14f
config: Fix type of path passed to cache classes.
2017-05-17 12:52:02 -04:00
Brett Smith
620816fe72
config: Fix date_from type return value.
2017-05-17 12:45:19 -04:00
Brett Smith
f9c045a63e
historical: Switch to relative import.
2017-05-17 12:36:04 -04:00
Brett Smith
18f7ea7038
Configuration: Set up CacheWriter.
2017-05-17 12:29:50 -04:00
Brett Smith
351811bb30
LoaderChain: Add should_cache() method.
2017-05-17 12:27:20 -04:00
Brett Smith
08073f752b
Configuration: Parse more conversion arguments for historical subcommand.
2017-05-17 11:32:05 -04:00
Brett Smith
667c214e91
historical: Add main code for historical subcommand.
2017-05-17 08:48:40 -04:00
Brett Smith
9d47238245
rate: Add Rate.convert method.
2017-05-16 12:26:32 -04:00
Brett Smith
0120e4ce5a
config: Begin Configuration class.
2017-05-16 09:19:37 -04:00
Brett Smith
6a416b162d
cache: Add CacheWriter.save_rate method.
2017-05-12 13:48:21 -04:00
Brett Smith
2d482bb7b0
cache: Add CacheWriter class.
2017-05-12 13:27:45 -04:00
Brett Smith
eba27c16ae
cache: Refactor out CacheBase from FileCache.
...
Now we can implement CacheWriter from the same base.
2017-05-12 11:58:35 -04:00
Brett Smith
4cbd890992
errors: Start module.
2017-05-12 08:12:21 -04:00
Brett Smith
1927a18120
loaders: Add LoaderChain.
2017-05-12 07:40:27 -04:00
Brett Smith
10b0a818d7
loaders: Add OXRAPIRequest.
2017-05-09 14:51:00 -04:00
Brett Smith
7912a37074
tests: Let FileCache tests be in their own file.
...
These tests aren't likely to share much code with other loader tests.
2017-05-09 11:17:53 -04:00
Brett Smith
744479013d
loaders: Introduce common exceptions.
2017-05-09 10:35:20 -04:00
Brett Smith
d1ba2dbc6a
loaders: Initial commit.
2017-05-09 10:32:23 -04:00
Brett Smith
a181166311
rate: Initial commit.
2017-05-09 09:56:08 -04:00