Skip to content

Commit

Permalink
;doc: reorganise the commands list in manual to match cli, improve links
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichael committed May 9, 2024
1 parent 9fb210d commit b7219f8
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 64 deletions.
68 changes: 50 additions & 18 deletions hledger/Hledger/Cli/Commands/commands.m4
Original file line number Diff line number Diff line change
@@ -1,37 +1,69 @@
m4_dnl _commands_
m4_dnl Used in the hledger manual to include all command docs.
m4_dnl Keep synced with Hledger.Cli.Commands.commandsList, hledger.m4.md
m4_dnl Keep synced with Hledger.Cli.Commands.commandsList, hledger.m4.md.
m4_dnl The spaced colons avoid anchor/link collisions with similarly-named sections.
m4_define({{_commands_}},
{{
_command_({{Accounts}})
_command_({{Activity}})
## HELP :

_command_({{Help}})
_command_({{Demo}})

## USER INTERFACES :

Alternate user interfaces like
[hledger-ui](hledger-ui.md) and
[hledger-web](hledger-web.md)
appear in this section of the : list when installed.

## ENTERING DATA :

_command_({{Add}})
_command_({{Aregister}})
_command_({{Balance}})
_command_({{Balancesheet}})
_command_({{Balancesheetequity}})
_command_({{Cashflow}})
_command_({{Check}})
_command_({{Close}})
_command_({{Import}})

## BASIC REPORTS :

_command_({{Accounts}})
_command_({{Codes}})
_command_({{Commodities}})
_command_({{Demo}})
_command_({{Descriptions}})
_command_({{Diff}})
_command_({{Files}})
_command_({{Help}})
_command_({{Import}})
_command_({{Incomestatement}})
_command_({{Notes}})
_command_({{Payees}})
_command_({{Prices}})
_command_({{Stats}})
_command_({{Tags}})

## STANDARD REPORTS :

_command_({{Print}})
_command_({{Aregister}})
_command_({{Register}})
_command_({{Rewrite}})
_command_({{Balancesheet}})
_command_({{Balancesheetequity}})
_command_({{Cashflow}})
_command_({{Incomestatement}})

## ADVANCED REPORTS :

_command_({{Balance}})
_command_({{Roi}})
_command_({{Stats}})
_command_({{Tags}})

## CHARTS :

_command_({{Activity}})

## GENERATING DATA :

_command_({{Close}})
_command_({{Rewrite}})

## MAINTENANCE :

_command_({{Check}})
_command_({{Diff}})
_command_({{Test}})

}})m4_dnl
m4_dnl
m4_dnl _command_(MDFILE)
Expand Down
87 changes: 41 additions & 46 deletions hledger/hledger.m4.md
Original file line number Diff line number Diff line change
Expand Up @@ -6012,47 +6012,33 @@ First, a quick glossary:

# PART 4: COMMANDS

## Commands overview

