Îõ³h&OìL¡      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€  ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ Œ  Ž   ‘ ’ “ ” • – — ˜ ™ š › œ  ž Ÿ    Safe-InferredØ¡¢£¤¥¦§¨/(c) 2008-2010 Robert Greayer, 2012 Brent YorgeyGPL (see LICENSE) Brent Yorgey  Safe-InferredVBlogLiterately£Given 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.BlogLiteratelyîRun 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.î(c) 1997-2005 Ralf Hinze , Andres Loeh , 2012 Brent YorgeyGPL (see LICENSE) Brent Yorgey  Safe-Inferred ©BlogLiteratelyA GhciLine is a  GhciInput paired with its corresponding  GhciOutput.ªBlogLiterately÷An 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.BlogLiteratelyÌInformation about a running process: stdin, stdout, stderr, and a handle.BlogLiterately)Evaluate an expression using an external ghci process.BlogLiteratelyåStart 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  Safe-Inferred"6™BlogLiterately$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.BlogLiteratelyçStyle preferences are specified as a list of mappings from class attributes to CSS style attributes.BlogLiteratelyøUse 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.BlogLiteratelyÚA 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 
 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  Safe-Inferred"D!BlogLiteratelyPass LaTeX through unchanged."BlogLiteratelyÐWordPress 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  Safe-Inferred6#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 post1BlogLiteratelyÓBlog-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;BlogLiteratelyÇShould 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.Î#$%&'()*+,-./0123456789:;<=>ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrÎ#$%&'()*+,-./0123456789:;<=>rSHLJVRYKGWCTBPAXNUEFOMQIDZ[\]^_`abcdefghijklmnopq(c) 2012 Brent YorgeyGPL (see LICENSE) Brent Yorgey  Safe-Inferred%&("nuBlogLiterately¾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.®BlogLiteratelyéRead the list of previously uploaded images and their associated URLs from a special dotfile (namely, .BlogLiterately-uploaded-images).¯BlogLiteratelyáWrite 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  Safe-Inferred#èxBlogLiteratelyConvert 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  Safe-Inferred%&Â'u{BlogLiteratelyîPrepare a post for uploading by creating something of the proper form to be an argument to an XML-RPC call.|BlogLiteratelyïGiven 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.~BlogLiteratelyŠLook at the last n posts and find the most recent whose title contains the search term (case insensitive); return its permalink URL.BlogLiteratelyÄGiven 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  Safe-Inferred"ÁÂÃÔH%°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.ÊA URL generation function. It takes as input the string following the :: (the XXXXË 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.€BlogLiteratelyÔA 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.ÎThe 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 ().ÊFor examples, see the implementations of the standard transforms below.‚BlogLiteratelyôA 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.†BlogLiterately2Construct a transformation from a function in the PandocIO 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.BlogLiteratelyïReplace 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 nnnnú consists of all digits, so it only works on blogs which use numerical identifiers for post IDs (as Wordpress does).post:: searchÑLink 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 ËYou can also create a Transform with your own special link types, using ‘Ø, and I am happy to receive pull requests adding new types of standard special links.BlogLiterately,The standard special link types included in : ’, “, ”, ± , and ².‘BlogLiterately¦Create 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.³BlogLiteratelyìCreate 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 nnnnö consists of all digits, so it only works on blogs which use numerical identifiers for post IDs (as Wordpress does).post:: searchÏLink 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.•BlogLiteratelyÙPotentially 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.µBlogLiteratelyòTake 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.˜BlogLiteratelyÔRead a user-supplied style file and add its contents to the highlighting options.™BlogLiteratelyFormat citations.šBlogLiterately0Load options from a profile if one is specified.·BlogLiteratelyÊLoad additional options from a profile specified in the options record.›BlogLiteratelyØThe 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 requestedŽ0: center images occurring in their own paragraph&: replace special link types with URLs˜,: load the requested highlighting style file: perform syntax highlighting™: process citationsœBlogLiteratelyîTransform 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  Safe-InferredÁÃJÑž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  Safe-InferredKL”  !"#>=<;:9876543210/.-,+*)('&$%ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqruvw{|}~€ƒ‚„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¹  !"#$%&'()*+,-./00123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ Œ Œ  Ž   ‘ ’ “ ” • – — ˜ ™ š › œ  ž Ÿ   ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³´µ¶·¸¹º » ¼ ½ ¾ ¿ À Á ÂÃÄÅÆ-BlogLiterately-0.8.8.2-8FpHiEzOQNUJU0kSgM8ONNText.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$fShowGhciLine$fShowGhciOutput$fShowGhciInput 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 pioTransform runTransform runTransforms rawtexifyXF wptexifyXFghciXFuploadImagesXF highlightXFcenterImagesXFspecialLinksXFstandardSpecialLinksmkSpecialLinksXF luckyLinkwikiLinkpostLinktitleXF optionsXF passwordXFhighlightOptsXF citationsXF profileXFstandardTransformsxformDocfixLineEndingsblogLiteratelyblogLiteratelyWithblogLiteratelyCustomversiongetDataFileName getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirGhciLine GhciOutput GhciInputwithLiterateHashWorkaround highlightreadUploadedImageswriteUploadedImages SpecialLink githubLink hackageLink specialLinksopenURLextractOptionskillOptionBlocks loadProfile#pandoc-3.0.1-879gne7m5GlJNLdUEVbf80Text.Pandoc.Readers.Markdown readMarkdown