- i use a
bash run
style script in my hledger journal repo, so that's part of why it is the way it is (https://james-forbes.com/posts/alternative-to-npm-scripts). you don't have to do that for this to work - basically, the idea is that since the canonical state of my journal is in git anyway, and i only need read access, not write, then i don't need a fancy server to see my hledger reports. i can just generate static files based on the latest push to main
- these can be whatever you want, even just text output, but hledger's latest html output format does a lot of heavy lifting
- the bash script has a
build()
function, which calls a bunch of functions to generate files and tweak them for use as a static website. you can look through the bash code for the details but at a high level: - i generate the reports i want and output them
- i generate a register view of each account so i can dig down to individual txns if i want to
- i generate an index page
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
import { pipe, Schema, Ef, A, O, flow } from "./toolbox"; | |
import { CannotConnectToHost } from "./errors"; | |
import { | |
useMutation, | |
UseMutationOptions, | |
useQuery, | |
UseQueryOptions, | |
QueryKey, | |
} from "@tanstack/react-query"; |
For each selection, I have pulled out code snippets. The full files that these snippets are from are provided below. All the code in the snippets is code that I claim, whether I wrote it myself or collaborated with someone else.
export type Result<TSuccess> =
| {
kind: "success";