This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
{- stack runghc --verbosity info | |
--package hledger-lib | |
--package hledger | |
--package here | |
--package text | |
-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE QuasiQuotes #-} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Some nixpkgs query scripts inspired by #nixos chat. | |
# Goal: find the HASH that will let an install command like | |
# nix-env -i -f https://github.com/NixOS/nixpkgs/archive/HASH.tar.gz -A hledger hledger-web hledger-ui | |
# install the latest available build of the packages, on all platforms of interest. | |
# These scripts don't seem to quite do that but they help. | |
NIXARCHS="darwin linux" | |
HLEDGERPKGS="hledger hledger-ui hledger-web" | |
# show help for the following commands |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fri Jul 26 00:40 2019 Time and Allocation Profiling Report (Final) | |
hledger +RTS -P -RTS bal -V -f examples/1000x1000x10.journal | |
total time = 1.35 secs (1347 ticks @ 1000 us, 1 processor) | |
total alloc = 1,482,942,296 bytes (excludes profiling overheads) | |
COST CENTRE MODULE SRC %time %alloc ticks bytes | |
pricesAtDate.(...) Hledger.Data.Valuation Hledger/Data/Valuation.hs:(121,5)-(128,43) 16.2 36.9 218 547884016 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11:41:36 ~$ nix show-config | |
allow-import-from-derivation = true | |
allow-unsafe-native-code-during-evaluation = false | |
allowed-impure-host-deps = /System/Library /bin/sh /dev /usr/lib | |
allowed-uris = | |
allowed-users = * | |
auto-optimise-store = false | |
build-hook = /nix/store/1jz25hcma179wbpi56blgajw47n5kgqd-nix-2.2.1/libexec/nix/build-remote | |
build-poll-interval = 5 | |
build-users-group = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Test ledger cost/price syntax, lots, revaluation, capital gains | |
P 2019-01-01 ETC 11 EUR | |
P 2019-02-01 ETC 12 EUR | |
; Fluctuating cost/price | |
; @, @@ https://www.ledger-cli.org/3.0/doc/ledger3.html#Posting-cost | |
; { }, {{ }} https://www.ledger-cli.org/3.0/doc/ledger3.html#Commodity-prices | |
; "functionally.. no difference" https://www.ledger-cli.org/3.0/doc/ledger3.html#Prices-versus-costs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include common.rules | |
include plaid.rules | |
account1 sm:assets:bank:wf:pchecking | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~$ nix-env -f channel:nixos-unstable -iA hledger | |
unpacking 'https://nixos.org/channels/nixos-unstable/nixexprs.tar.xz'... | |
replacing old 'hledger-1.14.1' | |
installing 'hledger-1.14.1' | |
these derivations will be built: | |
/nix/store/7wivsw87z43crbg9rabnrxlhrb2f74ad-blaze-builder-0.4.1.0.drv | |
/nix/store/yd9y6rgf5sxq2xpjh915q5nwwmdjlsyj-blaze-markup-0.8.2.2.drv | |
/nix/store/pxnw4hz2g7jzm3kw6pdxn50kwl3qzbjp-hledger-lib-1.14.drv | |
/nix/store/n6mbb0i2l46vi2m3a9kxxs829g3l32a5-blaze-html-0.9.1.1.drv | |
/nix/store/spymmgc5542ggx2d07bdg09a9bf5c7rb-shakespeare-2.0.20.drv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/notes$ ./do.hs | |
Linking do ... | |
~/notes$ ./do | |
Usage: | |
./do.hs install deps & (re)compile this script | |
./do [help] show this help | |
./do time show time status | |
./do money show money status | |
./do lassets show liquid assets | |
./do incexp show monthly income & expenses |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YEAR:=$(shell date +%Y) | |
PRICES=$(YEAR).prices | |
# Fetch latest market prices, add P records to prices file. | |
MARKET_PRICES=~/src/PLAINTEXTACCOUNTING/hledger-scripts/market-prices/market-prices.py <market-prices.json | |
.PHONY: prices prices-dry | |
prices-dry: | |
@$(MARKET_PRICES) |