---------------------------------------------------------------------- -- | -- Module : Htmls -- Maintainer : AR -- Stability : (stable) -- Portability : (portable) -- -- > CVS $Date: 2005/02/18 19:21:23 $ -- > CVS $Author: peb $ -- > CVS $Revision: 1.4 $ -- -- chop an HTML file into separate files, each linked to the next and previous. -- the names of the files are n-file, with n = 01,02,... -- the chopping is performed at each separator, here defined as @\" link :: FilePath -> Int -> Int -> String link file mx n = (if n >= mx then "" else (" Next")) ++ (if n == 1 then "" else (" Previous")) ++ (" First") ++ (" Last") where file_ = fileName file (n - 1) file' = fileName file (n + 1) file1 = fileName file 1 file2 = fileName file mx fileName :: FilePath -> Int -> FilePath fileName file n = (if n < 10 then ('0':) else id) $ show n ++ "-" ++ file pageNum mx num = "
" ++ show num ++"/" ++ show mx ++ "
"