hledger-api 1.1 → 1.2
raw patch · 6 files changed
+92/−135 lines, 6 filesdep ~hledgerdep ~hledger-lib
Dependency ranges changed: hledger, hledger-lib
Files
- CHANGES +4/−0
- doc/hledger-api.1 +21/−42
- doc/hledger-api.1.info +37/−50
- doc/hledger-api.1.txt +20/−33
- hledger-api.cabal +7/−7
- hledger-api.hs +3/−3
CHANGES view
@@ -2,6 +2,10 @@ See also the hledger and the project change logs. +# 1.2 (2016/3/31)++see project changes at http://hledger.org/release-notes+ # 1.1 (2016/12/31) - serves on 127.0.0.1 by default, --host option added (#432)
doc/hledger-api.1 view
@@ -1,5 +1,5 @@ -.TH "hledger\-api" "1" "December 2016" "hledger\-api 1.1" "hledger User Manuals"+.TH "hledger\-api" "1" "March 2017" "hledger\-api 1.2" "hledger User Manuals" @@ -12,10 +12,6 @@ .PD 0 .P .PD-\f[C]hledger\-api\ \-\-swagger\f[]-.PD 0-.P-.PD \f[C]hledger\ api\ \-\-\ [OPTIONS]\f[] .SH DESCRIPTION .PP@@ -51,41 +47,30 @@ Note: if invoking hledger\-api as a hledger subcommand, write \f[C]\-\-\f[] before options as shown above. .TP-.B \f[C]\-d\ \-\-static\-dir=DIR\f[]-serve files from a different directory (default: \f[C]\&.\f[])-.RS-.RE-.TP-.B \f[C]\-p\ \-\-port=PORT\f[]-use a different TCP port (default: 8001)+.B \f[C]\-f\ \-\-file=FILE\f[]+use a different input file.+For stdin, use \- (default: \f[C]$LEDGER_FILE\f[] or+\f[C]$HOME/.hledger.journal\f[]) .RS .RE .TP-.B \f[C]\-\-swagger\f[]-print API docs in Swagger 2.0 format, and exit-.RS-.RE-.PP-hledger general options:-.TP-.B \f[C]\-h\f[]-show general usage (or after COMMAND, the command\[aq]s usage)+.B \f[C]\-d\ \-\-static\-dir=DIR\f[]+serve files from a different directory (default: \f[C]\&.\f[]) .RS .RE .TP-.B \f[C]\-\-help\f[]-show the current program\[aq]s manual as plain text (or after an add\-on-COMMAND, the add\-on\[aq]s manual)+.B \f[C]\-\-host=IPADDR\f[]+listen on this IP address (default: 127.0.0.1) .RS .RE .TP-.B \f[C]\-\-man\f[]-show the current program\[aq]s manual with man+.B \f[C]\-p\ \-\-port=PORT\f[]+listen on this TCP port (default: 8001) .RS .RE .TP-.B \f[C]\-\-info\f[]-show the current program\[aq]s manual with info+.B \f[C]\-\-swagger\f[]+print API docs in Swagger 2.0 format, and exit .RS .RE .TP@@ -94,29 +79,23 @@ .RS .RE .TP-.B \f[C]\-\-debug[=N]\f[]-show debug output (levels 1\-9, default: 1)-.RS-.RE-.TP-.B \f[C]\-f\ FILE\ \-\-file=FILE\f[]-use a different input file.-For stdin, use \-+.B \f[C]\-h\f[]+show usage .RS .RE .TP-.B \f[C]\-\-rules\-file=RULESFILE\f[]-Conversion rules file to use when reading CSV (default: FILE.rules)+.B \f[C]\-\-help\f[]+show manual as plain text .RS .RE .TP-.B \f[C]\-\-alias=OLD=NEW\f[]-display accounts named OLD as NEW+.B \f[C]\-\-man\f[]+show manual with man .RS .RE .TP-.B \f[C]\-I\ \-\-ignore\-assertions\f[]-ignore any failing balance assertions in the journal+.B \f[C]\-\-info\f[]+show manual with info .RS .RE .SH ENVIRONMENT
doc/hledger-api.1.info view
@@ -1,32 +1,30 @@-This is hledger-api/doc/hledger-api.1.info, produced by makeinfo-version 4.8 from stdin.+This is hledger-api.1.info, produced by makeinfo version 6.0 from stdin. -File: hledger-api.1.info, Node: Top, Up: (dir)+File: hledger-api.1.info, Node: Top, Next: OPTIONS, Up: (dir) -hledger-api(1) hledger-api 1.1+hledger-api(1) hledger-api 1.2 ****************************** hledger-api is a simple web API server, intended to support client-side-web apps operating on hledger data. It comes with a series of simple+web apps operating on hledger data. It comes with a series of simple client-side app examples, which drive its evolution. 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),+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_journal(5) etc. The server listens on IP address 127.0.0.1, accessible only to local-requests, by default. You can change this with `--host', eg `--host-0.0.0.0' to listen on all addresses. Note there is no other access+requests, by default. You can change this with '--host', eg '--host+0.0.0.0' to listen on all addresses. Note there is no other access control, so you will need to hide hledger-api behind an authenticating-proxy if you want to restrict access. You can change the TCP port-(default: 8001) with `-p PORT'.+proxy if you want to restrict access. You can change the TCP port+(default: 8001) with '-p PORT'. - If invoked as `hledger-api --swagger', instead of starting a server+ If invoked as 'hledger-api --swagger', instead of starting a server the API docs will be printed in Swagger 2.0 format.- * Menu: * OPTIONS::@@ -37,56 +35,45 @@ 1 OPTIONS ********* -Note: if invoking hledger-api as a hledger subcommand, write `--'-before options as shown above.--`-d --static-dir=DIR'- serve files from a different directory (default: `.')--`-p --port=PORT'- use a different TCP port (default: 8001)+Note: if invoking hledger-api as a hledger subcommand, write '--' before+options as shown above. -`--swagger'- print API docs in Swagger 2.0 format, and exit+'-f --file=FILE' - hledger general options:+ use a different input file. For stdin, use - (default:+ '$LEDGER_FILE' or '$HOME/.hledger.journal')+'-d --static-dir=DIR' -`-h'- show general usage (or after COMMAND, the command's usage)+ serve files from a different directory (default: '.')+'--host=IPADDR' -`--help'- show the current program's manual as plain text (or after an add-on- COMMAND, the add-on's manual)+ listen on this IP address (default: 127.0.0.1)+'-p --port=PORT' -`--man'- show the current program's manual with man+ listen on this TCP port (default: 8001)+'--swagger' -`--info'- show the current program's manual with info+ print API docs in Swagger 2.0 format, and exit+'--version' -`--version' show version--`--debug[=N]'- show debug output (levels 1-9, default: 1)--`-f FILE --file=FILE'- use a different input file. For stdin, use -+'-h' -`--rules-file=RULESFILE'- Conversion rules file to use when reading CSV (default: FILE.rules)+ show usage+'--help' -`--alias=OLD=NEW'- display accounts named OLD as NEW+ show manual as plain text+'--man' -`-I --ignore-assertions'- ignore any failing balance assertions in the journal+ show manual with man+'--info' + show manual with info Tag Table:-Node: Top90-Node: OPTIONS1216-Ref: #options1303+Node: Top74+Node: OPTIONS1220+Ref: #options1307 End Tag Table
doc/hledger-api.1.txt view
@@ -8,7 +8,6 @@ SYNOPSIS hledger-api [OPTIONS]- hledger-api --swagger hledger api -- [OPTIONS] DESCRIPTION@@ -41,64 +40,52 @@ Note: if invoking hledger-api as a hledger subcommand, write -- before options as shown above. + -f --file=FILE+ use a different input file. For stdin, use - (default:+ $LEDGER_FILE or $HOME/.hledger.journal)+ -d --static-dir=DIR serve files from a different directory (default: .) + --host=IPADDR+ listen on this IP address (default: 127.0.0.1)+ -p --port=PORT- use a different TCP port (default: 8001)+ listen on this TCP port (default: 8001) --swagger print API docs in Swagger 2.0 format, and exit - hledger general options:-- -h show general usage (or after COMMAND, the command's usage)-- --help show the current program's manual as plain text (or after an- add-on COMMAND, the add-on's manual)-- --man show the current program's manual with man-- --info show the current program's manual with info- --version show version - --debug[=N]- show debug output (levels 1-9, default: 1)-- -f FILE --file=FILE- use a different input file. For stdin, use -+ -h show usage - --rules-file=RULESFILE- Conversion rules file to use when reading CSV (default:- FILE.rules)+ --help show manual as plain text - --alias=OLD=NEW- display accounts named OLD as NEW+ --man show manual with man - -I --ignore-assertions- ignore any failing balance assertions in the journal+ --info show manual with info ENVIRONMENT LEDGER_FILE The journal file path when not specified with -f. Default:- ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-+ ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour- nal). FILES- Reads data from one or more files in hledger journal, timeclock, time-- dot, or CSV format specified with -f, or $LEDGER_FILE, or- $HOME/.hledger.journal (on windows, perhaps+ Reads data from one or more files in hledger journal, timeclock, time-+ dot, or CSV format specified with -f, or $LEDGER_FILE, or+ $HOME/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.journal). BUGS- The need to precede options with -- when invoked from hledger is awk-+ The need to precede options with -- when invoked from hledger is awk- ward. REPORTING BUGS- Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel+ Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel or hledger mail list) @@ -112,7 +99,7 @@ SEE ALSO- hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1),+ hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1), hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time- dot(5), ledger(1) @@ -120,4 +107,4 @@ -hledger-api 1.1 December 2016 hledger-api(1)+hledger-api 1.2 March 2017 hledger-api(1)
hledger-api.cabal view
@@ -1,9 +1,9 @@--- This file has been generated from package.yaml by hpack version 0.15.0.+-- This file has been generated from package.yaml by hpack version 0.17.0. -- -- see: https://github.com/sol/hpack name: hledger-api-version: 1.1+version: 1.2 synopsis: Web API server for the hledger accounting tool description: This is a simple web API server for hledger data. It comes with a series of simple client-side web app examples.@@ -20,11 +20,11 @@ bug-reports: http://bugs.hledger.org author: Simon Michael <simon@joyful.com> maintainer: Simon Michael <simon@joyful.com>-license: GPL+license: GPL-3 license-file: LICENSE+tested-with: GHC==7.10.3, GHC==8.0 build-type: Simple cabal-version: >= 1.10-tested-with: GHC==7.10.3, GHC==8.0 extra-source-files: CHANGES@@ -44,10 +44,10 @@ executable hledger-api main-is: hledger-api.hs ghc-options: -threaded- cpp-options: -DVERSION="1.1"+ cpp-options: -DVERSION="1.2" build-depends:- hledger-lib >= 1.1 && < 1.2- , hledger >= 1.1 && < 1.2+ hledger-lib >= 1.2 && < 1.3+ , hledger >= 1.2 && < 1.3 , base >=4.8 && <5 , aeson , bytestring
hledger-api.hs view
@@ -35,12 +35,12 @@ import Hledger.Query import Hledger.Cli hiding (Reader, version) -hledgerApiVersion="1.1"+hledgerApiVersion="1.2" -- https://github.com/docopt/docopt.hs#readme doc :: Docopt doc = [docopt|-hledger-api 1.1+hledger-api 1.2 Serves hledger data and reports as a JSON web API. @@ -50,7 +50,7 @@ hledger-api --swagger print API docs in Swagger 2.0 format hledger-api --version- hledger-api -h|--help|--info+ hledger-api -h|--help|--man|--info Options: -f --file FILE use a different input file