omaketex 0.1.0.0 → 0.1.1.0
raw patch · 2 files changed
+29/−14 lines, 2 files
Files
- omaketex.cabal +9/−6
- omaketex.hs +20/−8
omaketex.cabal view
@@ -2,27 +2,30 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: omaketex-version: 0.1.0.0+version: 0.1.1.0 synopsis: A simple tool to generate OMakefile for latex files. description: A simple toot to generate OMakefile for latex files. license: BSD3 license-file: LICENSE author: Hiromi ISHII maintainer: konn.jinro_at_gmail.com--- copyright: +copyright: (c) Hiromi ISHII 2013 category: Text build-type: Simple--- extra-source-files: cabal-version: >=1.10 +homepage: https://github.com/pcapriotti/omaketex+bug-reports: https://github.com/pcapriotti/omaketex/issues++source-repository head+ Type: git+ Location: git://github.com/konn/omaketex.git+ executable omaketex main-is: omaketex.hs- -- other-modules: - -- other-extensions: build-depends: base >=4.6 && <4.7 , shakespeare-text == 1.0.* , optparse-applicative == 0.5.* , shelly == 1.3.* , text == 0.11.*- -- hs-source-dirs: default-language: Haskell2010
omaketex.hs view
@@ -21,9 +21,13 @@ .SUBDIRS: . |] -data Settings = Settings { texDocs :: [T.Text]- , deps :: [String]- , git :: Bool+data Settings = Settings { texDocs :: [T.Text]+ , deps :: [String]+ , git :: Bool+ , latex :: String+ , bibtex :: String+ , dvipdfm :: String+ , makeindex :: String } deriving (Read, Show, Eq, Ord) settings :: ParserInfo Settings@@ -37,13 +41,21 @@ <> long "deps" <> short 'd') ) <*> switch (long "git" <> short 'g' <> help "whether commit & push after typesettings success.")+ <*> strOption (long "latex" <> short 't' <> value "platex" <> showDefault+ <> help "tex engine")+ <*> strOption (long "bibtex" <> short 'b' <> value "pbibtex" <> showDefault+ <> help "bibtex")+ <*> strOption (long "dvipdfm" <> short 'b' <> value "dvipdfmx" <> showDefault+ <> help "dvipdfm")+ <*> strOption (long "mendex" <> short 'm' <> value "mendex -U" <> showDefault+ <> help "mendex") omakefile :: Settings -> T.Text-omakefile (Settings ins dps gits) = T.tail [st|-LATEX = platex-MAKEINDEX = mendex -U-DVIPDFM = dvipdfmx-BIBTEX = pbibtex+omakefile (Settings ins dps gits latex bibtex dvipdfm mendex) = T.tail [st|+LATEX = #{latex}+MAKEINDEX = #{mendex}+DVIPDFM = #{dvipdfm}+BIBTEX = #{bibtex} TEXINPUTS = #{T.unwords $ map dotTeX ins} #{T.unlines $ map latexDocument ins}