packages feed

hledger-web 1.27.1 → 1.28

raw patch · 6 files changed

+252/−162 lines, 6 filesdep −breakpointdep ~basedep ~hledgerdep ~hledger-libPVP ok

version bump matches the API change (PVP)

Dependencies removed: breakpoint

Dependency ranges changed: base, hledger, hledger-lib, megaparsec

API changes (from Hackage documentation)

Files

CHANGES.md view
@@ -9,6 +9,22 @@ User-visible changes in hledger-web. See also the hledger changelog. +# 1.28 2022-11-30++Improvements++- --debug with no argument is now equivalent to --debug=1.++- Allow megaparsec 9.3 (Felix Yan)++- Support GHC 9.4++# 1.27.1 2022-09-18++Fixes++- The add form no longer gives an error when there is just a single file and no file field showing. (#1932)+ # 1.27 2022-09-01  Improvements
Hledger/Web/WebOptions.hs view
@@ -186,7 +186,7 @@  getHledgerWebOpts :: IO WebOpts getHledgerWebOpts = do-  args <- fmap replaceNumericFlags . expandArgsAt =<< getArgs+  args <- fmap (replaceNumericFlags . ensureDebugHasArg) . expandArgsAt =<< getArgs   rawOptsToWebOpts . either usageError id $ process webmode args  data Capability
hledger-web.1 view
@@ -1,19 +1,26 @@ -.TH "HLEDGER-WEB" "1" "September 2022" "hledger-web-1.27 " "hledger User Manuals"+.TH "HLEDGER-WEB" "1" "December 2022" "hledger-web-1.28 " "hledger User Manuals"    .SH NAME .PP hledger-web is a web interface (WUI) for the hledger accounting tool.-This manual is for hledger-web 1.27.+This manual is for hledger-web 1.28. .SH SYNOPSIS .PP-\f[C]hledger-web [OPTIONS]\f[R]+\f[C]hledger-web [OPTIONS]              # run temporarily & browse\f[R] .PD 0 .P .PD-\f[C]hledger web -- [OPTIONS]\f[R]+\f[C]hledger-web --serve [OPTIONS]      # run without stopping\f[R]+.PD 0+.P+.PD+\f[C]hledger-web --serve-api [OPTIONS]  # run JSON server only\f[R]+.PD 0+.P+.PD .SH DESCRIPTION .PP hledger is a reliable, cross-platform set of programs for tracking@@ -21,27 +28,41 @@ simple, editable file format. hledger is inspired by and largely compatible with ledger(1). .PP-hledger-web is hledger\[aq]s web interface.-It starts a simple web application for browsing and adding transactions,-and optionally opens it in a web browser window if possible.+hledger-web is a simple web application for browsing and adding+transactions. It provides a more user-friendly UI than the hledger CLI or hledger-ui-interface, showing more at once (accounts, the current account register,+TUI, showing more at once (accounts, the current account register, balance charts) and allowing history-aware data entry, interactive searching, and bookmarking. .PP-hledger-web also lets you share a ledger with multiple users, or even+hledger-web also lets you share a journal with multiple users, or even the public web. There is no access control, so if you need that you should put it behind a suitable web proxy. As a small protection against data loss when running an unprotected-instance, it writes a numbered backup of the main journal file (only ?)-on every edit.+instance, it writes a numbered backup of the main journal file (only) on+every edit. .PP Like hledger, it reads data from one or more files in hledger journal, timeclock, timedot, or CSV format specified with \f[C]-f\f[R], or \f[C]$LEDGER_FILE\f[R], or \f[C]$HOME/.hledger.journal\f[R] (on windows, perhaps \f[C]C:/Users/USER/.hledger.journal\f[R]). For more about this see hledger(1).+.PP+hledger-web can be run in three modes:+.IP \[bu] 2+Transient mode (the default): your default web browser will be opened to+show the app if possible, and the app exits automatically after two+minutes of inactivity (no requests received and no open browser windows+viewing it).+.IP \[bu] 2+With \f[C]--serve\f[R]: the app runs without stopping, and without+opening a browser.+.IP \[bu] 2+With \f[C]--serve-api\f[R]: only the JSON API is served.+.PP+In all cases hledger-web runs as a foreground process, logging requests+to stdout. .SH OPTIONS .PP Command-line options and arguments may be used to set an initial filter@@ -53,7 +74,7 @@ \f[C]--\f[R] before options, as shown in the synopsis above. .TP \f[B]\f[CB]--serve\f[B]\f[R]-serve and log requests, don\[aq]t browse or auto-exit+serve and log requests, don\[aq]t browse or auto-exit after timeout .TP \f[B]\f[CB]--serve-api\f[B]\f[R] like --serve, but serve only the JSON web API, without the server-side@@ -249,16 +270,6 @@ should contain one command line option/argument per line. (To prevent this, insert a \f[C]--\f[R] argument before.) .PP-By default, hledger-web starts the web app in \[dq]transient mode\[dq]-and also opens it in your default web browser if possible.-In this mode the web app will keep running for as long as you have it-open in a browser window, and will exit after two minutes of inactivity-(no requests and no browser windows viewing it).-With \f[C]--serve\f[R], it just runs the web app without exiting, and-logs requests to the console.-With \f[C]--serve-api\f[R], only the JSON web api (see below) is served,-with the usual HTML server-side web UI disabled.-.PP By default the server listens on IP address 127.0.0.1, accessible only to local requests. You can use \f[C]--host\f[R] to change this, eg \f[C]--host 0.0.0.0\f[R]@@ -575,6 +586,22 @@ $ curl http://127.0.0.1:5000/add -X PUT -H \[aq]Content-Type: application/json\[aq] --data-binary \[at]txn.json \f[R] .fi+.SH DEBUG OUTPUT+.SS Debug output+.PP+You can add \f[C]--debug[=N]\f[R] to the command line to log debug+output.+N ranges from 1 (least output, the default) to 9 (maximum output).+Typically you would start with 1 and increase until you are seeing+enough.+Debug output goes to stderr, interleaved with the requests logged on+stdout.+To capture debug output in a log file instead, you can usually redirect+stderr, eg:+.PD 0+.P+.PD+\f[C]hledger-web --debug=3 2>hledger-web.log\f[R]. .SH ENVIRONMENT .PP \f[B]LEDGER_FILE\f[R] The journal file path when not specified with
hledger-web.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4.+-- This file has been generated from package.yaml by hpack version 0.35.0. -- -- see: https://github.com/sol/hpack  name:           hledger-web-version:        1.27.1+version:        1.28 synopsis:       Web-based user interface for the hledger accounting system description:    A simple web-based user interface for the hledger accounting system,                 providing a more modern UI than the command-line or terminal interfaces.@@ -151,15 +151,14 @@   hs-source-dirs:       ./   ghc-options: -Wall -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns-  cpp-options: -DVERSION="1.27.1"+  cpp-options: -DVERSION="1.28"   build-depends:       Decimal >=0.5.1     , aeson >=1-    , base >=4.14 && <4.17+    , base >=4.14 && <4.18     , base64     , blaze-html     , blaze-markup-    , breakpoint     , bytestring     , case-insensitive     , clientsession@@ -172,13 +171,13 @@     , extra >=1.6.3     , filepath     , hjsmin-    , hledger >=1.27.1 && <1.28-    , hledger-lib >=1.27.1 && <1.28+    , hledger ==1.28.*+    , hledger-lib ==1.28.*     , hspec     , http-client     , http-conduit     , http-types-    , megaparsec >=7.0.0 && <9.3+    , megaparsec >=7.0.0 && <9.4     , mtl >=2.2.1     , network     , shakespeare >=2.0.2.2@@ -200,11 +199,11 @@     , yesod-form >=1.4 && <1.8     , yesod-static >=1.4 && <1.7     , yesod-test+  default-language: Haskell2010   if (flag(dev)) || (flag(library-only))     cpp-options: -DDEVELOPMENT   if flag(dev)     ghc-options: -O0-  default-language: Haskell2010  executable hledger-web   main-is: main.hs@@ -213,11 +212,11 @@   hs-source-dirs:       app   ghc-options: -Wall -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns-  cpp-options: -DVERSION="1.27.1"+  cpp-options: -DVERSION="1.28"   build-depends:-      base >=4.14 && <4.17-    , breakpoint+      base >=4.14 && <4.18     , hledger-web+  default-language: Haskell2010   if (flag(dev)) || (flag(library-only))     cpp-options: -DDEVELOPMENT   if flag(dev)@@ -226,7 +225,6 @@     buildable: False   if flag(threaded)     ghc-options: -threaded-  default-language: Haskell2010  test-suite test   type: exitcode-stdio-1.0@@ -234,10 +232,9 @@   hs-source-dirs:       test   ghc-options: -Wall -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns-  cpp-options: -DVERSION="1.27.1"+  cpp-options: -DVERSION="1.28"   build-depends:-      base >=4.14 && <4.17-    , breakpoint+      base >=4.14 && <4.18     , hledger     , hledger-lib     , hledger-web@@ -245,8 +242,8 @@     , text     , yesod     , yesod-test+  default-language: Haskell2010   if (flag(dev)) || (flag(library-only))     cpp-options: -DDEVELOPMENT   if flag(dev)     ghc-options: -O0-  default-language: Haskell2010
hledger-web.info view
@@ -12,35 +12,49 @@ **************  hledger-web is a web interface (WUI) for the hledger accounting tool.-This manual is for hledger-web 1.27.+This manual is for hledger-web 1.28. -   'hledger-web [OPTIONS]'-'hledger web -- [OPTIONS]'+   'hledger-web [OPTIONS] # run temporarily & browse'+'hledger-web --serve [OPTIONS] # run without stopping'+'hledger-web --serve-api [OPTIONS] # run JSON server only'     hledger is a reliable, cross-platform set of programs for tracking money, time, or any other commodity, using double-entry accounting and a simple, editable file format.  hledger is inspired by and largely compatible with ledger(1). -   hledger-web is hledger's web interface.  It starts a simple web-application for browsing and adding transactions, and optionally opens-it in a web browser window if possible.  It provides a more-user-friendly UI than the hledger CLI or hledger-ui interface, showing-more at once (accounts, the current account register, balance charts)-and allowing history-aware data entry, interactive searching, and-bookmarking.+   hledger-web is a simple web application for browsing and adding+transactions.  It provides a more user-friendly UI than the hledger CLI+or hledger-ui TUI, showing more at once (accounts, the current account+register, balance charts) and allowing history-aware data entry,+interactive searching, and bookmarking. -   hledger-web also lets you share a ledger with multiple users, or even-the public web.  There is no access control, so if you need that you-should put it behind a suitable web proxy.  As a small protection+   hledger-web also lets you share a journal with multiple users, or+even the public web.  There is no access control, so if you need that+you should put it behind a suitable web proxy.  As a small protection against data loss when running an unprotected instance, it writes a-numbered backup of the main journal file (only ?)  on every edit.+numbered backup of the main journal file (only) on every edit.     Like hledger, it reads data from one or more files in hledger journal, timeclock, timedot, or CSV format specified with '-f', or '$LEDGER_FILE', or '$HOME/.hledger.journal' (on windows, perhaps 'C:/Users/USER/.hledger.journal').  For more about this see hledger(1). +   hledger-web can be run in three modes:++   * Transient mode (the default): your default web browser will be+     opened to show the app if possible, and the app exits automatically+     after two minutes of inactivity (no requests received and no open+     browser windows viewing it).++   * With '--serve': the app runs without stopping, and without opening+     a browser.++   * With '--serve-api': only the JSON API is served.++   In all cases hledger-web runs as a foreground process, logging+requests to stdout.+ * Menu:  * OPTIONS::@@ -48,6 +62,7 @@ * EDITING UPLOADING DOWNLOADING:: * RELOADING:: * JSON API::+* DEBUG OUTPUT:: * ENVIRONMENT:: * FILES:: * BUGS::@@ -67,7 +82,7 @@  '--serve' -     serve and log requests, don't browse or auto-exit+     serve and log requests, don't browse or auto-exit after timeout '--serve-api'       like -serve, but serve only the JSON web API, without the@@ -264,15 +279,6 @@ should contain one command line option/argument per line.  (To prevent this, insert a '--' argument before.) -   By default, hledger-web starts the web app in "transient mode" and-also opens it in your default web browser if possible.  In this mode the-web app will keep running for as long as you have it open in a browser-window, and will exit after two minutes of inactivity (no requests and-no browser windows viewing it).  With '--serve', it just runs the web-app without exiting, and logs requests to the console.  With-'--serve-api', only the JSON web api (see below) is served, with the-usual HTML server-side web UI disabled.-    By default the server listens on IP address 127.0.0.1, accessible only to local requests.  You can use '--host' to change this, eg '--host 0.0.0.0' to listen on all configured addresses.@@ -377,7 +383,7 @@ sure that both machine clocks are roughly in step.)  -File: hledger-web.info,  Node: JSON API,  Next: ENVIRONMENT,  Prev: RELOADING,  Up: Top+File: hledger-web.info,  Node: JSON API,  Next: DEBUG OUTPUT,  Prev: RELOADING,  Up: Top  5 JSON API **********@@ -561,9 +567,33 @@ $ curl http://127.0.0.1:5000/add -X PUT -H 'Content-Type: application/json' --data-binary @txn.json  -File: hledger-web.info,  Node: ENVIRONMENT,  Next: FILES,  Prev: JSON API,  Up: Top+File: hledger-web.info,  Node: DEBUG OUTPUT,  Next: ENVIRONMENT,  Prev: JSON API,  Up: Top -6 ENVIRONMENT+6 DEBUG OUTPUT+**************++* Menu:++* Debug output::+++File: hledger-web.info,  Node: Debug output,  Up: DEBUG OUTPUT++6.1 Debug output+================++You can add '--debug[=N]' to the command line to log debug output.  N+ranges from 1 (least output, the default) to 9 (maximum output).+Typically you would start with 1 and increase until you are seeing+enough.  Debug output goes to stderr, interleaved with the requests+logged on stdout.  To capture debug output in a log file instead, you+can usually redirect stderr, eg:+'hledger-web --debug=3 2>hledger-web.log'.+++File: hledger-web.info,  Node: ENVIRONMENT,  Next: FILES,  Prev: DEBUG OUTPUT,  Up: Top++7 ENVIRONMENT *************  *LEDGER_FILE* The journal file path when not specified with '-f'.@@ -604,7 +634,7 @@  File: hledger-web.info,  Node: FILES,  Next: BUGS,  Prev: ENVIRONMENT,  Up: Top -7 FILES+8 FILES *******  Reads data from one or more files in hledger journal, timeclock,@@ -615,7 +645,7 @@  File: hledger-web.info,  Node: BUGS,  Prev: FILES,  Up: Top -8 BUGS+9 BUGS ******  The need to precede options with '--' when invoked from hledger is@@ -632,22 +662,26 @@  Tag Table: Node: Top223-Node: OPTIONS1886-Ref: #options1991-Node: PERMISSIONS9902-Ref: #permissions10041-Node: EDITING UPLOADING DOWNLOADING11253-Ref: #editing-uploading-downloading11434-Node: RELOADING12268-Ref: #reloading12402-Node: JSON API12835-Ref: #json-api12949-Node: ENVIRONMENT18439-Ref: #environment18555-Node: FILES19866-Ref: #files19966-Node: BUGS20179-Ref: #bugs20257+Node: OPTIONS2433+Ref: #options2538+Node: PERMISSIONS9937+Ref: #permissions10076+Node: EDITING UPLOADING DOWNLOADING11288+Ref: #editing-uploading-downloading11469+Node: RELOADING12303+Ref: #reloading12437+Node: JSON API12870+Ref: #json-api12985+Node: DEBUG OUTPUT18475+Ref: #debug-output18600+Node: Debug output18627+Ref: #debug-output-118728+Node: ENVIRONMENT19145+Ref: #environment19265+Node: FILES20576+Ref: #files20676+Node: BUGS20889+Ref: #bugs20967  End Tag Table 
hledger-web.txt view
@@ -5,11 +5,12 @@  NAME        hledger-web  is  a web interface (WUI) for the hledger accounting tool.-       This manual is for hledger-web 1.27.+       This manual is for hledger-web 1.28.  SYNOPSIS-       hledger-web [OPTIONS]-       hledger web -- [OPTIONS]+       hledger-web [OPTIONS]              # run temporarily & browse+       hledger-web --serve [OPTIONS]      # run without stopping+       hledger-web --serve-api [OPTIONS]  # run JSON server only  DESCRIPTION        hledger is a reliable, cross-platform  set  of  programs  for  tracking@@ -17,24 +18,38 @@        a simple, editable file format.  hledger is  inspired  by  and  largely        compatible with ledger(1). -       hledger-web  is hledger's web interface.  It starts a simple web appli--       cation for browsing and adding transactions, and optionally opens it in-       a  web browser window if possible.  It provides a more user-friendly UI-       than the hledger CLI or hledger-ui  interface,  showing  more  at  once-       (accounts,  the  current account register, balance charts) and allowing-       history-aware data entry, interactive searching, and bookmarking.+       hledger-web  is a simple web application for browsing and adding trans-+       actions.  It provides a more user-friendly UI than the hledger  CLI  or+       hledger-ui  TUI,  showing  more  at once (accounts, the current account+       register, balance charts) and allowing history-aware data entry, inter-+       active searching, and bookmarking. -       hledger-web also lets you share a ledger with multiple users,  or  even-       the  public  web.   There is no access control, so if you need that you-       should put it behind a suitable  web  proxy.   As  a  small  protection-       against  data  loss  when  running an unprotected instance, it writes a-       numbered backup of the main journal file (only ?)  on every edit.+       hledger-web  also lets you share a journal with multiple users, or even+       the public web.  There is no access control, so if you  need  that  you+       should  put  it  behind  a  suitable  web proxy.  As a small protection+       against data loss when running an unprotected  instance,  it  writes  a+       numbered backup of the main journal file (only) on every edit. -       Like hledger, it reads data from one or more files in hledger  journal,-       timeclock,  timedot,  or CSV format specified with -f, or $LEDGER_FILE,-       or       $HOME/.hledger.journal       (on       windows,        perhaps+       Like  hledger, it reads data from one or more files in hledger journal,+       timeclock, timedot, or CSV format specified with -f,  or  $LEDGER_FILE,+       or        $HOME/.hledger.journal       (on       windows,       perhaps        C:/Users/USER/.hledger.journal).  For more about this see hledger(1). +       hledger-web can be run in three modes:++       o Transient mode (the default): your default web browser will be opened+         to  show  the  app if possible, and the app exits automatically after+         two minutes of inactivity (no requests received and no  open  browser+         windows viewing it).++       o With  --serve:  the  app runs without stopping, and without opening a+         browser.++       o With --serve-api: only the JSON API is served.++       In all cases hledger-web runs as a foreground process, logging requests+       to stdout.+ OPTIONS        Command-line options and arguments may be used to set an initial filter        on the data.  These filter options are not shown in the web UI, but  it@@ -44,7 +59,7 @@        options, as shown in the synopsis above.         --serve-              serve and log requests, don't browse or auto-exit+              serve and log requests, don't browse or auto-exit after timeout         --serve-api               like --serve, but serve only  the  JSON  web  API,  without  the@@ -234,51 +249,42 @@        contain  one  command line option/argument per line.  (To prevent this,        insert a -- argument before.) -       By default, hledger-web starts the web app in "transient mode" and also-       opens it in your default web browser if possible.  In this mode the web-       app will keep running for as long as you have it open in a browser win--       dow,  and will exit after two minutes of inactivity (no requests and no-       browser windows viewing it).  With --serve, it just runs  the  web  app-       without  exiting,  and logs requests to the console.  With --serve-api,-       only the JSON web api (see  below)  is  served,  with  the  usual  HTML-       server-side web UI disabled.--       By  default the server listens on IP address 127.0.0.1, accessible only-       to local requests.  You can  use  --host  to  change  this,  eg  --host+       By default the server listens on IP address 127.0.0.1, accessible  only+       to  local  requests.   You  can  use  --host  to change this, eg --host        0.0.0.0 to listen on all configured addresses. -       Similarly,  use --port to set a TCP port other than 5000, eg if you are+       Similarly, use --port to set a TCP port other than 5000, eg if you  are        running multiple hledger-web instances.         Both of these options are ignored when --socket is used.  In this case,-       it  creates  an  AF_UNIX socket file at the supplied path and uses that-       for communication.  This is an  alternative  way  of  running  multiple-       hledger-web  instances  behind a reverse proxy that handles authentica--       tion for different users.  The path can be  derived  in  a  predictable+       it creates an AF_UNIX socket file at the supplied path  and  uses  that+       for  communication.   This  is  an  alternative way of running multiple+       hledger-web instances behind a reverse proxy that  handles  authentica-+       tion  for  different  users.   The path can be derived in a predictable        way, eg by using the username within the path.  As an example, nginx as-       reverse proxy can use the variable $remote_user to derive a  path  from-       the  username  used  in  a  HTTP  basic  authentication.  The following-       proxy_pass directive allows access to all  hledger-web  instances  that+       reverse  proxy  can use the variable $remote_user to derive a path from+       the username used  in  a  HTTP  basic  authentication.   The  following+       proxy_pass  directive  allows  access to all hledger-web instances that        created a socket in /tmp/hledger/:                  proxy_pass http://unix:/tmp/hledger/${remote_user}.socket; -       You  can use --base-url to change the protocol, hostname, port and path+       You can use --base-url to change the protocol, hostname, port and  path        that appear in hyperlinks, useful eg for integrating hledger-web within-       a  larger website.  The default is http://HOST:PORT/ using the server's+       a larger website.  The default is http://HOST:PORT/ using the  server's        configured host address and TCP port (or http://HOST if PORT is 80). -       With --file-url you can set a different base url for static  files,  eg+       With  --file-url  you can set a different base url for static files, eg        for better caching or cookie-less serving on high performance websites.  PERMISSIONS-       By default, hledger-web allows anyone who can  reach  it  to  view  the+       By  default,  hledger-web  allows  anyone  who can reach it to view the        journal and to add new transactions, but not to change existing data.         You can restrict who can reach it by -       o setting  the IP address it listens on (see --host above).  By default-         it listens on  127.0.0.1,  accessible  to  all  users  on  the  local+       o setting the IP address it listens on (see --host above).  By  default+         it  listens  on  127.0.0.1,  accessible  to  all  users  on the local          machine.         o putting it behind an authenticating proxy, using eg apache or nginx@@ -288,53 +294,53 @@        You can restrict what the users who reach it can do, by         o using the --capabilities=CAP[,CAP..] flag when you start it, enabling-         one or more of the following  capabilities.   The  default  value  is+         one  or  more  of  the  following capabilities.  The default value is          view,add:           o view - allows viewing the journal file and all included files           o add - allows adding new transactions to the main journal file -         o manage  -  allows  editing,  uploading  or  downloading the main or+         o manage - allows editing,  uploading  or  downloading  the  main  or            included files -       o using the --capabilities-header=HTTPHEADER flag  to  specify  a  HTTP-         header  from  which it will read capabilities to enable.  hledger-web-         on Sandstorm uses the  X-Sandstorm-Permissions  header  to  integrate+       o using  the  --capabilities-header=HTTPHEADER  flag  to specify a HTTP+         header from which it will read capabilities to  enable.   hledger-web+         on  Sandstorm  uses  the  X-Sandstorm-Permissions header to integrate          with Sandstorm's permissions.  This is disabled by default.  EDITING, UPLOADING, DOWNLOADING-       If  you  enable the manage capability mentioned above, you'll see a new-       "spanner" button to the right of the search form.  Clicking  this  will-       let  you  edit,  upload,  or  download the journal file or any files it+       If you enable the manage capability mentioned above, you'll see  a  new+       "spanner"  button  to the right of the search form.  Clicking this will+       let you edit, upload, or download the journal  file  or  any  files  it        includes. -       Note, unlike any other hledger command, in this mode you (or any  visi-+       Note,  unlike any other hledger command, in this mode you (or any visi-        tor) can alter or wipe the data files. -       Normally  whenever  a  file is changed in this way, hledger-web saves a-       numbered backup (assuming file permissions allow it, the  disk  is  not-       full,  etc.)  hledger-web is not aware of version control systems, cur--       rently; if you use one, you'll have to arrange to  commit  the  changes+       Normally whenever a file is changed in this way,  hledger-web  saves  a+       numbered  backup  (assuming  file permissions allow it, the disk is not+       full, etc.) hledger-web is not aware of version control  systems,  cur-+       rently;  if  you  use one, you'll have to arrange to commit the changes        yourself (eg with a cron job or a file watcher like entr). -       Changes  which would leave the journal file(s) unparseable or non-valid-       (eg with failing balance assertions) are prevented.   (Probably.   This+       Changes which would leave the journal file(s) unparseable or  non-valid+       (eg  with  failing balance assertions) are prevented.  (Probably.  This        needs re-testing.)  RELOADING        hledger-web detects changes made to the files by other means (eg if you-       edit it directly, outside of hledger-web), and it  will  show  the  new-       data  when  you reload the page or navigate to a new page.  If a change-       makes a file unparseable, hledger-web will  display  an  error  message+       edit  it  directly,  outside  of hledger-web), and it will show the new+       data when you reload the page or navigate to a new page.  If  a  change+       makes  a  file  unparseable,  hledger-web will display an error message        until the file has been fixed.         (Note: if you are viewing files mounted from another machine, make sure        that both machine clocks are roughly in step.)  JSON API-       In addition to the web UI, hledger-web also serves a JSON API that  can-       be  used to get data or add new transactions.  If you want the JSON API+       In  addition to the web UI, hledger-web also serves a JSON API that can+       be used to get data or add new transactions.  If you want the JSON  API        only, you can use the --serve-api flag.  Eg:                $ hledger-web -f examples/sample.journal --serve-api@@ -351,7 +357,7 @@               /accounttransactions/ACCOUNTNAME         Eg, all account names in the journal (similar to the accounts command).-       (hledger-web's  JSON  does  not include newlines, here we use python to+       (hledger-web's JSON does not include newlines, here we  use  python  to        prettify it):                $ curl -s http://127.0.0.1:5000/accountnames | python -m json.tool@@ -392,25 +398,25 @@                                       "aprice": null,               ... -       Most of the JSON corresponds to hledger's data types;  for  details  of-       what  the fields mean, see the Hledger.Data.Json haddock docs and click-       on the various data types, eg Transaction.   And  for  a  higher  level+       Most  of  the  JSON corresponds to hledger's data types; for details of+       what the fields mean, see the Hledger.Data.Json haddock docs and  click+       on  the  various  data  types,  eg Transaction.  And for a higher level        understanding, see the journal manual.         In some cases there is outer JSON corresponding to a "Report" type.  To-       understand that, go to the Hledger.Web.Handler.MiscR haddock  and  look-       at  the  source for the appropriate handler to see what it returns.  Eg+       understand  that,  go to the Hledger.Web.Handler.MiscR haddock and look+       at the source for the appropriate handler to see what it  returns.   Eg        for  /accounttransactions  it's  getAccounttransactionsR,  returning  a-       "accountTransactionsReport  ...".   Looking  up the haddock for that we+       "accountTransactionsReport ...".  Looking up the haddock  for  that  we        can see that /accounttransactions returns an AccountTransactionsReport,-       which  consists  of a report title and a list of AccountTransactionsRe-+       which consists of a report title and a list  of  AccountTransactionsRe-        portItem (etc). -       You can add a new transaction to the journal  with  a  PUT  request  to-       /add,  if  hledger-web  was started with the add capability (enabled by+       You  can  add  a  new  transaction to the journal with a PUT request to+       /add, if hledger-web was started with the add  capability  (enabled  by        default).  The payload must be the full, exact JSON representation of a-       hledger  transaction  (partial data won't do).  You can get sample JSON-       from hledger-web's /transactions or /accounttransactions,  or  you  can+       hledger transaction (partial data won't do).  You can get  sample  JSON+       from  hledger-web's  /transactions  or /accounttransactions, or you can        export it with hledger-lib, eg like so:                .../hledger$ stack ghci hledger-lib@@ -506,11 +512,21 @@                   "tstatus": "Unmarked"               } -       And here's how to test adding it with curl.   This  should  add  a  new+       And  here's  how  to  test  adding it with curl.  This should add a new        entry to your journal:                $ curl http://127.0.0.1:5000/add -X PUT -H 'Content-Type: application/json' --data-binary @txn.json +DEBUG OUTPUT+   Debug output+       You can add --debug[=N] to the command line to  log  debug  output.   N+       ranges from 1 (least output, the default) to 9 (maximum output).  Typi-+       cally you would start with 1 and increase until you are seeing  enough.+       Debug  output  goes  to stderr, interleaved with the requests logged on+       stdout.  To capture debug output in a log file instead, you can usually+       redirect stderr, eg:+       hledger-web --debug=3 2>hledger-web.log.+ ENVIRONMENT        LEDGER_FILE The journal file path when not specified with -f. @@ -586,4 +602,4 @@   -hledger-web-1.27                September 2022                  HLEDGER-WEB(1)+hledger-web-1.28                 December 2022                  HLEDGER-WEB(1)