Commit Graph

13477 Commits

Author SHA1 Message Date
Simon Michael
d8e190e576 ;bin:hledger-jj: updates 2025-02-27 21:56:11 -10:00
Simon Michael
ebc6f06eef ;bin:readme: edits 2025-02-27 21:45:17 -10:00
Simon Michael
76114385e7 ;bin: edits 2025-02-27 21:40:17 -10:00
Simon Michael
f34a0d6248 ;feat:bin: hledger-jj, another VCS CLI using newer tech (jj, ysh) 2025-02-27 21:27:58 -10:00
Simon Michael
a65900c62d imp:cli: recognise .ysh, .osh file extensions as addons 2025-02-27 21:26:57 -10:00
Simon Michael
97f831f741 ;bin:hledger-git: run pass-through commands in the right repo 2025-02-27 17:10:44 -10:00
Simon Michael
956a2f6565 ;doc: manuals: update command options 2025-02-27 15:26:17 -10:00
Simon Michael
b629c31f9a ;doc: manuals: remove obsolete mentions of COLUMNS [#2340] 2025-02-27 15:26:17 -10:00
Simon Michael
d346e56b79 dev: fix warnings, update yaml file, edit [#2340] 2025-02-27 13:41:48 -10:00
gesh
3fa39c17b3 dev: Remove usage of partial NE.fromList
At this point, we're just giving a default for unpacking a Maybe
2025-02-27 13:41:48 -10:00
gesh
cde77eace0 fix: Remove references to $COLUMNS
As noted in Hledger.Utils.IO, COLUMNS is a bashism that isn't
particularly usable for our purposes (for one thing, it isn't updated
when the terminal is resized)
2025-02-27 13:41:48 -10:00
gesh
a24c39f13f fix: Use POSIX API to compute tty width (#2332)
On some systems, TERM is set to a value that doesn't have a valid
terminfo entry. Rather than hackily fall back on a value for TERM that
appears to work in most contexts (TERM=dumb) but which isn't guaranteed
anywhere to be valid, use proper POSIX ioctls to get the tty width.

This has the added bonus of also working on Windows.

In fact, we already settled on computing the terminal size in this way
in hledger-lib, so this commit centralizes the choice of the logic
there.

Also added a note for alternative methods and their tradeoffs, in case
this turns out to be fragile on some systems.
2025-02-27 13:41:48 -10:00
Thomas Miedema
1ca90065db ;dev: fix hledger/bench/bench.hs
In commit 603b2e9f09, the signature of `readJournalFile` changed. Ever
since, `bench/bench.hs` did not compile. Fix it by using the "easy"
function `readJournalFile'` instead, which assumes default options and
returns in the IO monad.
2025-02-27 07:32:44 -10:00
Thomas Miedema
3392176993 ;dev: update bench*.sh files
Since commit 4c7abc3d2f, `just samplejournals` creates sample journals
in the examples/ directory with a different naming scheme (e.g.
`1ktxns-1kaccts.journal` instead of `1000x1000x10.journal`). Reflect
this change in the bench*.sh files. Also fix `just bench-throughput`.
2025-02-27 07:32:44 -10:00
Thomas Miedema
5129a94bd7
;cln: unittest.hs: remove bothersome PackageImports (#2337)
When running `cd hledger-lib && ghci test/unittest.hs`, ghci complains
with:

```
  test/unittest.hs:7:1: error:
      Could not find module ‘Hledger’
      It is not a module in the current program, or in any known package.
    |
  7 | import "hledger-lib" Hledger (tests_Hledger)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  Failed, no modules loaded.
```

This commit removes the "hledger-lib" package-qualified import, such
that above ghci command works as expected.

However, there is a comment in hledger-lib/test/unittest.hs that says:

> package-qualified import to avoid cabal missing-home-modules warning
> (and double-building ?)

The missing-home-modules warning and the double building can indeed be
reproduced by running (after removing the "hledger-lib"
package-qualified import): `cd hledger-lib && cabal build unittest`. It
will first build `hledger-lib`, then show a warning about
missing-home-modules, and then build `hledger-lib` again.

After comparing the unittest sections of hledger.cabal and
hledger-lib.cabal, the solution turned out to be to remove `./` from
hs-source-dirs for unittest. Don't ask me why though!

Overall it's a nice cleanup.
2025-02-26 11:54:59 -10:00
Simon Michael
f288a7d801 ;dev: ignores 2025-02-25 10:59:12 -10:00
Simon Michael
d807d7bd0c ;imp:bal: improve --layout option description 2025-02-23 12:25:48 -10:00
Simon Michael
d4884def4b ;doc:shell completions: mention zsh; cleanups 2025-02-21 17:16:40 -10:00
Simon Michael
afd6540b63 ;tools:just: generate module, package diagrams 2025-02-18 13:12:54 -10:00
Simon Michael
7ef96d4bd1 fix:bal --budget: don't let costs prevent showing a percentage [#2327] 2025-02-18 12:17:47 -10:00
Simon Michael
a882268dd8 ;doc:dev: updates, cleanups 2025-02-18 00:10:02 -10:00
Simon Michael
ce1c399ef1 ;doc:dev: star history 2025-02-17 23:43:06 -10:00
Simon Michael
f3a23e406d ;doc: ACHIEVEMENTS 2025-02-17 23:40:56 -10:00
Simon Michael
40461910c4 ;doc:dev: update stars rank 2025-02-17 23:17:30 -10:00
Simon Michael
daf8301ade ;pkg:stack: drop obsolete systemencoding flag [#2319] 2025-02-16 07:19:09 -10:00
Simon Michael
75c0197c08 pkg:stack: use latest snapshots 2025-02-15 15:22:33 -10:00
Simon Michael
cf198652f9 pkg:ui: allow brick 2.8 2025-02-15 15:22:33 -10:00
Simon Michael
35df9576ec doc:text encoding, csv encoding: cleanups [#2319] 2025-02-15 14:49:00 -10:00
Simon Michael
cdf6ce072d ;examples: test files for CSV encoding [#2319] 2025-02-15 14:48:30 -10:00
Joschua Kesper
5114962b2a feat:csv: add an encoding rule, allowing non-UTF8 CSV to be read [#2319]
Previously, hledger could read CSV files containing non-ascii
characters only if they are UTF8-encoded.  Now there is a new CSV
rule, encoding ENCODING, which allows reading CSV files with other
encodings.

This adds a dependency on the encoding library, which supports fewer
encodings than text-icu but does not require a third-party C library.
To avoid build issues on various platforms, we require version 0.10+.

This adds some use of the ImplicitParams language extension, required
by encoding's API, but only in a small code region.

This also changes the type of Reader's rReadFn; it now takes
a `Handle` rather than a `Text`, allowing more flexibility.
2025-02-15 14:48:30 -10:00
Simon Michael
d68a832d1c ;examples: some sample hledger run scripts 2025-02-13 16:21:14 -10:00
Dmitry Astapov
d84050ec05
feat:run: run multiple commands efficiently, as a script or at a REPL (Dmitry Astapov, #2323) 2025-02-13 16:13:07 -10:00
Dmitry Astapov
9597210556 script: balance-as-budget properly applies commodity styles now 2025-02-11 11:04:51 -10:00
Simon Michael
b12d7cb05b ;dev: fix Shake.hs typo 2025-02-11 08:26:53 -10:00
Simon Michael
fbbe897133 ;doc:hledger:cost/lot notations: cleanups 2025-02-06 12:16:10 -10:00
Simon Michael
0194ce3b42 ;doc:MOCKUPS: cleanup, move lot notes to Lot tracking page 2025-02-06 11:27:25 -10:00
Simon Michael
d435cf2ab4 ;doc:value reporting: edits 2025-02-05 10:38:13 -10:00
Simon Michael
3f1b6e6c8b ;doc:value reporting: edits 2025-02-05 10:35:23 -10:00
Simon Michael
27e51edbf4 ;doc:cost, value reporting: edits 2025-02-05 10:26:05 -10:00
Simon Michael
57efcfb79a ;bin: script-example: cleanup 2025-02-01 13:55:03 -10:00
Simon Michael
39f3b2c7ba ;dev: doc 2025-01-31 02:04:40 -10:00
Simon Michael
fdbf1b920f ;examples:csv: pooltool-rewards.csv.rule cleanup 2025-01-30 21:12:34 -10:00
Simon Michael
63b939a201 imp:print: --invert now also negates balance assertion/assignment amounts [#2314] 2025-01-29 09:47:29 -10:00
Simon Michael
bbb06209e7 lib: +postingNegate 2025-01-29 09:42:15 -10:00
Simon Michael
0dca0911f3 lib: negatePostingAmount -> postingNegateMainAmount 2025-01-29 09:41:51 -10:00
Simon Michael
3e838e4d0f imp:print: support --invert [#2314] 2025-01-27 05:21:36 -10:00
Simon Michael
aef59f8edd ;doc:FINANCE: funded projects 2025-01-27 05:20:03 -10:00
Simon Michael
d282d0b72b ;doc:FINANCE: better reports link 2025-01-25 23:58:38 -10:00
Simon Michael
1d32f0160c ;doc:FINANCE: edits 2025-01-25 23:53:40 -10:00
Simon Michael
f2df5ad72f ;doc:FINANCE: Funded projects 2025-01-25 23:35:03 -10:00