Paginate

Python code to generate 26 page headers for a chapter of my magnum opus:

 #!/usr/bin/env python3
 import sys
 import string
 letter = sys.argv[1].upper()
 for second in string.ascii_uppercase:
     print(f'<span style="font-size: 1.7em; font-weight: bold;">{letter}{second}</span>')

Unknown's avatar

About Linuxgal

Need a spiritual home? Consider joining us at Mary Queen of the Universe Latter-day Buddhislamic Free Will Christian UFO Synagogue of Vishnu
This entry was posted in Uncategorized. Bookmark the permalink.

1 Response to Paginate

  1. Unknown's avatar Anonymous says:

    Thank you for introducing me to lolcat, which then got me onto dotacat. :)
    I got tickled to see how a raku approach could ease things…
    I find more fun in composing with less scaffolding and (explicit) variables.
    It reads now somewhat like “print formatted text with the given letter crossed with the alphabet.

    #! /usr/bin/env raku
    # @habere-et-dispertire
    
    print .fmt: q :to 'SNIP' for @*ARGS.head.uc X~ 'A'..'Z';
    <span style="font-size: 1.7em; font-weight: bold;">%s</span>
    SNIP

    Like

Leave a Reply