From 8dec91457ea9c02e6138a478ea85aaf1cdd5c55f Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 24 Aug 2019 03:16:09 -0700 Subject: [PATCH 01/11] ; doc: contributing: remove old TOC [ci skip] --- CONTRIBUTING.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 51e73e475..57e64c4eb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,3 @@ - -$TOC$ -
- - - - - + + + + + - - - + + +
}}) diff --git a/hledger-web/hledger-web.m4.md b/hledger-web/hledger-web.m4.md index 59d9cf7c1..63a8c049b 100644 --- a/hledger-web/hledger-web.m4.md +++ b/hledger-web/hledger-web.m4.md @@ -27,10 +27,10 @@ _web_({{ .highslide-caption {color:white; background-color:black;}
- - - - + + + +
}}) From fd5dc7bc1852ad648662647feca6d25472e17d5c Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 26 Aug 2019 09:04:07 -0700 Subject: [PATCH 07/11] ;doc: fix some table rendering in the html manuals [ci skip] --- Shake.hs | 6 +++++- hledger/hledger_options.m4.md | 12 ++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Shake.hs b/Shake.hs index 8069dcd90..89962772b 100755 --- a/Shake.hs +++ b/Shake.hs @@ -113,7 +113,11 @@ sed = "sed -E" fromsrcmd = "-f markdown-smart-tex_math_dollars" -- The kind of markdown we like to generate for the website. -towebmd = "-t markdown-smart-fenced_divs --atx-headers" +-- This will be consumed by sphinx extensions: +-- recommonmark (Commonmark syntax, https://spec.commonmark.org) +-- sphinx-markdown-tables (PHP Markdown Extra table syntax, https://michelf.ca/projects/php-markdown/extra/#table) +-- XXX trying to force the use of pipe_tables here, but sometimes it uses html instead +towebmd = "-t markdown-smart-fenced_divs-simple_tables-multiline_tables-grid_tables --atx-headers" main = do diff --git a/hledger/hledger_options.m4.md b/hledger/hledger_options.m4.md index e1c5801b5..f2fb1b77c 100644 --- a/hledger/hledger_options.m4.md +++ b/hledger/hledger_options.m4.md @@ -168,12 +168,12 @@ but it can also be one of several other formats, listed below. hledger detects the format automatically based on the file extension, or if that is not recognised, by trying each built-in "reader" in turn: -| Reader: | Reads: | Used for file extensions: -|-----------------|-------------------------------------------------------|------------------------------------------- -| `journal` | hledger's journal format, also some Ledger journals | `.journal` `.j` `.hledger` `.ledger` -| `timeclock` | timeclock files (precise time logging) | `.timeclock` -| `timedot` | timedot files (approximate time logging) | `.timedot` -| `csv` | comma-separated values (data interchange) | `.csv` +| Reader: | Reads: | Used for file extensions: | +|-------------|-----------------------------------------------------|-----------------------------------------------------| +| `journal` | hledger's journal format, also some Ledger journals | `.journal` `.j` `.hledger` `.ledger` | +| `timeclock` | timeclock files (precise time logging) | `.timeclock` | +| `timedot` | timedot files (approximate time logging) | `.timedot` | +| `csv` | comma-separated values (data interchange) | `.csv` | If needed (eg to ensure correct error messages when a file has the "wrong" extension), you can force a specific reader/format by prepending it to the file path with a colon. From f55985eb9b168fb3d70667528286970c60186bbd Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 26 Aug 2019 18:40:21 -0700 Subject: [PATCH 08/11] ;site: stop using pandoc's fenced_code_attributes [ci skip] --- CONTRIBUTING.md | 26 +++++++++++++------------- Shake.hs | 2 +- hledger-lib/hledger_csv.m4.md | 16 ++++++++-------- hledger-lib/hledger_journal.m4.md | 4 ++-- hledger-lib/hledger_timeclock.m4.md | 2 +- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 57e64c4eb..73c16b5cc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -694,7 +694,7 @@ About testing in the hledger project, as of 201809. Here\'s the pattern (let us know if you see a better way): - ``` {.haskell} + ``` haskell module Foo ( ... tests_Foo -- export this module's and submodules' tests @@ -836,19 +836,19 @@ tests, at least. It would be useful to set this up for hledger. Run unit tests: -``` {.example} +``` example $ make unittest ``` Run doctests: -``` {.example} +``` example $ make doctest ``` Run functional tests (and unit tests, now): -``` {.example} +``` example $ stack install shelltestrunner $ make functest ``` @@ -856,37 +856,37 @@ $ make functest Run the package tests (unit tests, maybe doctests, but not functional tests) of all or selected packages. -``` {.example} +``` example $ stack test [PKG] ``` Run \"default tests: package plus functional tests\": -``` {.example} +``` example $ make test ``` Test generation of haddock docs: -``` {.example} +``` example $ make haddocktest ``` Thorough test for build issues with current GHC: -``` {.example} +``` example $ make buildtest ``` Thorough test for build issues with all supported GHC versions: -``` {.example} +``` example $ make buildtestall ``` Run built-in hledger/hledger-lib unit tests via hledger command: -``` {.example} +``` example $ hledger test # test installed hledger $ stack build hledger && stack exec -- hledger test # test just-built hledger $ hledger test --help @@ -903,19 +903,19 @@ test [TESTPATTERN] [SEED] Rebuild and rerun hledger/hledger-lib unit tests via ghcid: -``` {.example} +``` example $ make ghcid-test ``` Rebuild and rerun only some tests via ghcid (see hledger test --help): -``` {.example} +``` example $ make ghcid-test-TESTPATTERN ``` See all test-related make rules: -``` {.example} +``` example $ make help-test ``` diff --git a/Shake.hs b/Shake.hs index 89962772b..7539def63 100755 --- a/Shake.hs +++ b/Shake.hs @@ -117,7 +117,7 @@ fromsrcmd = "-f markdown-smart-tex_math_dollars" -- recommonmark (Commonmark syntax, https://spec.commonmark.org) -- sphinx-markdown-tables (PHP Markdown Extra table syntax, https://michelf.ca/projects/php-markdown/extra/#table) -- XXX trying to force the use of pipe_tables here, but sometimes it uses html instead -towebmd = "-t markdown-smart-fenced_divs-simple_tables-multiline_tables-grid_tables --atx-headers" +towebmd = "-t markdown-smart-fenced_divs-fenced_code_attributes-simple_tables-multiline_tables-grid_tables --atx-headers" main = do diff --git a/hledger-lib/hledger_csv.m4.md b/hledger-lib/hledger_csv.m4.md index 5555f9ccf..17b9e2310 100644 --- a/hledger-lib/hledger_csv.m4.md +++ b/hledger-lib/hledger_csv.m4.md @@ -106,22 +106,22 @@ you'll need to specify the format. DATEFMT is a [strptime-like date parsing pattern](http://hackage.haskell.org/packages/archive/time/latest/doc/html/Data-Time-Format.html#v:formatTime), which must parse the date field values completely. Examples: -``` {.rules .display-table} +``` rules # for dates like "11/06/2013": date-format %m/%d/%Y ``` -``` {.rules .display-table} +``` rules # for dates like "6/11/2013" (note the - to make leading zeros optional): date-format %-d/%-m/%Y ``` -``` {.rules .display-table} +``` rules # for dates like "2013-Nov-06": date-format %Y-%h-%d ``` -``` {.rules .display-table} +``` rules # for dates like "11/6/2013 11:32 PM": date-format %-m/%-d/%Y %l:%M %p ``` @@ -152,11 +152,11 @@ This sets a journal entry field (one of the standard names above) to the given t which can include CSV field values interpolated by name (`%CSVFIELDNAME`) or 1-based position (`%N`). Eg: -```{.rules .display-table} +```rules # set the amount to the 4th CSV field with "USD " prepended amount USD %4 ``` -```{.rules .display-table} +```rules # combine three fields to make a comment (containing two tags) comment note: %somefield - %anotherfield, date: %1 ``` @@ -183,12 +183,12 @@ specific field). When there are multiple patterns they can be written on separate lines, unindented. The field assignments are on separate lines indented by at least one space. Examples: -```{.rules .display-table} +```rules # if the CSV record contains "groceries", set account2 to "expenses:groceries" if groceries account2 expenses:groceries ``` -```{.rules .display-table} +```rules # if the CSV record contains any of these patterns, set account2 and comment as shown if monthly service fee diff --git a/hledger-lib/hledger_journal.m4.md b/hledger-lib/hledger_journal.m4.md index b72dd76f2..2cf40e71f 100644 --- a/hledger-lib/hledger_journal.m4.md +++ b/hledger-lib/hledger_journal.m4.md @@ -403,7 +403,7 @@ double equals sign (`== EXPECTEDBALANCE`). This asserts that there are no other unasserted commodities in the account (or, that their balance is 0). -``` {.journal} +``` journal 2013/1/1 a $1 a 1€ @@ -423,7 +423,7 @@ This asserts that there are no other unasserted commodities in the account It's not yet possible to make a complete assertion about a balance that has multiple commodities. One workaround is to isolate each commodity into its own subaccount: -``` {.journal} +``` journal 2013/1/1 a:usd $1 a:euro 1€ diff --git a/hledger-lib/hledger_timeclock.m4.md b/hledger-lib/hledger_timeclock.m4.md index 598d2871c..aba9c9c70 100644 --- a/hledger-lib/hledger_timeclock.m4.md +++ b/hledger-lib/hledger_timeclock.m4.md @@ -37,7 +37,7 @@ some number of hours to an account. Or if the session spans more than one day, it is split into several transactions, one for each day. For the above time log, `hledger print` generates these journal entries: -``` {.shell} +``` shell $ hledger -f t.timeclock print 2015/03/30 * optional description after two spaces (some:account name) 0.33h From 643e4f1b9076ce935e8e5dbac4399fcb99c85892 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 26 Aug 2019 18:41:07 -0700 Subject: [PATCH 09/11] ;site: git ignore the site/ sub-repo [ci skip] --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a0ad40ea2..0f9eb3133 100644 --- a/.gitignore +++ b/.gitignore @@ -82,3 +82,4 @@ hledger-web/yesod-devel/ *.spk # recent stuff +site From 8772782d18c4b78025fcbb2b782aabccdf96f29b Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 29 Aug 2019 07:30:20 -0700 Subject: [PATCH 10/11] ;doc: contrib: fix some links when on github, & make sphinx happier [ci skip] --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 73c16b5cc..8357dcf46 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -197,7 +197,7 @@ express gratitude, build prosperity consciousness, and help transform world finance! -- Use the donate links on the [home page](/) +- Use the donate links on the [home page](https://hledger.org) - Configure a recurring donation - Contribute or pledge bounties on issues you care about - Ask your organization to contribute @@ -1511,7 +1511,7 @@ If you're new to this process, [help.github.com](http://help.github.com) may be ### Add yourself to the contributor list -- after getting something into the master branch, read and sign the [contributor list & agreement](contributors.html). Or, [ask](/docs.html#helpfeedback) to be added. +- after getting something into the master branch, read and sign the [contributor list & agreement](https://hledger.org/contributors.html). Or, [ask](/index.html#help-feedback) to be added. - give yourself a high five! ### Work on docs From 65692b0e36a3a380cdefdc53b2f3f3dd0f269f13 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 30 Aug 2019 07:28:06 -0700 Subject: [PATCH 11/11] ;doc: update link for lowercase filename [ci skip] --- hledger/hledger_options.m4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hledger/hledger_options.m4.md b/hledger/hledger_options.m4.md index f2fb1b77c..195f632ff 100644 --- a/hledger/hledger_options.m4.md +++ b/hledger/hledger_options.m4.md @@ -37,7 +37,7 @@ which are often a [query](#queries), filtering the data in some way. You can save a set of command line options/arguments in a file, one per line, and then reuse them by writing `@FILENAME` in a command line. To prevent this expansion of `@`-arguments, precede them with a `--` argument. -For more, see [Save frequently used options](Save-frequently-used-options.html). +For more, see [Save frequently used options](save-frequently-used-options.html). ## Special characters in arguments and queries