śĪĢpĀM†      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklm n o p q r s t u v w x y z { | } ~  €  ‚ ƒ „ … Safe †‡ˆ‰Š‹ŒŽ‘’‡Ž‘’ †‡ˆ‰Š‹ŒŽ‘’(c) 2012 Brent YorgeyGPL (see LICENSE) Brent Yorgey <byorgey@gmail.com>NonePWordPress 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>None Given a block, if 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.ī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.““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>None ”A GhciLine is a  GhciInput paired with its corresponding  GhciOutput.•wAn output from ghci is either a correct output, or an incorrect (unexpected) output paired with the expected output.–_An input to ghci consists of an expression/command, possibly paired with an expected output.LInformation about a running process: stdin, stdout, stderr, and a handle.)Evaluate an expression using an external ghci process.eStart an external ghci process, run a computation with access to it, and finally stop the process.—Workaround 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.[@Poor man's check to see whether we have a literate Haskell file."Stop a ghci process by passing it :q and waiting for it to exit..There is nothing magic about the magic string. Given 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>None+ $Four modes for highlighting Haskell.#Use hscolour and inline the styles.@Use hscolour in conjunction with an external CSS style sheet.Use highlighting-kate.Do not highlight Haskell.gStyle preferences are specified as a list of mappings from class attributes to CSS style attributes.xUse hscolour to syntax highlight some Haskell code. The first argument indicates whether the code is literate Haskell.5Prepend literate Haskell markers to some source code.ZA default style that produces something that looks like the source listings on Hackage.0Read style preferences in from a file using the Read instance for  StylePrefs;, or return the default style if the file name is empty.Take a String of HTML produced by hscolour, and "bake" styles into it by replacing class attributes with appropriate style attributes.Replace <br/> tags with newlines. 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.9Perform syntax highlighting on an entire Pandoc document. §Ø©Ŗ« FormatterAttributes of the CodeBlockRaw contents of the CodeBlockMaybe the formatted result   §Ø©Ŗ«/(c) 2008-2010 Robert Greayer, 2012 Brent YorgeyGPL (see LICENSE) Brent Yorgey <byorgey@gmail.com>None+4Configuration record (and command-line options) for BlogLiterately.Name of a style fileHaskell highlighting mode )Use highlighting-kate for non-Haskell?!Generate a table of contents?"Format LaTeX for WordPress?#Indicate how to format math$$Automatically process ghci sessions?%Automatically upload images?&Categories for the post'Tags for the post(SBlog-specific identifier (e.g. for blogging software handling multiple blogs))Name of profile to use.*Blog xmlrpc URL+Blog user name,1Blog password (omit to be interactively prompted)- Post title. File to post/=Format of the file (currently supported: markdown, rst)0ID of a post to update1!Create a "page" instead of a post2GShould the post be published? (Otherwise it is uploaded as a draft.)38Don't upload anything; just output HTML to stdout.4"Process citations? (default: true)59Extension arguments, for use e.g. by custom transformsc(Command-line configuration for use with cmdargs.I !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc¬H !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcH !"#$%&'()*+,-./012345cF=@IL?<J8G7D6KBH:;CAE>9MNOPQRSTUVWXYZ[\]^_`ab0 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc¬(c) 2012 Brent YorgeyGPL (see LICENSE) Brent Yorgey <byorgey@gmail.com>None d’>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.­iRead the list of previously uploaded images and their associated URLs from a special dotfile (namely, .BlogLiterately-uploaded-images).®aWrite out the list of uploaded images and their associated URLs to a special dotfile (namely, .BlogLiterately-uploaded-images).eUpload a file using the metaWeblog.newMediaObject XML-RPC method call.fPrepare a file for upload.Æd°­±®efdefdefÆd°­±®ef/(c) 2008-2010 Robert Greayer, 2012 Brent YorgeyGPL (see LICENSE) Brent Yorgey <byorgey@gmail.com>None4gnPrepare a post for uploading by creating something of the proper form to be an argument to an XML-RPC call.hoGiven a name and a list of values, create a named "array" field suitable for inclusion in an XML-RPC struct.²Get the URL for a given post.iDGiven a configuration and a formatted post, upload it to the server. g Post title Post contentList of categories List of tagsTrue = page, False = posth³“µ¶·ø¹ŗ»²ighighi gh³“µ¶·ø¹ŗ»²i(c) 2013 Brent YorgeyGPL (see LICENSE) Brent Yorgey <byorgey@gmail.com>NonejConvert the contents of a [BLOpts]< block into an options record and a list of parse errors.kRead a single line from a [BLOpts] block.lParse a single line from a [BLOpts] block.jkl¼½¾æĄjkljkljkl¼½¾æĄ 4(c) 2008-2010 Robert Greayer, 2012-2013 Brent YorgeyGPL (see LICENSE) Brent Yorgey <byorgey@gmail.com>None345KLmŌ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 M 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 q function to create a m.If you have a function of type *BlogLiterately -> Pandoc -> IO Pandoc, you can use r.4Otherwise you can directly create something of type *StateT (BlogLiterately, Pandoc) IO ().JFor examples, see the implementations of the standard transforms below.oō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.p2A condition under which to run the transformation.q0Construct a transformation from a pure function.r2Construct a transformation from a function in the IO monad.sRun a m (if its condition is met).tRun a pipeline of ms.u,Format embedded LaTeX for WordPress (if the wplatex flag is set).vFormat embedded ghci sessions (if the ghci flag is set).w3Upload embedded local images to the server (if the  uploadImages flag is set).x+Perform syntax highlighting on code blocks.y^Center any images which occur in a paragraph by themselves. Inline images are not affected.zYPotentially extract a title from the metadata block, and set it in the options record.{Extract blocks tagged with [BLOpts]& and use their contents as options.ĮrTake 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.ĀDelete any blocks tagged with [BLOpts].|&Prompt the user for a password if the blog3 field is set but no password has been provided.}TRead a user-supplied style file and add its contents to the highlighting options.~Format citations.0Load options from a profile if one is specified.ĆJLoad additional options from a profile specified in the options record.€XThe 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 neededz.: extract the title from a special title blocku/: turn LaTeX into WordPress format if requestedv,: run and typeset ghci sessions if requestedw: upload images if requestedy0: center images occurring in their own paragraph},: load the requested highlighting style filex: perform syntax highlighting~: process citationsnTransform a complete input document string to an HTML output string, given a list of transformation passes.‚Turn CRLF pairs into a single LF. This is necessary since Ä is picky about line endings.mnopqrstuvwxyÅz{ĮĀ|}~ƀ‚Ęmnopqrstuvwxyz{|}~€‚€{}|zuvwxy~mnopqrst‚mnopqrstuvwxyÅz{ĮĀ|}~ƀ‚Ę (c) 2012-2013 Brent YorgeyGPL (see LICENSE) Brent Yorgey <byorgey@gmail.com>None35ƒ'The default BlogLiterately application.„Like ƒ., but with the ability to specify additional ms which will be applied after the standard ones.…Like ƒ, but with the ability to replace the standard m›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ƒ  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghimnopqrstuvwxyz{|}~€‚ƒ„…Ē  !"#$%&'())*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwx y y z { | } ~  €  ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ Œ  Ž   ‘ ’ “ ” • – — ˜ ™ š › œ žŸ ”¢Ÿ£¤”„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉ Ź Ė ĢĶĪĻ Š ŃŅBlogL_BCe9viV8f4G5cy5ExrsjMRText.BlogLiterately.LaTeXText.BlogLiterately.BlockText.BlogLiterately.GhciText.BlogLiterately.HighlightText.BlogLiterately.OptionsText.BlogLiterately.ImageText.BlogLiterately.Post!Text.BlogLiterately.Options.ParseText.BlogLiterately.TransformText.BlogLiterately.RunPaths_BlogLiteratelyText.BlogLiteratelywpTeXifyunTagonTag ProcessInfoghciEvalwithGhciProcess isLiteratestopGhcimagicextract'extractbreaksformatInlineGhci HsHighlightHsColourInline HsColourCSSHsKate HsNoHighlight StylePrefs_HsColourInlinecolourItlitifydefaultStylePrefs getStylePrefs bakeStyles replaceBreakscolouriseCodeBlockcolourisePandocBlogLiterately_style _hsHighlight_otherHighlight_toc_wplatex_math_ghci _uploadImages _categories_tags_blogid_profile_blog_user _password_title_file_format_postid_page_publish _htmlOnly _citations_xtrablogblogid categories citationsfileformatghci hsHighlighthtmlOnlymathotherHighlightpagepasswordpostidprofilepublishstyletagstitletoc uploadImagesuserwplatexxtrastyle' hsHighlight'otherHighlight'toc'wplatex'math'ghci' uploadImages'blogid'profile'blog'user' password'title'file'format'postid'page'publish' htmlOnly' citations'blOptsuploadAllImagesuploadIt mkMediaObjectmkPostmkArraypostIt readBLOptions readBLOption parseBLOption Transform getTransformxfCond pureTransform ioTransform runTransform runTransforms wptexifyXFghciXFuploadImagesXF highlightXFcenterImagesXFtitleXF optionsXF passwordXFhighlightOptsXF citationsXF profileXFstandardTransformsxformDocfixLineEndingsblogLiteratelyblogLiteratelyWithblogLiteratelyCustomcatchIOversionbindirlibdirdatadir libexecdir sysconfdir getBinDir getLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName lowercaseGhciLine GhciOutput GhciInputwithLiterateHashWorkaroundOK UnexpectedparseGhciInputs mkGhciInputunlines'stripunindentindentcolored coloredBlock ghciPromptformatGhciResultesc _HsColourCSS_HsKate_HsNoHighlight lcLanguages highlight$fMonoidBlogLiteratelyreadUploadedImageswriteUploadedImagesURLuploadedImagesFilereadMay getPostURL _ValueInt _ValueBool _ValueString_ValueUnwrapped _ValueDouble_ValueDateTime _ValueBase64 _ValueStruct _ValueArraystrparseStr parseBool parseStrList parseFieldextractOptionskillOptionBlocks loadProfilepando_8Q6BzNsXDfJ9tjQtSKAaJTText.Pandoc.Readers.Markdown readMarkdown centerImagesblHtmlTemplate