Offer-motivated features: :hline defaults, ranged :hpos, @date :days, :bottom none
- @table: a writer's :hline/:vline replaces the default lines; new
boundary name 'none' removes all lines
- @table: ranged :hpos argument overrides :cell_hpos per cell
(\multicolumn{1} in tex; positions a colspan anchor's merged cell)
- @date/@datetime: :days offset argument (sks/date/date.py)
- @document: ":bottom none" suppresses the footer (\pagestyle{empty})
Also carries the escape-system generator/renderer fixes, per-cell-range
:format, and uppercase .TTF/.OTF font recognition from klammertext-dev.
This commit is contained in:
17
sks/date/date.py
Normal file
17
sks/date/date.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Implementation of the @date and @datetime klammers (date.k). Each takes
|
||||
# the current date and time, offset by the :days argument (positive is
|
||||
# future, negative is past), and formats it.
|
||||
|
||||
import datetime as dt
|
||||
|
||||
|
||||
def offset(days):
|
||||
return dt.datetime.now() + dt.timedelta(days=days or 0)
|
||||
|
||||
|
||||
def date(K):
|
||||
return offset(K.days).strftime("%d %B %Y").lstrip("0")
|
||||
|
||||
|
||||
def datetime(K):
|
||||
return offset(K.days).strftime("%d %B %Y, %H:%M").lstrip("0")
|
||||
Reference in New Issue
Block a user