Skip to content

Commit

Permalink
Fixed bug where snm wouldn't write if any flags present
Browse files Browse the repository at this point in the history
  • Loading branch information
elginer committed Jul 27, 2010
1 parent b54f0ec commit d2b4de6
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Manual.hs
Expand Up @@ -52,7 +52,7 @@ xhtml_format :: (Manual -> String, String)
xhtml_format = (emit_xhtml, "html")

text_format :: (Manual -> String, String)
text_format = (emit_text, "")
text_format = (emit_text, "txt")

-- | Write out a manual
write_manual :: (Manual -> String) -> String -> Manual -> FilePath -> IO ()
Expand Down
2 changes: 2 additions & 0 deletions README
Expand Up @@ -14,6 +14,8 @@ The Simple Nice-Looking Manual Generator - A.K.A snm - generates nice looking ma

Currently, it can produce XHTML and text manuals.

snm is hosted on github (see http://github.com/elginer/snm)


1. What snm does and is
2. What snm does not do and is not
Expand Down
6 changes: 3 additions & 3 deletions bin/snm.hs
Expand Up @@ -125,14 +125,14 @@ main = do
if elem Help flags
then usage
else
uncurry (directed man flags input) output
uncurry (directed input man flags input) output
_ -> usage
else
usage
where

-- The user has specified what to do
directed man flags defaul format ext = do
directed input man flags defaul format ext = do
let outs = filter only_output flags
dump = elem Dump flags
-- dump the text if dump is present
Expand All @@ -143,7 +143,7 @@ main = do
hPutStrLn stderr
("Warning: multiple outputs ignored.")
return (Just out)
_ -> return Nothing
_ -> if dump then return Nothing else return $ Just $ OutputFile Nothing
maybe (return ())
(\out ->
write_manual format ext man $ output_dir defaul out)
Expand Down
1 change: 1 addition & 0 deletions snm.cabal
Expand Up @@ -7,6 +7,7 @@ Author: John Morrice
Category: Documentation
Synopsis: The Simple Nice-Looking Manual Generator.
Build-type: Simple
Homepage: http://github.com/elginer/snm

Library
Build-Depends: base>=4, parsec>=3, filepath, directory, containers, HsSyck, SpoonsUtilities, safe, xhtml
Expand Down
2 changes: 1 addition & 1 deletion snm_help.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions snm_help/header.yaml
Expand Up @@ -13,3 +13,4 @@ preamble:
text: "All snm source code is released under the terms of the GNU General Public Licence Version 3. See the file {external COPYING COPYING} for details."
- "The Simple Nice-Looking Manual Generator - A.K.A snm - generates nice looking manuals from {external YAML http://www.yaml.org/} files."
- "Currently, it can produce XHTML and text manuals."
- "snm is {external hosted on github http://github.com/elginer/snm}"

0 comments on commit d2b4de6

Please sign in to comment.