Command (at line 20): hledger -f- check Expected stderr:
Got stderr: hledger: Error: -:1:1:
Hi-lock: ((“alloc=\w+” (0 ‘hi-blue-b t))) Hi-lock: ((“time=\w\w\w.*” (0 ‘hi-red-b))) Hi-lock: ((“time=\w\w\w\w.*” (0 ‘highlight))) Hi-lock: end
hledger-lib-1.25.99: unregistering (–force-dirty specified) hledger-lib> configure (lib) Configuring hledger-lib-1.25.99…
Somewhat-repeatable recipes for getting a reliable haskell build toolchain installed as of 2022Q1. You might need to make adjustments, eg on Windows, but hopefully not too many.
Current most popular method. Best way to get native arm tools on mac m1. You can use it to install the compiler ghc
, build tools cabal
and/or stack
, and IDE/editor language server hls
(under $HOME/.ghcup
). Actively maintained.
#!/usr/bin/env bash | |
# hledger-number - try to extract just one single machine-readable number from hledger: | |
# the grand total of `hledger balance` run with any provided arguments. | |
# Requires hledger 1.24 or newer (the December 2021 release, see https://hledger.org/download.html ) | |
# https://gist.github.com/simonmichael/feee7fc1567c5f10355f952b87bd3090 | |
VALUATION_COMMODITY="$" | |
hledger bal -0 -N -X "$VALUATION_COMMODITY" --infer-market-prices -c "$VALUATION_COMMODITY 1000" --layout=bare "$@" | awk '{print $1}' | |
# Tired of complex financial reports ? This is a silly but fun and |
#!/usr/bin/env stack script --compile --resolver lts-18 --verbosity=warn | |
{-# OPTIONS_GHC -Wno-missing-signatures -Wno-unused-imports #-} | |
{-# LANGUAGE RecordWildCards #-} | |
-- ski.hs - Downhill Skier Driver Space Pilot ! | |
import Control.Concurrent | |
import Control.Monad | |
-- import Data.Char | |
-- import Data.List |
; avodonosov problem, HN 2021-09-05 | |
; part of https://gist.github.com/simonmichael/3bb42cd82b4afd437305d10ad914b9ec | |
; "For example | |
; Jan 1 | |
; Received 1000 EUR for a contract | |
; The rate 1 EUR = 2 BYN | |
; Jan 2 | |
; Exchanged 300 EUR to BYN | |
; The rate 1 EUR = 2.1 BYN |
; avodonosov problem, from https://news.ycombinator.com/item?id=28424432 | |
; For example | |
; Jan 1 | |
; Received 1000 EUR for a contract | |
; The rate 1 EUR = 2 BYN | |
; Jan 2 | |
; Exchanged 300 EUR to BYN | |
; The rate 1 EUR = 2.1 BYN | |
; Jan 3 | |
; Received 2000 EUR for a contract |
# Perform any auto-commits that are due, in the proper order. | |
autocommit: \ | |
autocommit-time \ | |
autocommit-txns \ | |
autocommit-misc | |
# Auto-commit any timelog changes. | |
autocommit-time: | |
@echo `date` $@ >>[email protected] | |
@( git commit -qm 'time (auto)' $(TIMEDOT) | grep -E '(^\[|file changed)' ) >>[email protected] \ |
#!/bin/bash | |
# Download recent transaction history from Paypal as JSON, | |
# and print on stdout. | |
# | |
# Requirements: a Paypal developer account, curl, jq (just for pretty-printing) | |
# | |
# brew install jq | |
# | |
# Limitations: | |
# - sees only the last 30 days of history |
#!/bin/bash | |
# Download last 30 days of transaction history from Paypal as CSV. | |
# brew install jsonpp jq | |
# npm install -g json2csv | |
# credentials from an API app created in https://developer.paypal.com | |
CLIENT_ID= | |
SECRET= |