;doc: mention version in all manual formats
This commit is contained in:
		
							parent
							
								
									f79cd78179
								
							
						
					
					
						commit
						fbe30a73b9
					
				
							
								
								
									
										10
									
								
								Shake.hs
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								Shake.hs
									
									
									
									
									
								
							| @ -440,12 +440,13 @@ main = do | |||||||
|             commandsm4 = "hledger/Hledger/Cli/Commands/commands.m4" |             commandsm4 = "hledger/Hledger/Cli/Commands/commands.m4" | ||||||
|             dir       = takeDirectory out |             dir       = takeDirectory out | ||||||
|             packagemanversionm4 = dir </> ".version.m4" |             packagemanversionm4 = dir </> ".version.m4" | ||||||
|  |             packagemandatem4 = dir </> ".date.m4" | ||||||
|         -- assume any other .m4.md files in dir are included by this one XXX not true in hledger-lib |         -- assume any other .m4.md files in dir are included by this one XXX not true in hledger-lib | ||||||
|         subfiles <- liftIO $ filter (/= src) . filter (".m4.md" `isSuffixOf`) . map (dir </>) <$> S.getDirectoryContents dir |         subfiles <- liftIO $ filter (/= src) . filter (".m4.md" `isSuffixOf`) . map (dir </>) <$> S.getDirectoryContents dir | ||||||
|         need $ [src, commonm4, commandsm4, packagemanversionm4] ++ subfiles |         need $ [src, commonm4, commandsm4, packagemanversionm4, packagemandatem4] ++ subfiles | ||||||
|         when (dir=="hledger") $ need commandmds |         when (dir=="hledger") $ need commandmds | ||||||
|         cmd Shell |         cmd Shell | ||||||
|           m4 "-DINFO -I" dir commonm4 commandsm4 packagemanversionm4 src "|" |           m4 "-DINFO -I" dir commonm4 commandsm4 packagemanversionm4 packagemandatem4 src "|" | ||||||
|           -- sed "-e 's/^#(#+)/\\1/'" "|" |           -- sed "-e 's/^#(#+)/\\1/'" "|" | ||||||
|           pandoc fromsrcmd |           pandoc fromsrcmd | ||||||
|           "--lua-filter tools/pandoc-drop-html-blocks.lua" |           "--lua-filter tools/pandoc-drop-html-blocks.lua" | ||||||
| @ -472,13 +473,14 @@ main = do | |||||||
|             commonm4  = "doc/common.m4" |             commonm4  = "doc/common.m4" | ||||||
|             commandsm4 = "hledger/Hledger/Cli/Commands/commands.m4" |             commandsm4 = "hledger/Hledger/Cli/Commands/commands.m4" | ||||||
|             packageversionm4 = dir </> ".version.m4" |             packageversionm4 = dir </> ".version.m4" | ||||||
|  |             packagemandatem4 = dir </> ".date.m4" | ||||||
|             heading   = let h = manual |             heading   = let h = manual | ||||||
|                         in if "hledger_" `isPrefixOf` h |                         in if "hledger_" `isPrefixOf` h | ||||||
|                            then drop 8 h ++ " format" |                            then drop 8 h ++ " format" | ||||||
|                            else h |                            else h | ||||||
|         -- assume any other .m4.md files in dir are included by this one XXX not true in hledger-lib |         -- assume any other .m4.md files in dir are included by this one XXX not true in hledger-lib | ||||||
|         subfiles <- liftIO $ filter (/= src) . filter (".m4.md" `isSuffixOf`) . map (dir </>) <$> S.getDirectoryContents dir |         subfiles <- liftIO $ filter (/= src) . filter (".m4.md" `isSuffixOf`) . map (dir </>) <$> S.getDirectoryContents dir | ||||||
|         let deps = [src, commonm4, commandsm4, packageversionm4] ++ subfiles |         let deps = [src, commonm4, commandsm4, packageversionm4, packagemandatem4] ++ subfiles | ||||||
|         need deps |         need deps | ||||||
|         when (manual=="hledger") $ need commandmds |         when (manual=="hledger") $ need commandmds | ||||||
|         -- add the web page's heading. |         -- add the web page's heading. | ||||||
| @ -492,7 +494,7 @@ main = do | |||||||
|           ,"" |           ,"" | ||||||
|           ] |           ] | ||||||
|         cmd Shell |         cmd Shell | ||||||
|           m4 "-DWEB -I" dir commonm4 commandsm4 packageversionm4 src "|" |           m4 "-DWEB -I" dir commonm4 commandsm4 packageversionm4 packagemandatem4 src "|" | ||||||
|           pandoc fromsrcmd towebmd |           pandoc fromsrcmd towebmd | ||||||
|           "--lua-filter tools/pandoc-demote-headers.lua" |           "--lua-filter tools/pandoc-demote-headers.lua" | ||||||
|           ">>" out |           ">>" out | ||||||
|  | |||||||
| @ -6,7 +6,8 @@ _man_({{ | |||||||
| # NAME | # NAME | ||||||
| }}) | }}) | ||||||
| 
 | 
 | ||||||
| A terminal interface (TUI) for the hledger accounting tool. | hledger-ui is a terminal interface (TUI) for the hledger accounting tool. | ||||||
|  | This manual is for hledger-ui _version_. | ||||||
| 
 | 
 | ||||||
| _man_({{ | _man_({{ | ||||||
| # SYNOPSIS | # SYNOPSIS | ||||||
|  | |||||||
| @ -6,7 +6,8 @@ _man_({{ | |||||||
| # NAME | # NAME | ||||||
| }}) | }}) | ||||||
| 
 | 
 | ||||||
| A web interface (WUI) for the hledger accounting tool. | hledger-web is a web interface (WUI) for the hledger accounting tool. | ||||||
|  | This manual is for hledger-web _version_. | ||||||
| 
 | 
 | ||||||
| _man_({{ | _man_({{ | ||||||
| # SYNOPSIS | # SYNOPSIS | ||||||
|  | |||||||
| @ -12,12 +12,13 @@ m4_dnl  In Emacs: | |||||||
| m4_dnl   markdown-mode S-TAB cycles visibility, TAB toggles one section. | m4_dnl   markdown-mode S-TAB cycles visibility, TAB toggles one section. | ||||||
| m4_dnl   C-x n s on a heading narrows to that section (C-x n w to widen again). | m4_dnl   C-x n s on a heading narrows to that section (C-x n w to widen again). | ||||||
| 
 | 
 | ||||||
| m4_dnl Show these first headings only in man pages: |  | ||||||
| _man_({{ | _man_({{ | ||||||
| # NAME | # NAME | ||||||
| }}) | }}) | ||||||
| 
 | 
 | ||||||
| A command-line accounting tool for both power users and folks new to accounting. | 
 | ||||||
|  | hledger is a command-line accounting tool for both power users and folks new to accounting. | ||||||
|  | This manual is for hledger _version_. | ||||||
| 
 | 
 | ||||||
| _man_({{ | _man_({{ | ||||||
| # SYNOPSIS | # SYNOPSIS | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user