README.mdView |
---|
129 | 129 | |
130 | 130 | Merge multiple ledger journals into one, in time order, without detecting |
131 | 131 | duplicates. |
132 | 132 | |
| 133 | +#### `usd-bonds-interest` |
| 134 | + |
| 135 | +Retrieve accrued interest on US Treasury savings bonds. This script queries the |
| 136 | +[Savings Bond Calculator][sbc] on the TreasuryDirect website and looks up the |
| 137 | +difference in total value of some bonds between two dates. To use the script |
| 138 | +you have to set an environmental variable `BONDS_QUERY` to the query string you |
| 139 | +would submit to the savings bond calculator. To figure out what value to use |
| 140 | +for the query string, do the following: |
| 141 | + |
| 142 | +- Go to the [Savings Bond Calculator][sbc] page |
| 143 | +- Add the bonds using the form |
| 144 | +- Right click somewhere in the form and choose "Inspect Element" to open the |
| 145 | + web inspector |
| 146 | +- Find the `<form>` element in the web inspector |
| 147 | +- Change the `method` attribute of the `<form>` from `post` to `get` |
| 148 | +- Close the web inspector |
| 149 | +- Submit the form using the View or Save button |
| 150 | +- Get the URL of the resulting page. Copy the query string starting at |
| 151 | + `Series=` (not including `RedemptionDate=...&`) |
| 152 | +- Set the env var to the copied query string e.g. by executing `export |
| 153 | + BONDS_QUERY="..."` |
| 154 | +- Now you can run the script, e.g. `ust-bonds-interest 11/2015 12/2015` to get |
| 155 | + interested accrued between 11/2015 and 12/2015. |
| 156 | + |
| 157 | +[sbc]: http://www.treasurydirect.gov/BC/SBCPrice |
| 158 | + |
| 159 | +*TODO: automate more of this* |
| 160 | + |
133 | 161 | Similar projects |
134 | 162 | ---------------- |
135 | 163 | |
136 | 164 | * [ledger-bitcoin](https://github.com/profmaad/ledger-bitcoin) by |