!      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Safej/(c) 2008-2010 Robert Greayer, 2012 Brent YorgeyGPL (see LICENSE) Brent Yorgey <byorgey@gmail.com>NoneBlogLiteratelyGiven a block, if it begins with a tag in square brackets, strip off the tag and return a pair consisting of the tag and de-tagged block. Otherwise, return Nothing and the unchanged block.BlogLiteratelyRun the given function on the attributes and source code of code blocks with a tag matching the given tag (case insensitive). On any other blocks (which don't have a matching tag, or are not code blocks), run the other function.n(c) 1997-2005 Ralf Hinze <ralf.hinze@comlab.ox.ac.uk>, Andres Loeh <lhs2tex@andres-loeh.de>, 2012 Brent YorgeyGPL (see LICENSE) Brent Yorgey <byorgey@gmail.com>None3 BlogLiteratelyA GhciLine is a  GhciInput paired with its corresponding  GhciOutput.BlogLiteratelywAn output from ghci is either a correct output, or an incorrect (unexpected) output paired with the expected output.BlogLiterately_An input to ghci consists of an expression/command, possibly paired with an expected output.BlogLiteratelyLInformation about a running process: stdin, stdout, stderr, and a handle.BlogLiterately)Evaluate an expression using an external ghci process.BlogLiteratelyeStart an external ghci process, run a computation with access to it, and finally stop the process.BlogLiteratelyWorkaround for  -https://ghc.haskell.org/trac/ghc/ticket/4836; see also  3https://github.com/byorgey/BlogLiterately/issues/11. If the file contains any lines beginning with #, create a temporary file with those lines filtered out, and pass that instead.[BlogLiterately@Poor man's check to see whether we have a literate Haskell file.BlogLiterately"Stop a ghci process by passing it :q and waiting for it to exit.BlogLiterately.There is nothing magic about the magic string. BlogLiteratelyGiven the path to the .lhs' source and its representation as a Pandoc document, formatInlineGhci finds any [ghci]$ blocks in it, runs them through ghci/, and formats the results as an interactive ghci session.Lines beginning in the first column of the block are interpreted as inputs. Lines indented by one or more space are interpreted as expected outputs. Consecutive indented lines are interpreted as one multi-line expected output, with a number of spaces removed from the beginning of each line equal to the number of spaces at the start of the first indented line. If the output for a given input is the same as the expected output (or if no expected output is given), the result is typeset normally. If the actual and expected outputs differ, the actual output is typeset first in red, then the expected output in blue.   /(c) 2008-2010 Robert Greayer, 2012 Brent YorgeyGPL (see LICENSE) Brent Yorgey <byorgey@gmail.com>None2MBlogLiterately$Four modes for highlighting Haskell.BlogLiterately#Use hscolour and inline the styles.BlogLiterately@Use hscolour in conjunction with an external CSS style sheet.BlogLiteratelyUse highlighting-kate.BlogLiteratelyDo not highlight Haskell.BlogLiteratelygStyle preferences are specified as a list of mappings from class attributes to CSS style attributes.BlogLiteratelyxUse hscolour to syntax highlight some Haskell code. The first argument indicates whether the code is literate Haskell.BlogLiterately5Prepend literate Haskell markers to some source code.BlogLiteratelyZA default style that produces something that looks like the source listings on Hackage.BlogLiterately0Read style preferences in from a file using the Read instance for  StylePrefs;, or return the default style if the file name is empty.BlogLiteratelyTake a String of HTML produced by hscolour, and "bake" styles into it by replacing class attributes with appropriate style attributes.BlogLiteratelyReplace <br/> tags with newlines.BlogLiterately Transform a  CodeBlock into a RawHtml block, where the content contains marked up Haskell (possibly with literate markers), or marked up non-Haskell, if highlighting of non-Haskell has been selected. BlogLiterately9Perform syntax highlighting on an entire Pandoc document.BlogLiterately FormatterBlogLiteratelyAttributes of the CodeBlockBlogLiteratelyRaw contents of the CodeBlockBlogLiteratelyMaybe the formatted result  (c) 2012 Brent YorgeyGPL (see LICENSE) Brent Yorgey <byorgey@gmail.com>NoneS!BlogLiteratelyPass LaTeX through unchanged."BlogLiteratelyPWordPress can render LaTeX, but expects it in a special non-standard format ( $latex foo$). The wpTeXify[ function formats LaTeX code using this format so that it can be processed by WordPress.!"!"/(c) 2008-2010 Robert Greayer, 2012 Brent YorgeyGPL (see LICENSE) Brent Yorgey <byorgey@gmail.com>None2lB#BlogLiterately4Configuration record (and command-line options) for BlogLiterately.%BlogLiteratelyName of a style file&BlogLiteratelyHaskell highlighting mode'BlogLiterately)Use highlighting-kate for non-Haskell?(BlogLiteratelyParse as literate Haskell?)BlogLiteratelyGenerate a table of contents?*BlogLiteratelyPass LaTeX through unchanged?+BlogLiteratelyFormat LaTeX for WordPress?,BlogLiteratelyIndicate how to format math-BlogLiterately$Automatically process ghci sessions?.BlogLiteratelyAutomatically upload images?/BlogLiteratelyCategories for the post0BlogLiteratelyTags for the post1BlogLiteratelySBlog-specific identifier (e.g. for blogging software handling multiple blogs)2BlogLiteratelyName of profile to use.3BlogLiteratelyBlog xmlrpc URL4BlogLiteratelyBlog user name5BlogLiterately1Blog password (omit to be interactively prompted)6BlogLiterately Post title7BlogLiterately File to post8BlogLiterately=Format of the file (currently supported: markdown, rst)9BlogLiteratelyID of a post to update:BlogLiterately!Create a "page" instead of a post;BlogLiteratelyGShould the post be published? (Otherwise it is uploaded as a draft.)<BlogLiterately8Don't upload anything; just output HTML to stdout.=BlogLiterately"Process citations? (default: true)>BlogLiterately9Extension arguments, for use e.g. by custom transformsrBlogLiterately(Command-line configuration for use with cmdargs.N#$%&'()*+,-./0123456789:;<=>ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrN#$%&'()*+,-./0123456789:;<=>rSHLJVRYKGWCTBPAXNUEFOMQIDZ[\]^_`abcdefghijklmnopq(c) 2012 Brent YorgeyGPL (see LICENSE) Brent Yorgey <byorgey@gmail.com>None"#%|uBlogLiterately>Transform a document by uploading any "local" images to the server, and replacing their filenames with the URLs returned by the server. Only upload any given image once (determined by file name), even across runs: uploaded images and their associated URL on the server is tracked in a special dotfile, .BlogLiterately-uploaded-images.BlogLiteratelyiRead the list of previously uploaded images and their associated URLs from a special dotfile (namely, .BlogLiterately-uploaded-images).BlogLiteratelyaWrite out the list of uploaded images and their associated URLs to a special dotfile (namely, .BlogLiterately-uploaded-images).vBlogLiteratelyUpload a file using the metaWeblog.newMediaObject XML-RPC method call.wBlogLiteratelyPrepare a file for upload.uvwuvw(c) 2013 Brent YorgeyGPL (see LICENSE) Brent Yorgey <byorgey@gmail.com>NonexBlogLiteratelyConvert the contents of a [BLOpts]< block into an options record and a list of parse errors.yBlogLiteratelyRead a single line from a [BLOpts] block.zBlogLiteratelyParse a single line from a [BLOpts] block.xyzxyz/(c) 2008-2010 Robert Greayer, 2012 Brent YorgeyGPL (see LICENSE) Brent Yorgey <byorgey@gmail.com>None"#>{BlogLiteratelynPrepare a post for uploading by creating something of the proper form to be an argument to an XML-RPC call.|BlogLiteratelyoGiven a name and a list of values, create a named "array" field suitable for inclusion in an XML-RPC struct.}BlogLiteratelyGet the URL for a given post.~BlogLiteratelyLook at the last n posts and find the most recent whose title contains the search term (case insensitive); return its permalink URL.BlogLiteratelyDGiven a configuration and a formatted post, upload it to the server.{BlogLiterately Post titleBlogLiterately Post contentBlogLiteratelyList of categoriesBlogLiterately List of tagsBlogLiteratelyTrue = page, False = post{|}~{|}~ 4(c) 2008-2010 Robert Greayer, 2012-2013 Brent YorgeyGPL (see LICENSE) Brent Yorgey <byorgey@gmail.com>None "#=>?PUV($BlogLiterately%A special link consists of two parts:3An identifier string. If the identifier string is  id7, this will trigger for links which are of the form  id::XXXX.JA URL generation function. It takes as input the string following the :: (the XXXXK in the example above), the configuration record, and must output a URL. For example, ("twitter", u _ -> return $ " https://twitter.com/" ++ u) is a simple # which causes links of the form  twitter::user to be replaced by  https://twitter.com/user.BlogLiteratelyA document transformation consists of two parts: an actual transformation, expressed as a function over Pandoc documents, and a condition specifying whether the transformation should actually be applied."The transformation itself takes a # configuration as an argument. You may of course ignore it if you do not need to know anything about the configuration. The --xtra (or -x) flag is also provided especially as a method of getting information from the command-line to custom extensions. Arguments passed via -x, on the command line are available from the Z field of the # configuration.NThe transformation is then specified as a stateful computation over both a BlogLiterately options record, and a Pandoc/ document. It may also have effects in the IO monad.=If you have a pure function of type @BlogLiterately -> Pandoc> Pandoc@, you can use the  function to create a .If you have a function of type *BlogLiterately -> Pandoc -> IO Pandoc, you can use .4Otherwise you can directly create something of type *StateT (BlogLiterately, Pandoc) IO ().JFor examples, see the implementations of the standard transforms below.BlogLiteratelyA document transformation, which can transform both the document and the options and have effects in the IO monad. The options record can be transformed because the document itself may contain information which affects the options.BlogLiterately2A condition under which to run the transformation.BlogLiterately0Construct a transformation from a pure function.BlogLiterately2Construct a transformation from a function in the IO monad.BlogLiteratelyRun a  (if its condition is met).BlogLiteratelyRun a pipeline of s.BlogLiterately9Pass LaTeX (inline or display) through unchanged (if the rawlatex flag is set).BlogLiterately,Format embedded LaTeX for WordPress (if the wplatex flag is set).BlogLiteratelyFormat embedded ghci sessions (if the ghci flag is set).BlogLiterately3Upload embedded local images to the server (if the  uploadImages flag is set).BlogLiterately+Perform syntax highlighting on code blocks.BlogLiterately^Center any images which occur in a paragraph by themselves. Inline images are not affected.BlogLiteratelyoReplace special links with appropriate URLs. Currently, the following types of special links are supported: lucky:: searchThe first Google result for  search.wiki:: titleThe Wikipedia page for  title6. Note that the page is not checked for existence. hackage:: pkgThe Hackage page for  pkg.github:: user/ repo*The top page for the given repo on github.github:: user repo# nnnLink to a particular issue.github:: user repo@ hashLink to a particular commit. post::nnnn#Link to the blog post with post ID nnnn:. Note that this form of special link is invoked when nnnnz consists of all digits, so it only works on blogs which use numerical identifiers for post IDs (as Wordpress does).post:: searchQLink to the most recent blog post (among the 20 most recent posts) containing  search in its title.9For example, a post written in Markdown format containing @ This is a post about the game of [Go](wiki::Go (game)). will be formatted in HTML as   p!This is a post about the game of  a0href="https://en.wikipedia.org/wiki/Go%20(game)"Go /a. /p KYou can also create a Transform with your own special link types, using X, and I am happy to receive pull requests adding new types of standard special links.BlogLiterately,The standard special link types included in : , , ,  , and .BlogLiteratelyCreate a transformation which looks for the given special links and replaces them appropriately. You can use this function with your own types of special links.BlogLiteratelylCreate a document transformation which looks for the given special links and replaces them appropriately.BlogLiteratelyTurn lucky:: search- into a link to the first Google result for  search.BlogLiterately2Get the contents of the given URL in a simple way.BlogLiteratelyGiven wiki:: title/, generate a link to the Wikipedia page for  title3. Note that the page is not checked for existence.BlogLiteratelypostLink$ handles two types of special links.  post::nnnn#Link to the blog post with post ID nnnn8. Note that this form of special link is invoked when nnnnv consists of all digits, so it only works on blogs which use numerical identifiers for post IDs (as Wordpress does).post:: searchOLink to the most recent blog post (among the 20 most recent posts) containing  search in its title.BlogLiterately githubLink( handles several types of special links. github:: user/ repolinks to a repository.github:: user repo# nnnlinks to issue #nnn.github:: user repo@ hash)links to the commit with the given hash.BlogLiteratelyA target of the form  hackage:: pkg% turns into a link to the package  pkg on Hackage.BlogLiteratelyYPotentially extract a title from the metadata block, and set it in the options record.BlogLiteratelyExtract blocks tagged with [BLOpts]& and use their contents as options.BlogLiteratelyrTake a block and extract from it a list of parse errors and an options record. If the blog is not tagged with [BLOpts] these will just be empty.BlogLiteratelyDelete any blocks tagged with [BLOpts].BlogLiterately&Prompt the user for a password if the blog3 field is set but no password has been provided.BlogLiteratelyTRead a user-supplied style file and add its contents to the highlighting options.BlogLiteratelyFormat citations.BlogLiterately0Load options from a profile if one is specified.BlogLiteratelyJLoad additional options from a profile specified in the options record.BlogLiteratelyXThe standard set of transforms that are run by default (in order from top to bottom): : extract options specified in [BLOpts] blocks in the file%: load the requested profile (if any)*: prompt the user for a password if needed.: extract the title from a special title block: pass LaTeX through unchanged/: turn LaTeX into WordPress format if requested,: run and typeset ghci sessions if requested: upload images if requested0: center images occurring in their own paragraph&: replace special link types with URLs,: load the requested highlighting style file: perform syntax highlighting: process citationsBlogLiteratelynTransform a complete input document string to an HTML output string, given a list of transformation passes.BlogLiteratelyTurn CRLF pairs into a single LF. This is necessary since  is picky about line endings. (c) 2012-2013 Brent YorgeyGPL (see LICENSE) Brent Yorgey <byorgey@gmail.com>None=? BlogLiterately'The default BlogLiterately application.BlogLiteratelyLike ., but with the ability to specify additional s which will be applied after the standard ones.BlogLiteratelyLike , but with the ability to replace the standard s. Use this to implement custom interleaving orders of the standard transforms and your own, to exclude some or all of the standard transforms, etc. (c) 2012 Brent YorgeyGPL (see LICENSE) Brent Yorgey <byorgey@gmail.com>None V  !"#$%&'()*+,-./0123456789:;<=>ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqruvw{|}~  !"#$%&'()*+,-./00123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     +BlogLiterately-0.8.7-AqQY52BwtJ51q485PyausbText.BlogLiterately.BlockText.BlogLiterately.GhciText.BlogLiterately.HighlightText.BlogLiterately.LaTeXText.BlogLiterately.OptionsText.BlogLiterately.Image!Text.BlogLiterately.Options.ParseText.BlogLiterately.PostText.BlogLiterately.TransformText.BlogLiterately.RunPaths_BlogLiteratelyText.BlogLiteratelyunTagonTag ProcessInfoghciEvalwithGhciProcess isLiteratestopGhcimagicextract'extractbreaksformatInlineGhci$fShowGhciInput$fShowGhciOutput$fShowGhciLine HsHighlightHsColourInline HsColourCSSHsKate HsNoHighlight StylePrefs$fDataHsHighlight$fShowHsHighlight$fEqHsHighlight_HsColourInlinecolourItlitifydefaultStylePrefs getStylePrefs bakeStyles replaceBreakscolouriseCodeBlockcolourisePandoc rawTeXifywpTeXifyBlogLiterately_style _hsHighlight_otherHighlight _litHaskell_toc _rawlatex_wplatex_math_ghci _uploadImages _categories_tags_blogid_profile_blog_user _password_title_file_format_postid_page_publish _htmlOnly _citations_xtra$fShowBlogLiterately$fDataBlogLiteratelyblogblogid categories citationsfileformatghci hsHighlighthtmlOnly litHaskellmathotherHighlightpagepasswordpostidprofilepublishrawlatexstyletagstitletoc uploadImagesuserwplatexxtrastyle' hsHighlight'otherHighlight' litHaskell'toc' rawlatex'wplatex'math'ghci' uploadImages'blogid'profile'blog'user' password'title'file'format'postid'page'publish' htmlOnly' citations'blOpts$fMonoidBlogLiterately$fSemigroupBlogLiteratelyuploadAllImagesuploadIt mkMediaObject readBLOptions readBLOption parseBLOptionmkPostmkArray getPostURL findTitlepostIt Transform getTransformxfCond pureTransform ioTransform runTransform runTransforms rawtexifyXF wptexifyXFghciXFuploadImagesXF highlightXFcenterImagesXFspecialLinksXFstandardSpecialLinksmkSpecialLinksXF luckyLinkwikiLinkpostLinktitleXF optionsXF passwordXFhighlightOptsXF citationsXF profileXFstandardTransformsxformDocfixLineEndingsblogLiteratelyblogLiteratelyWithblogLiteratelyCustomversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileNameGhciLine GhciOutput GhciInputwithLiterateHashWorkaround highlightreadUploadedImageswriteUploadedImages SpecialLink githubLink hackageLink specialLinksopenURLextractOptionskillOptionBlocks loadProfile!pandoc-2.10-MDiKxJlVgvAHdFFBleaMOText.Pandoc.Readers.Markdown readMarkdown