[edit web page: add short_tutorial.xhtml file PAF01143@nifty.ne.jp**20081217073738] { hunk ./web_page/Hakefile 3 -import System.Cmd (rawSystem) +import System.Cmd (rawSystem) +import System.IO (stdout, hFlush) hunk ./web_page/Hakefile 7 +targets = [ index, tutorial ] + hunk ./web_page/Hakefile 12 -target = "index.xhtml" -projName = "ehaskell" -otherFiles = [ "version_file" ] +index = "index.xhtml" +projName = "ehaskell" +indexDepFiles = [ "version_file", "XMLTools.hs" ] + +tutorial = "short_tutorial.xhtml" +tutorialDepFiles = [ "XMLTools.hs" ] hunk ./web_page/Hakefile 24 - dflt [ target ] + dflt targets hunk ./web_page/Hakefile 28 - file [ "upload" ] [ target, ehsTgz ] $ \_ ss -> do + file [ "upload" ] (targets ++ [ ehsTgz ]) $ \_ ss -> do hunk ./web_page/Hakefile 30 + psswd <- if null newers then return "" else getPsswd hunk ./web_page/Hakefile 33 - "hc751476" ]) newers + "hc751476", "-p", psswd ]) newers hunk ./web_page/Hakefile 38 - (target, ehsTgz:otherFiles) + (index, ehsTgz:indexDepFiles) + , + (tutorial, indexDepFiles) hunk ./web_page/Hakefile 43 + +getPsswd :: IO String +getPsswd = do + putStr "Passwd: " + hFlush stdout + rawSystem "stty" [ "-echo" ] + pass <- getLine + rawSystem "stty" [ "echo" ] + putStrLn "" + return pass addfile ./web_page/XMLTools.hs hunk ./web_page/XMLTools.hs 1 +module XMLTools ( + intoBody +) where + +import System.Time (getClockTime) + +intoBody :: String -> IO String -> IO String +intoBody title getS = do + src <- getS + date <- getClockTime + return $ "\n" ++ + "\n" ++ + "" ++ title ++ "\n" ++ + "

" ++ title ++ "

\n" ++ + "

updated at " ++ show date ++ "

\n" ++ + src ++ "" hunk ./web_page/index.xhtml.ehs 1 - -<%% import System.Time (getClockTime) %%> +<% intoBody "ehaskell" -%> +<%% import XMLTools (intoBody) %%> hunk ./web_page/index.xhtml.ehs 10 - - - ehaskell - - -

ehaskell

-

updated at <%==$ getClockTime %>

-

Usage

-

ehs souce-file [ -o output-file ] [ var=val ]

-

How to get

-

- hackage

-

darcs get http://code.haskell.org/ehaskell -

-

ehaskell <%= my_home_version %> - updated at <%==$ getModificationTime $ "../dist/ehaskell-" ++ my_home_version ++ ".tar.gz" %>

- - + +

What's ehaskell

+

You can embed Haskell source code to text by this program.

+

How to get

+

+hackage

+

darcs get http://code.haskell.org/ehaskell +

+

ehaskell <%= my_home_version %> +updated at <%==$ getModificationTime $ "../dist/ehaskell-" ++ my_home_version ++ ".tar.gz" %>

+

Usage

+

ehs souce-file [ -o output-file ] [ var=val ]

+

Short Tutorial

+

short_tutorial

+ +<%-%> addfile ./web_page/short_tutorial.xhtml.ehs hunk ./web_page/short_tutorial.xhtml.ehs 1 +<% intoBody "short tutorial" -%> +<%% import XMLTools (intoBody) %%> + +

I'm sorry. This page is under construction.

+

contents

+ +<%-%> }