Here are the built-in [commands](#commands):
<!-- keep commands & descriptions synced with Hledger.Cli.Commands.commandsList, commands.m4 -->

### DATA ENTRY

These data entry commands are the only ones which can modify your journal file.

- [add](#add) - add transactions using terminal prompts
- [import](#import) - add new transactions from other files, eg CSV files
<a name="commands-overview">
<a name="addons"></a><a name="add-ons"></a> <!-- see also #add-on-commands. -->

### DATA CREATION
Here are the standard [commands](#commands), which you can list by running `hledger`.
If you have installed more [add-on commands](../scripts.md), they also will be listed.

- [close](#close) - generate balance-zeroing/restoring transactions
- [rewrite](#rewrite) - generate auto postings, like print --auto
<!-- keep commands & descriptions synced with Hledger.Cli.Commands.commandsList, commands.m4 -->

### DATA MANAGEMENT
**[HELP](#help-)**

- [check](#check) - check for various kinds of error in the data
- [diff](#diff) - compare account transactions in two journal files
- [help](#help) - show the hledger manual with info/man/pager
- [demo](#demo) - show small hledger demos in the terminal

### REPORTS, FINANCIAL
**[USER INTERFACES](#user-interfaces-)**

- [aregister](#aregister) (areg) - show transactions in a particular account
- [balancesheet](#balancesheet) (bs) - show assets, liabilities and net worth
- [balancesheetequity](#balancesheetequity) (bse) - show assets, liabilities and equity
- [cashflow](#cashflow) (cf) - show changes in liquid assets
- [incomestatement](#incomestatement) (is) - show revenues and expenses
- [ui](hledger-ui.html) - (if installed) run hledger's terminal UI
- [web](hledger-web.html) - (if installed) run hledger's web UI

### REPORTS, VERSATILE
**[ENTERING DATA](#entering-data-)**

- [balance](#balance) (bal) - show balance changes, end balances, budgets, gains..
- [print](#print) - show transactions or export journal data
- [register](#register) (reg) - show postings in one or more accounts & running total
- [roi](#roi) - show return on investments
- [add](#add) - add transactions using terminal prompts
- [import](#import) - add new transactions from other files, eg CSV files

### REPORTS, BASIC
**[BASIC REPORTS](#basic-reports-)**

- [accounts](#accounts) - show account names
- [activity](#activity) - show bar charts of posting counts per period
- [codes](#codes) - show transaction codes
- [commodities](#commodity-directive) - show commodity/currency symbols
- [descriptions](#descriptions) - show transaction descriptions
Expand All @@ -6062,28 +6048,37 @@ These data entry commands are the only ones which can modify your journal file.
- [prices](#prices) - show market prices
- [stats](#stats) - show journal statistics
- [tags](#tags-1) - show tag names
- [test](#test) - run self tests

### HELP
**[STANDARD REPORTS](#standard-reports-)**

- [help](#help) - show the hledger manual with info/man/pager
- [demo](#demo) - show small hledger demos in the terminal
- [print](#print) - show transactions or export journal data
- [aregister](#aregister) (areg) - show transactions in a particular account
- [register](#register) (reg) - show postings in one or more accounts & running total
- [balancesheet](#balancesheet) (bs) - show assets, liabilities and net worth
- [balancesheetequity](#balancesheetequity) (bse) - show assets, liabilities and equity
- [cashflow](#cashflow) (cf) - show changes in liquid assets
- [incomestatement](#incomestatement) (is) - show revenues and expenses

**[ADVANCED REPORTS](#advanced-reports-)**

<a name="addons"></a>
<!-- #addons: the short explanation and list of common add-on commands. See also #add-on-commands. -->
- [balance](#balance) (bal) - show balance changes, end balances, budgets, gains..
- [roi](#roi) - show return on investments

**[CHARTS](#charts-)**

- [activity](#activity) - show bar charts of posting counts per period

**[GENERATING DATA](#generating-data-)**

### ADD-ONS
- [close](#close) - generate balance-zeroing/restoring transactions
- [rewrite](#rewrite) - generate auto postings, like print --auto

**[MAINTENANCE](#maintenance-)**

And here are some typical [add-on commands](#add-on-commands).
Some of these are installed by the [hledger-install script](https://hledger.org/install.html#build-methods).
If installed, they will appear in hledger's commands list:
- [check](#check) - check for various kinds of error in the data
- [diff](#diff) - compare account transactions in two journal files
- [test](#test) - run self tests

- [ui](hledger-ui.html) - run hledger's terminal UI
- [web](hledger-web.html) - run hledger's web UI
- [iadd](https://hackage.haskell.org/package/hledger-iadd) - add transactions using a TUI (currently hard to build)
- [interest](https://hackage.haskell.org/package/hledger-interest) - generate interest transactions
- [stockquotes](https://hackage.haskell.org/package/hledger-stockquotes) - download market prices from AlphaVantage
- [Scripts and add-ons](https://hledger.org/scripts.html) - check-fancyassertions, edit, fifo, git, move, pijul, plot, and more..

m4_dnl XXX maybe later
m4_dnl _man_({{
Expand All @@ -6092,7 +6087,7 @@ m4_dnl or the info or web format of this manual.
m4_dnl }})
m4_dnl _notman_({{

Next, each command is described in detail, in alphabetical order.
Next, these commands are described in detail.

m4_dnl Include the command docs. Each starts with a level 2 heading.
m4_dnl (To change that, see Hledger/Cli/Commands/{*.md,commands.m4})
Expand Down

0 comments on commit b7219f8

Please sign in to comment.