Blog

Article Tags

My Commonplace Book

By William Jeffrey Rankin, Saturday Oct 26 2024

A document consisting, to quote H. P. Lovecraft, "of ideas, images, and quotations hastily jotted down for possible future use in weird fiction." I've used several in my own stories. They are merely starting points to set the imagination working. A few are pulled from Lovecraft's own Commonplace Book.

    Article Tags

    Three Halloween Treats

    By William Jeffrey Rankin, Thursday Oct 24 2024

    Three Halloween treats for you: favorites from my Carnacki Casebook volumes. All in EPUB format and free!

    I hope you enjoy the stories. Happy Halloween!

    *Yes, that Thurnley Abbey. If you know, you know.

        Article Tags

        Hua Pandoc Integration

        By William Jeffrey Rankin, Mon Oct 14 2024

        Revision 169 of Hua supports PDF generation through Pandoc and the GNU roff (groff) typesetting system. This allows for much better looking print output than is possible through HTML and CSS.

        Example Usage & Output

        Groff output mode is used in conjunction with article mode:

        .\hua.ps1 .\hua.cfg -A '00110' -G
        

        This command outputs two files: the HTML version of the article and a version for use in groff (it's given an .ms extension). To convert this file to PDF, run the following:

        pdfroff -ms -mpdfmark -mspdf pandoc-int.html.ms > pandoc-int.html.pdf
        

        The result looks like this (pandoc-int.html.pdf). Here's a more verbose example (old-church-stone.html.pdf). Note that only absolute links work in documents generated this way.

        Related Articles

            Article Tags

            Hua Article Mode

            By William Jeffrey Rankin, Thu Sep 26 2024

            As of revision 165, Hua has an article mode that enables processing of an individual article. This is useful in instances where an article is in development and requires review. In this mode only the specified article is generated; index, archive, and tagged-with files are not touched. Since only one article is processed, this mode is significantly faster as well.

            Article Mode Usage & Performance (this blog)

            jeffr@CALLISTO: D:\Documents\wjr-blog $ Measure-Command { ..\Hua\hua.ps1 .\hua.cfg -A '00100' | Out-Default }
            
            ...
            Seconds           : 0
            Milliseconds      : 375
            ...
            

            Normal Mode Usage & Performance (this blog)

            jeffr@CALLISTO: D:\Documents\wjr-blog $ Measure-Command { ..\Hua\hua.ps1 .\hua.cfg | Out-Default }
            
            ...
            Seconds           : 3
            Milliseconds      : 27
            ...
            

            Related Articles

                Article Tags

                Hua Error Status Codes

                By William Jeffrey Rankin, Thu Sep 19 2024

                As of revision 157 (released Sep 18, 2024) Hua outputs specific codes based upon error condition. Normally, if all goes well, Hua exits with a status of 0. But when an error condition results, Hua outputs a message and, depending upon the severity of the error, either continues processing content or stops entirely. When the latter occurs, a non-zero exit status is generated. It can be output as seen in the examples below.

                PowerShell Session

                jeffr@CALLISTO: D:\Documents\wjr-blog $ ..\Hua\hua.ps1 .\wrong.cfg
                Config file error. Config file path specified as .\wrong.cfg . Quitting.
                jeffr@CALLISTO: D:\Documents\wjr-blog $ $LASTEXITCODE
                2
                

                Bash Session

                jeffr@Phobos: ~/Hua $ pwsh ./hua.ps1 hua.cfg 
                Meta info file error. Meta file path set as .\met.csv. Quitting.
                jeffr@Phobos: ~/Hua $ echo $?
                9
                

                This is useful in instances where Hua is invoked from a script or as part of a toolchain and exit status needs to be introspected. For more information, refer to the Errors section of the main Hua page.

                Related Articles

                    Newer Articles Older Articles