| Trigger | Glyph | Code | Description |
|---|---|---|---|
:Aacute |
Á | U+000C1 | A WITH ACUTE, LATIN CAPITAL LETTER |
:aacute |
á | U+000E1 | A WITH ACUTE, LATIN SMALL LETTER |
:Aacute; |
Á | U+000C1 | A WITH ACUTE, LATIN CAPITAL LETTER |
:aacute; |
á | U+000E1 | A WITH ACUTE, LATIN SMALL LETTER |
:Abreve; |
Ă | U+00102 | |
:abreve; |
ă | U+00103 | A WITH BREVE, LATIN SMALL LETTER |
:ac; |
∾ | U+0223E | INVERTED LAZY S / LAZY S, INVERTED / most positive / positive, most / S, INVERTED LAZY |
:acd; |
∿ | U+0223F | alternating current / current, alternating / SINE WAVE / WAVE, SINE |
| #!/usr/bin/env python3 | |
| # /// script | |
| # dependencies = [ | |
| # "pandas", | |
| # "openpyxl", | |
| # "click", | |
| # ] | |
| # /// | |
| ''' |
© Waylan Limberg 2024-04-11
Over the course of six years (2015-2021) I contributed regularly to MkDocs (253 commits according to GitHub's stats). In that time I learned a lot and formed some opinions about how I would like a static site generator to work. This is a brief summary of my ideas. Some of these ideas follow MkDocs closely and others are so different that I would not expect to ever find them in a future version of MkDocs; perhaps in a competing project instead. And these ideas only exist as a vague overview; the technical aspects of them have not been fleshed out. For example, my ideas make multiple references to a configuration; however, I have no idea what format that configuration should take and how the various options should be defined.
For the most part, I was happy with how we got MkDocs' page collection process working (stepping through a file structure collecting text doc
| from pymdownx.blocks import BlocksExtension | |
| from pymdownx.blocks.block import Block, type_html_attribute_dict, type_html_identifier, type_string_in, \ | |
| type_boolean, type_string, , type_multi | |
| import xml.etree.ElementTree as etree | |
| import uuid | |
| class BsAlertBlock(Block): | |
| NAME = 'alert' | |
| ARGUMENT = None |
| import icalendar | |
| def rename_events(infile, outfile, names=None): | |
| ''' | |
| Given a path to a ics file, rename each event and write to outfile. | |
| names should be a list of strings where each item is the new name | |
| to assign to each event in the ics file. If an insuffient number | |
| of names are provided, then an error will occur. | |
| from PIL import Image, ImageDraw, ImageFont | |
| from brother_ql.devicedependent import label_type_specs | |
| from brother_ql import BrotherQLRaster, create_label | |
| from brother_ql.backends.helpers import send | |
| PRINTER = { | |
| 'model': 'QL-800', | |
| 'address': 'usb://0x04f9:0x209b' | |
| } |
| from PIL import Image, ImageDraw, ImageFont | |
| def create_image(text, size, fp, format=None): | |
| img = Image.new('L', size, 'white') | |
| draw = ImageDraw.Draw(img) | |
| # Find largest font size which fits within image size | |
| fontsize = 20 | |
| margin = 10 |
| from peewee import _BaseFormattedField, format_date_time, _date_part | |
| import datetime | |
| class MonthField(_BaseFormattedField): | |
| field_type = 'DATE' | |
| formats = [ | |
| '%Y-%m', | |
| '%Y-%m-%d', | |
| '%Y-%m-%d %H:%M:%S', |
| import markdown | |
| import re | |
| import yaml | |
| from yaml import SafeLoader | |
| from wp2pdf import html2pdf | |
| BLOCK_RE = re.compile(r'^-{3}[ \t]*\n(.*?\n)(?:\.{3}|-{3})[ \t]*\n', re.UNICODE|re.DOTALL) |
| from weasyprint import HTML, CSS | |
| HTML_TEMPLATE = """ | |
| <html> | |
| <head> | |
| </head> | |
| <body> | |
| {body} | |
| </body> | |
| </html> |