nowdoc alternatives and similar packages
Based on the "Text" category.
Alternatively, view nowdoc alternatives based on common mentions on social networks and blogs.
-
pandoc-citeproc
Library and executable for using citeproc with pandoc -
scholdoc
Fork of Pandoc for the implementation of a ScholarlyMarkdown parser -
skylighting
A Haskell syntax highlighting library with tokenizers derived from KDE syntax highlighting descriptions -
blaze-from-html
A blazingly fast HTML combinator library for Haskell. -
prettyprinter
A modern, extensible and well-documented prettyprinter. -
commonmark
Pure Haskell commonmark parsing library, designed to be flexible and extensible -
regex-genex
Given a list of regexes, generate all possible strings that matches all of them. -
regex-applicative
Regex-based parsing with an applicative interface -
pandoc-csv2table
A Pandoc filter that renders CSV as Pandoc Markdown Tables. -
servant-checked-exceptions
type-level errors for Servant APIs. -
double-conversion
A fast Haskell library for converting between double precision floating point numbers and text strings. It is implemented as a binding to the V8-derived C++ double-conversion library. -
text-format
A Haskell text formatting library optimized for ease of use and high performance. -
diagrams-pandoc
A pandoc filter to express diagrams inline using the haskell EDSL diagrams. -
boxes
A pretty-printing library for laying out text in two dimensions, using a simple box model.
Static code analysis for 29 languages.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of nowdoc or a related project?
README
nowdoc
Package nowdoc contain 3 QuasiQuotes.
- nowdoc: Simplest here document with only two transformation.
- txtfile: It incerts text file contents as string.
- binfile: It incerts binary file contents as string.
QuasiQuoter nowdoc
Simplest here document. Only two transformation.
- remove head newline if exist
- remove one space from '|', space, space, ..., ']'
short examples
hello = [nowdoc|
abc
def
ghi
|]
is
hello = "abc\ndef\nghi\n"
,
hello = [nowdoc|hello|]
is
hello = "hello"
and
hello = [nowdoc|
hello | ]
world | ]
! | ]
|]
is
hello = "hello |]\nworld| ]\n! | ]"
run perl
{-# LANGUAGE QuasiQuotes #-}
import System.Process
import Text.Nowdoc
main :: IO ()
main = () <$ rawSystem "perl" ["-e", [nowdoc|
use strict;
use warnings;
my $hello = "Hello, world!\n";
print $hello;
|]]
ASCII art
{-# LANGUAGE QuasiQuotes #-}
import Text.Nowdoc
main :: IO ()
main = putStr [nowdoc|
______
.d$$$******$$$$c.
.d$P" "$$c
$$$$$. .$$$*$.
.$$ 4$L*$$. .$$Pd$ '$b
$F *$. "$$e.e$$" 4$F ^$b
d$ $$ z$$$e $$ '$.
$P `$L$$P` `"$$d$" $$
$$ e$$F 4$$b. $$
$b .$$" $$ .$$ "4$b. $$
$$e$P" $b d$` "$$c$F
'$P$$$$$$$$$$$$$$$$$$$$$$$$$$
"$c. 4$. $$ .$$
^$$. $$ d$" d$P
"$$c. `$b$F .d$P"
`4$$$c.$$$..e$$P"
`^^^^^^^`
|]
QuasiQuoter txtfile
It incerts file contents as string without transformation. It read file as text file (with default encoding on your system).
main :: IO ()
main = putStr [txtfile|foo.txt|]
QuasiQuoter binfile
It incerts file contents as string without transformation. It read file as binary file.
main :: IO ()
main = print [binfile|foo.dat|]