{"@context":"https://w3id.org/codemeta/3.0","@type":"SoftwareSourceCode","identifier":"pkg:hackage/submark","name":"submark","description":"\n\n[Index] [Quick Jump]\n\nStatic link\n\nUse -f \u003cflag\u003e to enable a flag, or -f -\u003cflag\u003e to disable that flag. More info\n\nPackage maintainers\n\nFor package maintainers and hackage trustees\n\nCandidates\n\n\n\n\n\n\n\n\nsubmark is a CLI program (and GitHub action) to extract some particular\nsection from a given CommonMark/Markdown document.  I use it for myself to\nextract the latest version section from the CHANGELOG.md file, and then reuse\nthe text for the corresponding release note on GitHub releases, during automated\nrelease process which is run on CI/CD.\n\nAlthough it's a standalone CLI program, you can use it through a handy GitHub\naction dahlia/submark:\n\nFirst of all, if you need to manually invoke submark on GitHub Actions,\ndahlia/submark/setup action is the easiest way to install it.\n\nOn the other CI/CD products, use the officially distributed executables.\nPrebuilt binaries for the following platforms and architectures are available on\nGitHub releases:\n\nFor other platforms and architectures, you need to build it by yourself.\nIt's written in Haskell, so you need to install Haskell Stack first.\nIt can be built in the same way other Haskell programs are:\n\nThe following examples use John Gruber's original Markdown introduction:\n\nExtracting an H3 heading Command-Line:\n\nNote that its textual style differ from the original text.\nSince submark internally builds an abstract syntax tree from the given input\ntext and then render again the result tree, it doesn't maintain trivial styles\n(e.g., whitespaces, ATX vs. Setext headings) but only the semantics.\n\nThere are options from --h1 to --h6:\n\nOptions from --h1-regex to --h6-regex take a regular expression instead of\nan exact heading text:\n\nThe leading heading can be omitted:\n\nMatching is case sensitive by default, but case can be ignored using the option\n-i/--ignore-case:\n\nBy Unix convention, - means pipe:\n\nThere's -o/--out-file option as well:\n\nThis software is distributed under GPL 3.","version":"0.4.0","softwareVersion":"0.4.0","license":"https://spdx.org/licenses/GPL-3.0-only","codeRepository":"https://github.com/dahlia/submark","issueTracker":"https://github.com/dahlia/submark/issues","url":"https://github.com/dahlia/submark#readme","keywords":["gpl","library","program","text","Propose Tags"],"programmingLanguage":{"@type":"ComputerLanguage","name":"Haskell"},"maintainer":[{"@type":"Person","name":"hongminhee"}],"author":[{"@type":"Person","name":"hongminhee"}],"copyrightHolder":[{"@type":"Person","name":"hongminhee"}],"dateCreated":"2017-09-24","dateModified":"2026-05-17","datePublished":"2026-05-17","copyrightYear":2017,"downloadUrl":"https://hackage.haskell.org/package/submark-0.4.0/submark-0.4.0.tar.gz","applicationCategory":"hackage","runtimePlatform":"hackage","developmentStatus":"active","sameAs":["https://hackage.haskell.org/package/submark"],"funder":[{"@type":"Organization","url":"https://github.com/sponsors/dahlia"}],"https://www.w3.org/ns/activitystreams#likes":7,"https://forgefed.org/ns#forks":1}