submark 0.3.1 → 0.4.0
raw patch · 4 files changed
+55/−26 lines, 4 filesdep ~cmarkdep ~optparse-applicativedep ~text
Dependency ranges changed: cmark, optparse-applicative, text
Files
- CHANGELOG.md +11/−1
- README.md +2/−2
- app/Main.hs +25/−5
- submark.cabal +17/−18
CHANGELOG.md view
@@ -1,10 +1,20 @@ `submark` changelog =================== +Version 0.4.0+-------------++Released on May 17, 2026.++ - Added `-v`/`--version` option.+ - Added prebuilt binaries for Linux aarch64 and macOS aarch64.+ - Added linux/arm64 Docker images.++ Version 0.3.1 ------------- -Released on Match 15, 2022.+Released on March 15, 2022. - Added `dahlia/submark` action for GitHub Actions. [[#6]] - Added `dahlia/submark/setup` action for GitHub Actions. [[#6]]
README.md view
@@ -86,8 +86,8 @@ Prebuilt binaries for the following platforms and architectures are available on [GitHub releases]: - - Linux (x86_64)- - macOS (x86_64)+ - Linux (x86_64, aarch64)+ - macOS (x86_64, aarch64) - Windows (win64) For other platforms and architectures, you need to build it by yourself.
app/Main.hs view
@@ -1,15 +1,23 @@ {-# LANGUAGE DisambiguateRecordFields #-}+{-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} import Data.Maybe+import Data.Version import System.IO import CMark-import Data.Text hiding (empty, foldl)+import Data.Text (pack) import Data.Text.IO as TIO import Options.Applicative import Text.CommonMark.Sub+import qualified Paths_submark as Meta +data Command+ = Extract Extraction+ | ShowVersion+ deriving (Eq, Ord, Show)+ data Extraction = Extraction { outputFilePath :: FilePath , headingPattern :: HeadingPattern@@ -56,8 +64,8 @@ | l <- levels ] -parser :: Parser Extraction-parser = Extraction+extractionParser :: Parser Extraction+extractionParser = Extraction -- CHECK: Write docs in README.md for a new option. <$> strOption ( long "out-file" <> short 'o'@@ -89,7 +97,17 @@ <> help "CommonMark/Markdown text to extract from." ) -parserInfo :: ParserInfo Extraction+showVersionParser :: Parser Command+showVersionParser = flag' ShowVersion+ ( long "version"+ <> short 'v'+ <> help "Show version."+ )++parser :: Parser Command+parser = (Extract <$> extractionParser) <|> showVersionParser++parserInfo :: ParserInfo Command parserInfo = info parser $ fullDesc <> progDesc "Extract a part from CommonMark/Markdown docs." @@ -127,4 +145,6 @@ withOutputFile e (`TIO.hPutStrLn` result) main :: IO ()-main = execParser parserInfo >>= extract+main = execParser parserInfo >>= \ case+ Extract e -> extract e+ ShowVersion -> Prelude.putStrLn $ showVersion Meta.version
submark.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4.+-- This file has been generated from package.yaml by hpack version 0.37.0. -- -- see: https://github.com/sol/hpack name: submark-version: 0.3.1+version: 0.4.0 synopsis: Extract a part from CommonMark/Markdown docs category: Text stability: alpha@@ -13,7 +13,7 @@ bug-reports: https://github.com/dahlia/submark/issues author: Hong Minhee maintainer: hong.minhee@gmail.com-copyright: (c) 2017 Hong Minhee+copyright: © 2017–2022 Hong Minhee license: GPL-3 license-file: LICENSE build-type: Simple@@ -37,12 +37,12 @@ Paths_submark hs-source-dirs: src- ghc-options: -Wall -fwarn-incomplete-uni-patterns+ ghc-options: -Wall -Wincomplete-uni-patterns build-depends: base >=4.7 && <5- , cmark >=0.5.6 && <0.6.0+ , cmark >=0.5.6 && <0.7.0 , regex-tdfa >=1.3.1.2 && <1.4- , text ==1.*+ , text <3 default-language: Haskell2010 executable submark@@ -51,18 +51,18 @@ Paths_submark hs-source-dirs: app- ghc-options: -Wall -fwarn-incomplete-uni-patterns+ ghc-options: -Wall -Wincomplete-uni-patterns build-depends: base >=4.7 && <5- , cmark >=0.5.6 && <0.6.0- , optparse-applicative >=0.13.2.0 && <0.17.0.0+ , cmark >=0.5.6 && <0.7.0+ , optparse-applicative >=0.13.2.0 && <0.19.0.0 , submark- , text ==1.*+ , text <3+ default-language: Haskell2010 if flag(static) ghc-options: -Wall -fwarn-incomplete-uni-patterns -static -optl-static -optl-pthread -optc-Os -fPIC else- ghc-options: -Wall -fwarn-incomplete-uni-patterns- default-language: Haskell2010+ ghc-options: -Wall -Wincomplete-uni-patterns test-suite hlint type: exitcode-stdio-1.0@@ -71,12 +71,11 @@ Paths_submark hs-source-dirs: lint- ghc-options: -Wall -fwarn-incomplete-uni-patterns build-depends: base >=4.7 && <5- , cmark >=0.5.6 && <0.6.0+ , cmark >=0.5.6 && <0.7.0 , hlint >=2.0.9 && <4- , text ==1.*+ , text <3 default-language: Haskell2010 test-suite spec@@ -88,12 +87,12 @@ Paths_submark hs-source-dirs: test- ghc-options: -Wall -fwarn-incomplete-uni-patterns+ ghc-options: -Wno-x-partial build-depends: base >=4.7 && <5- , cmark >=0.5.6 && <0.6.0+ , cmark >=0.5.6 && <0.7.0 , hspec >=2.4.4 && <3.0.0 , submark , template-haskell >=2.5- , text ==1.*+ , text <3 default-language: Haskell2010