1--------------------------------------------------------------------------------
2-- | Exports simple compilers to just copy files
3{-# LANGUAGE DeriveDataTypeable #-}
4{-# LANGUAGE GeneralizedNewtypeDeriving #-}
5module Hakyll.Core.Writable.CopyFile
11--------------------------------------------------------------------------------
12import Data.Binary (Binary (..))
13import Data.Typeable (Typeable)
14import System.Directory (copyFile)
17--------------------------------------------------------------------------------
18import Hakyll.Core.Compiler
19import Hakyll.Core.Identifier
20import Hakyll.Core.Item
21import Hakyll.Core.Writable
24--------------------------------------------------------------------------------
25-- | This will copy any file directly by using a system call
26data CopyFile = CopyFile
27 deriving (Show, Eq, Ord, Typeable)
30--------------------------------------------------------------------------------
31instance Binary CopyFile where
32 put CopyFile = return ()
36--------------------------------------------------------------------------------
37instance Writable CopyFile where
38 write dst item = copyFile (toFilePath $ itemIdentifier item) dst
41--------------------------------------------------------------------------------
42copyFileCompiler :: Compiler (Item CopyFile)
43copyFileCompiler = makeItem CopyFile
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list