Blog

Article Tags

Hua Related Articles Support

By William Jeffrey Rankin, Sun Aug 3 2025

Revision 294 of Hua supports automatic generation of related articles. Simply append one or more IDs to the appropriate article in the entries file. Here's an example from this blog:

00165,planet-rs Improvements,prs-improvements.md,development|astronomy,Sat Jul 26 2025,William Jeffrey Rankin,mailto:jeffrey.rankin@me.com,00031|00032|00090

Articles are listed in the same order they appear in the entry. Hua will display (and log) a warning should the related article ID not exist in the entries file:

Related article error in 000020. Article ID 000017 does not exist. Ignoring.

    Article Tags

    planet-rs Improvements

    By William Jeffrey Rankin, Sat Jul 26 2025

    I've made a few improvements to my shell-script interface for aa (Stephen L. Moshier's astronomical almanac program):

    XML Output

    XML is now included among the output formats (csv, html, xml, ps, raw, and table). It's specified just like any of the others:

    jrankin@Callisto: ~/planet-rs $ ./planet-rs.sh Mars.txt xml -4 EDT
    <?xml version="1.0" encoding="UTF-8"?>
    <rs>
        <input_file>Mars.txt</input_file>
        <day>
            <date>07/01/2025</date>
            <rise>11:02 EDT</rise>
            <set>00:11 EDT</set>
        </day>
        <day>
            <date>07/02/2025</date>
            <rise>11:01 EDT</rise>
            <set>00:08 EDT</set>
        </day>
        <day>
            <date>07/03/2025</date>
            <rise>11:00 EDT</rise>
            <set>00:06 EDT</set>
        </day>
        ...
    

    An XSLT is included (fmt-html.xsl) to transform the XML to HTML.

    Year Output

    The shell script year.sh outputs all formats (and all objects) for the designated year (if year is not specified, current year is output). Example usage and output:

    jrankin@Callisto: ~/planet-rs $ ./year.sh 
    Generating JAN files...
        ...for 0 (csv)
        ...for 0 (raw)
        ...for 0 (html)
        ...for 0 (table)
        ...for 0 (ps)
        ...for 0 (ps to pdf)
        ...for 0 (xml)
        ...for 2 (csv)
        ...for 2 (raw)
        ...for 2 (html)
        ...for 2 (table)
        ...for 2 (ps)
        ...for 2 (ps to pdf)
        ...for 2 (xml)
        ...
    

    Files are output to directory by format and named according to (YYYY)-(MMM)-(object).(format).

    Download

    planet-rs.tar.gz, 5.9K

    Related Articles

        Article Tags

        System Report Using systeminfo and PowerShell

        By William Jeffrey Rankin, Sat May 10 2025

        About

        This PowerShell script uses the systeminfo command to produce an HTML report (sample) containing system information. It also calculates the system's uptime. By default, only a subset of attributes from systeminfo are included in the report. To include more, simply modify the following line:

        $attrs = 'System Model:', 'System Manufacturer:', 'OS Name:', 'OS Version:', 'System Boot Time:', 'Total Physical Memory:', 'Available Physical Memory:'
        

        Usage

        In the example below, the script generates a file called report.html. If no output filename is specified, the script generates output.html.

        pwsh ./sysinfoweb.ps1 report.html
        

        Download

        SysInfoWeb.zip, 1.7K

            Article Tags

            Upgrading TeX Live 2024 to 2025

            By William Jeffrey Rankin, Sat Mar 22 2025

            I recently upgraded my TeX Live installation from 2024 to 2025. My method differs slightly from the upgrade instructions on the TeX Live web site, but I've had no issues doing it this way the past few years. Rather than copying the installation to a new directory, I simply move it (I have limited space on my Linux VM and the TeX Live install is nearly 12 gigabytes). To start:

            cd /usr/local/texlive
            sudo mv 2024 2025
            

            Next, modify paths to reflect the location of TeX Live to /usr/local/2025. For me, this means modifying my .bashrc and using visudo to update the path for sudoers.

            Now, download the update-tlmgr-latest.sh script provided on the upgrade instructions page, make it executable, and run it.

            Finally, upgrade as usual using sudo tlmgr update --list and sudo tlmgr update --all. That's it, you're done!

                Article Tags

                Hua Orphans Mode

                By William Jeffrey Rankin, Thu Feb 13 2025

                Hua has an "orphans" mode that enables the identification of files that exist in the output directory but not in the entries file. Here's an example using the sample content files:

                $ pwsh hua.ps1 example.cfg -O
                orphan-1.html
                

                As there may be perfectly valid reasons for the file to exist (e.g., a file referenced in generated content like a PDF or a download) Hua takes no action beyond listing the orphan filename.

                It occurred to me this mode could also be used to look for orphans in the content directory. All that's required is to change the output_dir variable value in the Hua config file to the location of the content directory. In the example.cfg file change this:

                ...    
                output_dir     =  .\blog
                ...
                

                to this:

                ...    
                output_dir     =  .\content
                ...
                

                and run Hua in the same way as above. Content is not processed in orphans mode. Don't forget to change output_dir to its prior value!

                    Older Articles